Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions 16 Seminar 4/assignment/from-class.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Create an electric store that manages computers.
Computer:
size
peripheral: string[]
brand
canPLayGames?

Laptop
Desktop
Tablet


Presentable
Computable
Interactable
Movable
3 changes: 3 additions & 0 deletions 3 Seminar 4/code/Project 4/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions 6 Seminar 4/code/Project 4/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions 8 Seminar 4/code/Project 4/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions 124 Seminar 4/code/Project 4/.idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions 6 Seminar 4/code/Project 4/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions 11 Seminar 4/code/Project 4/Project 4.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions 21 Seminar 4/code/Project 4/src/Animal.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
public abstract class Animal {
private int weigth;

public Animal() {}

public Animal(int weigth) {
setWeigth(weigth);
}

public int getWeigth() {
return weigth;
}

protected void setWeigth(int weigth) {
this.weigth = weigth;
}

public abstract void move();

public abstract void eat();
}
19 changes: 19 additions & 0 deletions 19 Seminar 4/code/Project 4/src/Human.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Interfaces.Walkable;

public class Human extends Mammal implements Walkable {
public void move() {
walk();
}

public void walk() {
System.out.println("I am walking");
}

public void eat() {
System.out.println("I am eating");
}

public void giveBirth() {
System.out.println("I am giving birth");
}
}
5 changes: 5 additions & 0 deletions 5 Seminar 4/code/Project 4/src/Interfaces/Walkable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package Interfaces;

public interface Walkable {
void walk();
}
15 changes: 15 additions & 0 deletions 15 Seminar 4/code/Project 4/src/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Interfaces.Walkable;

public class Main {
public static void main(String[] args) {
Walkable walker = new Human();
walker.walk();

Human human1 = new Human();
human1.giveBirth();
human1.eat();

Mammal mammal = new Human();
mammal.move();
}
}
18 changes: 18 additions & 0 deletions 18 Seminar 4/code/Project 4/src/Mammal.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public abstract class Mammal extends Animal {
private int temperature;
public Mammal() {}

public Mammal(int weight) {
super(weight);
}

public int getTemperature() {
return temperature;
}

public void setTemperature(int temperature) {
this.temperature = temperature;
}

public abstract void giveBirth();
}
Binary file added BIN +78.3 KB Seminar 4/notes/Seminar0401.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BIN +35.4 KB Seminar 4/notes/Seminar0402.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.