Please make a simulation program of Student Mark List with these following descriptions:
1. The program consists of 4 menu:
• 1. Input Student
• 2. See All Data
• 3. Edit Data
• 4. Exit
2. If user choose menu 1, then user will be asked to input number of student in the list. Validate the number of student must be between 1 and 5.
3. Then the program will be asked user to input Student Id, Student Name and Student Mark as many as the number of student that user input before. Validate:
- Student Id must be 10 characters long.
- Student Name must be filled.
- Student Mark must be between 0 and 100.
4. If user choose menu 2, then:
- Show the student data from the list include student number.
- Then user will be asked to choose the student number of the student to showing the completed student data.
5. If user choose menu 3, then:
- Show the student data from the list include student number.
- Then user will be asked to choose the student number of the student to showing the completed student data which user wants to
edit.
Then user will be asked to input Student Id, Student Name and Student mark with the validation same as before.
please, check my coding
[/COLOR]
import java.util.*; import java.io.*; public class J1601226535_07{ public static void main (String[]args){ Scanner in = new Scanner(System.in); int number = 5;//0-4 int choice; int student, ID, Name; boolean flag; do{ flag = false; // untuk nilai yg minus atau salah try{ number = in.nextInt(); }catch(InputMismatchException e){ flag=true; System.out.println("Inputan harus bilangan bulat"); in.nextLine(); } }while(flag); System.out.println("\t\t Student Mark List \t\t"); System.out.println ("1. Input Student"); System.out.println("2. See All Data"); System.out.println("3. Edit Data"); System.out.println("4. Exit"); do{ System.out.print("Input Your Choice [1-4]: "); choice = in.nextInt(); }while(menu < 1 || menu > 4); switch(menu){ case 1 : System.out.println(How many student[1-5] ? ); break; case 2 : System.out.println(See All Data); break; case 3 : System.out.println(Edit Data); break; } }while(menu != 4); System.out.println("Please input data of 5 people"); System.out.print("1 \t Please input Student ID [10]= "); ID = in.nextInt(); System.out.print("\t Please input Student Name\t= "); Name = in.nextInt(); System.out.print("\t Please input Student Mark [0-100]= "); System.out.print("2 \t Please input Student ID [10]= "); ID = in.nextInt(); System.out.print("\t Please input Student Name\t= "); Name = in.nextInt(); System.out.print("\t Please input Student Mark [0-100]= "); System.out.print("3 \t Please input Student ID [10]= "); ID = in.nextInt(); System.out.print("\t Please input Student Name\t= "); Name = in.nextInt(); System.out.print("\t Please input Student Mark [0-100]= "); System.out.print("4 \t Please input Student ID [10]= "); ID = in.nextInt(); System.out.print("\t Please input Student Name\t= "); Name = in.nextInt(); System.out.print("\t Please input Student Mark [0-100]= "); System.out.print("5 \t Please input Student ID [10]= "); ID = in.nextInt(); System.out.print("\t Please input Student Name\t= "); Name = in.nextInt(); System.out.print("\t Please input Student Mark [0-100]= "); } }