Compare commits
No commits in common. "768d4df2ed1424f35862567de5acd4e855e868d0" and "7ca5445791c90c1d2d8ec5873e958cd245f4f73d" have entirely different histories.
768d4df2ed
...
7ca5445791
7
todo/src/main/java/ru/kamask/pet/Main.java
Normal file
7
todo/src/main/java/ru/kamask/pet/Main.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package ru.kamask.pet;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello world!");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package ru.kamask.pet;
|
|
||||||
|
|
||||||
public class Task {
|
|
||||||
int id;
|
|
||||||
String title;
|
|
||||||
String description;
|
|
||||||
boolean completed;
|
|
||||||
|
|
||||||
Task(String title, String description){
|
|
||||||
this.id = 0;
|
|
||||||
this.title = title;
|
|
||||||
this.description = description;
|
|
||||||
this.completed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void printInfo(){
|
|
||||||
System.out.println(this.title + ": " + (this.completed ? "выполнена." : "в процессе"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void markAsCompleted(){
|
|
||||||
this.completed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
package ru.kamask.pet;
|
|
||||||
|
|
||||||
public class TodoApp {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
Task t1 = new Task("Первая задача", "Уррааа! Первая задача!");
|
|
||||||
Task t2 = new Task("Вторя задача", "Ну, вторая уже не первая)))");
|
|
||||||
t1.printInfo();
|
|
||||||
t2.printInfo();
|
|
||||||
t1.markAsCompleted();
|
|
||||||
t1.printInfo();
|
|
||||||
t2.printInfo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user