Question: Make a Java Program that implements StudentManagement Application that Contains the following : Class Course { Attributes : Name (text), id (text) , numOfHours (int)
- Make a Java Program that implements StudentManagement Application that Contains the following :
- Class Course {
Attributes : Name (text), id (text) , numOfHours (int) , the number of hours attribute means the number of hours assigned to the course
Methods : void printCourse () \\ print the course name and id
}
- Abstract Class Student
{
Attributes : Name (text), id (integer) , numOfHours (int) , balance(double) , gpa (double) , courses (Map
Methods : abstract void enrollCourse(Course s , double grade )
abstract void printInfo()
}
- Make 3 sub-Classes of (Student) Class { ITStudent , EngineerStudent , Medicine Student}
- Each sub-class must have final attribute called pricePerHour (int) {25 for ITStudent , 30 for EngineerStudent , 100 for MedicineStudent}
- Make a constructor to each Class that passes the following values (String name, int id, double balance) and instantiate the map of courses in the constructor
- Make Implementation of the abstract Methods
- Make usage of Factory Design Pattern to create the objects in the main class
The Method getStudent() should take 4 parameters
- String studentType
- String studentName
- int Id
- double balance
- the Main Class should be like this :
-

- Draw UML diagram that represents the Classes in the application
Course c = new Course(); c.name = "Java Programming"; c.id = "CSIC1403"; c.numofHours = 3; Course c2 = new Course(); c2.name = "Java2 Programming"; c2.id = "CSIC3103"; c2.numofHours = 3; Course c3 = new Course(); c3.name = "Java3 Programming"; c3.id = "CSIC1203"; c3.numofHours = 2; Course c4 = new Course(); c4.name = "CalculasA"; c4.id = "Math3302"; c4.numofHours = 3; Course c5 = new Course(); c5.name = "Anatomy"; c5.id = "Qura3203"; c5.numofHours = 1; Student Factory factory = new StudentFactory (); Students Itst = factory.getStudent("IT", "khaled", 120161002 , 500.9); Students Medst = factory.getStudent ("Medicine", "Ahmed", 120207852, 400.50); Itst.enrollcourse (c, 90.8); Itst.enrollcourse (c2, 99.6); ItSt.enrollcourse (c4, 78.2); ItSt.enrollcourse (c3, 50.7); Medst.enrollcourse (c, 88.4); Medst.enrollCourse (c5, 66.4); Medst.enrollCourse (c4, 98.4); ItSt.printInfo(); System.out.println(" Medst.printInfo(); ******")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
