Task_Java/Program.java

27 lines
909 B
Java
Raw Normal View History

2024-06-07 11:25:39 +04:00
import java.util.Objects;
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Plans MyPlan = new Plans();
while (true){
System.out.println("Введите команду:");
Scanner scanner = new Scanner(System.in);
String com = scanner.nextLine();
switch (com){
case "#write":
System.out.println("Введите ваши планы на сегодня: ");
String write = scanner.nextLine();
String[] words = write.split(" ");
MyPlan.Write(words);
break;
case "#read":
MyPlan.Read();
break;
default:
throw new IllegalStateException("Unexpected value: " + com);
}
}
}
}