This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface RectangleDataGetterInterface | |
{ | |
public function getHeight(): int; | |
public function getWidth(): int; | |
} | |
interface RectangleInterface extends RectangleDataGetterInterface |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Computer { | |
private Processor processor; | |
private List<Ram> ramList = new ArrayList<>(); | |
private List<HardDisc> hardDiscsList = new ArrayList<>(); | |
private boolean power = false; | |
public Computer(Processor processor, List<Ram> ramList, List<HardDisc> hardDiscsList) { | |
this.processor = processor; | |
this.ramList = ramList; | |
this.hardDiscsList = hardDiscsList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Continent { | |
private String name; | |
public Continent(String name) { | |
this.name = name; | |
} | |
public String getName() { | |
return name; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Phrase { | |
private String value=""; | |
public void addValue(Word word) { | |
value += " " + word.getValue(); | |
} | |
public String getValue() { | |
return value; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Directory { | |
private List<Directory> directoryList = new ArrayList<>(); | |
private List<File> fileList = new ArrayList<>(); | |
private static int dirId = 1; | |
private static int fId = 1; | |
public Directory(File file, File file1) { | |
add(file); | |
add(file1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oop.lesson2.homework.puppy; | |
public class Animal { | |
protected String name; | |
public Animal(String name) { | |
this.name = name; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oop.lesson2.homework.books; | |
import java.util.Arrays; | |
public class Book { | |
private static int nextId = 1; | |
private final int id = nextId++; | |
private final String name; | |
private final String[] authors; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oop.lesson2.homework.lines; | |
public class Line { | |
private final Point start; | |
private final Point stop; | |
public Line(Point start, Point stop) { | |
this.start = start; | |
this.stop = stop; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oop.lesson1.homework; | |
import java.text.DateFormatSymbols; | |
import java.util.Scanner; | |
public class NumberMonth { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
if(!scanner.hasNextInt()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oop.lesson1.homework; | |
import java.util.Scanner; | |
public class Palindromic { | |
public static void main(String[] args) { | |
int n = 4; | |
Scanner scanner = new Scanner(System.in); | |
int countResult = 0; |
NewerOlder