Question: Please solve this question its important and urgent. Q1: Create UML diagram and Implement the following case study in Java. A University offers different diploma

Please solve this question its important and urgent.

Q1: Create UML diagram and Implement the following case study in Java. A University offers different diploma programs. Principal of the university wants to create a Desktop-based application to manage the records related to their diploma programs and students. A diploma has eight semesters. A student must take two courses in each semester to pass that semester. If a student gets fail in one subject, he must repeat that semester again (enroll again. repeat all the courses of semester). Just for further clarification, each course can have only one section. A teacher can be assigned to that course in each semester, but teacher assignment module is not currently being focused in the current solution, still we will provide a base for that in future. Following is an Object-Oriented solution designed for the case study, you are required to implement it (only skeleton), you can add other details if you think are necessary. A class named Person having A protected attribute name as string. A protected attribute cnic as int. A private attribute address as string A private attribute fatherName as string. A parametrized constructor that assigns provided values to all the attributes. A Teacher class that is-a Person as well, has A private attribute Id. A parametrized constructor that assigns Id, name, cnic, address, fatherName. (You should call super constructor to assign values for Person). A class named Course has A private attribute String courseName A private attribute Teacher teacher A private attribute double marks. (min: 0 and max 100) A private attribute int creditHours A private attribute char grade A private attribute double GPA A parameterized constructor to initialize attributes courseName, creditHours and marks, this constructor should also calculate grade and GPA, according to the grading policy defined in table below: Letter Grade Percentage GPA A 80-100 4 B 70-79 3 C 60-69 2 D 50-59 1 F <50 0 a getter getcoursename() function that will return coursename of the course. getgpa() gpa getcredithours() credithours name semester private attribute semesternumer as int (1 to 8, according students progress, he may repeat same many times) double sgpa semestercredithours string result (pass or fail) arraylist courses (2 courses) A parameterized constructor that gets semesterNumber and two courses as parameters of that semester and it will set the value of result as Pass or Fail. If one of the courses has F grade the semester result is set to Fail. It will also set semesterCreditHours by adding creditHours of both courses. It will also calculate the SGPA using the formula given below and save it to SGPA attribute of class. SGPA=((GPA_(Course 1) creditHourse_(Course 1) )+(GPA_(Course 2) creditHourse_(Course 2) ))/semesterCreditHours A getter getSGPA() that will return the value of SGPA. A getter getSemesterCreditHours() that will return the value of semesterCreditHours. A Student class that is-a Person as well, has A Private attribute sapid as int A Private totalcreditHours as int A private double attribute CGPA A Private ArrayList semesters, containing information of all the semesters. A default constructor that assigns default values. A parameterized constructor that takes only sapid, name, cnic, address, fatherName sets the value of respective attributes and initializes semesters with a new empty ArrayList. A public method addSemester(semester Semester), that adds a semester in semesters ArrayList. A public method calculateCGPA(), to calculate the overall CGPA of all the semesters that are passed so far. it is calculated by getting average of all the semester's CGPA. Formula is given below: CGPA=((SGPA_(Semester 1) semesterCreditHourse_(Semester 1) )+@(SGPA_(Semester 2) semesterCreditHourse_(Semester 2) )+@(SGPA_(Semester 3) semesterCreditHourse_(Semester 3) )+@(SGPA_(Semester 4) semesterCreditHourse_(Semester 4) )+@.@.@.)/totalCreditHours Override toString () method that will return the result of all the semesters as a String in the following format: Result of Ahmad Khan: CGPA = 3.5, Credits Earned = 14 Semester 1: Computer Fundamentals: GPA{ 3 }, Grade { B }, CreditHours{ 3 } Calculus: GPA { 3 }, Grade { B }, CreditHours { 3 } SGPA: 3.00 Semester 2: OOP: GPA{ 4 }, Grade { A }, CreditHours{ 4 } Software Engineering: GPA { 4 }, Grade { A }, CreditHours { 4 } SGPA: 4 A public method printTranscript() that will simply store the string returned by toString() method to a file. Write a main() method to test your code.

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 Databases Questions!