Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package Test;
- import StudentManager.Manager;
- import StudentManager.Student;
- import Validation.Validation;
- import java.util.ArrayList;
- /**
- *
- * @author Asus
- */
- public class Main {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- ArrayList<Student> ls = new ArrayList<>();
- Validation validation = new Validation();
- ls.add(new Student("1", "Pham Thai An", "Spring", "java"));
- ls.add(new Student("2", "Dinh Bao Long", "Summer", ".net"));
- ls.add(new Student("3", "Le Tuan Viet", "Spring", "c/c++"));
- int count = 3;
- //loop until user want to exit program
- while (true) {
- //Show menu option
- Manager.menu();
- int choice = validation.checkInputIntLimit(1, 5);
- switch (choice) {
- case 1:
- Manager.createStudent(count, ls);
- break;
- case 2:
- Manager.findAndSort(ls);
- break;
- case 3:
- Manager.updateOrDelete(count, ls);
- break;
- case 4:
- Manager.report(ls);
- break;
- case 5:
- return;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement