Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone please solve this question. I mean can anyone plz code it for me. It's important. Plz code this program. Q: Implement the following

Can anyone please solve this question. I mean can anyone plz code it for me. It's important. Plz code this program.

Q: 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Question Can plan participants borrow from a VEBA?

Answered: 1 week ago

Question

Question What is an educational benefit trust and how is it used?

Answered: 1 week ago