Question: IN JAVA PLEASE In the course menu of the final project, don't delete class if a student is enrolled in it . That is: when

IN JAVA PLEASE
In the course menu of the final project, don't delete class if a student is enrolled in it. That is: when the user chooses the option to delete a class, print something like:
"Student(s) are enrolled in that class...Sorry class can't be deleted" when there is a least one student in that class.
---------------------------------------------------
Main Menu
1 : Student Management
2 : Course Management
0 : Exit
Enter your selection: 1
-----------------
Student Management Menu:
Choose one of:
A - Search add a student
B - Delete a Student
C Print Fee Invoice
D Print List of Students
X Back to Main Menu
Enter your selection: D
PhD Students
------------
- Zydoun BenSellam
- Erica Belksiri
MS Students
------------
- Caleb Sidi Kacem
- Erika Jones
- Walid Wali
Undergraduate Students
------------
- Ed Johnson
- Willian Jones
- Kirby Sons
Student Management Menu:
Choose one of:
A - Search add a student
B - Delete a Student
C Print Fee Invoice
D Print List of Students
X Back to Main Menu
Enter your selection: A
Enter Students ID: ew44-yye
Invalid id format or ID already exists
Try again later!
Student Management Menu:
Choose one of:
A - Search add a student
B - Delete a Student
C Print Fee Invoice
D Print List of Students
X Back to Main Menu
Enter your selection: A
Enter Students ID: zb5954
Student Type (PhD, MS or Undergrad): PhD
Enter Remaining information
Zaydoun BenSellam|Gary Richardson|Fuzzy Toplology|20300,94442
(No need to check anything: we assume that the user enter valid information, including lab numbers!)
[ Zaydoun BenSellam ] added!
Student Management Menu:
Choose one of:
A - Search add a student
B - Delete a Student
C Print Fee Invoice
D Print List of Students
X Back to Main Menu
Enter your selection: X
---------------------------------------------------
Main Menu
1 : Student Management
2 : Course Management
0 : Exit
Enter your selection: 0
Take Care!
Understanding the structure of lec.txt
Each line in lec.txt represents a class being offered at Valence College.
A class is either a lecture (LEC) or a lab (LAB). A lecture (LEC) is characterized
by:
- Class Number (CN), a unique five-digit number assigned for each lecture/lab
- Prefix (like COP3330)
- Title (like Introduction to Object Oriented Programming)
- Location (like CB 2-201)
- Graduate or undergraduate.
- Modality: Online, Face-to-Face(F2F) or Mixed Mode (Mixed)
- If Modality is F2F or Mixed, then the following entry is the location where that
class is taking place. The next YES/NO field is to specify whether that class
has a lab or not. When a non-online class has a lab, the labs are listed right
after. See below for more information about the labs. Online sections dont have
labs.
- Credit hours is the last field of any lecture.
Examples:
89745,COT6578,Advanced Computer theory,Graduate,F2F,PSY-108,No,4
32658,COT6578,Advanced Computer theory,Graduate,Mixed,LPS-35,No,4
That means that the college offers two sections of COT6578, one is F2F and the other
is online. Both of those sections dont have labs.
When a lecture has a lab, the labs information is provided
right after the lecture information
Example:
69745,COP5698, Programming Languages,Graduate,F2F,CB2-122,YES,4
19745,MSB-123
36598,PSY-100
20315,HSA1-116
That means the COP5698 with cn 69745 has three labs. 19745,36598 and 20315 are the
cns of the labs. MSB-123, PSY-100 and HSA1-116 are the building-room numbers where
those labs are scheduled to take place.
Note that if the Modality is Online, then the line of the
lec.txt has the form:
CN,PREFIX,LECTURE TITLE,GRADUTE/UNDERGRADUTE/ONLINE,CREDIT HOURS
Example:
36636,SOF2058,Introduction to Software,Undergraduate,Online,3
IN JAVA PLEASE In the course menu of the final

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!