Question: Hi, im struggling with an old JAVA OOP question paper im doing for revision. Can I be assisted? Escpesially section B SECTION B: Kindly study

Hi, im struggling with an old JAVA OOP question paper im doing for revision. Can I be assisted? Escpesially section B Hi, im struggling with an old JAVA OOP question paper im doing

SECTION B: Kindly study the class diagram below and write code that fulfils the requirements 130maris) underneath en Faculty University deanName: String universityName: String C. departmentList: undefined chancellorName: String Enumeration e Interface FacultyInterface faculty Location (from Facultyinterface) externalFunding (Real): Real soffCampus onCampus Create the classes Faculty and University as given in the class diagram. Add at least two constructors for each class, including a full constructor in each. Take note that departmentList in Faculty should be an arraylist of String variables. (5marks) 1. 2. Define Facultyinterface that has an abstract method externalFunding), which returns a double and receives one parameter of type double. Also add an enum faculty Location as shown in the class diagram above. (4mark) 3. Implement the Facultyinterface assuming that externalFunding is calculated by multiplying the numberOfPartnerships the Faculty has with the averageGrant given basing on the table below: (5 marks) facultyName averageGrant FCI 1.5 million FEN 1.2 million FHS 850 thousand 4. Assuming that external funding should not exceed 10 million annually for each Faculty add a custom exception, ExternalFundingException that will be thrown in the event that this condition is not met. Add all necessary code to handle this exception. 7 marks) 5. In the driver class do the following operations: a. Create at least two Faculty objects using different constructors in (1). (2 marks) b. Demonstrate polymorphism and write an appropriate comment. (2 marks) c. Display all the properties of the objects you created to the screen. (2 marks) [3 marks 6. Comments, readability and use of conventions [END] person into Page 2 of 2 Dubire person implement departm department fault ad=newl mine enum SECTION B: Kindly study the class diagram below and write code that fulfils the requirements 130maris) underneath en Faculty University deanName: String universityName: String C. departmentList: undefined chancellorName: String Enumeration e Interface FacultyInterface faculty Location (from Facultyinterface) externalFunding (Real): Real soffCampus onCampus Create the classes Faculty and University as given in the class diagram. Add at least two constructors for each class, including a full constructor in each. Take note that departmentList in Faculty should be an arraylist of String variables. (5marks) 1. 2. Define Facultyinterface that has an abstract method externalFunding), which returns a double and receives one parameter of type double. Also add an enum faculty Location as shown in the class diagram above. (4mark) 3. Implement the Facultyinterface assuming that externalFunding is calculated by multiplying the numberOfPartnerships the Faculty has with the averageGrant given basing on the table below: (5 marks) facultyName averageGrant FCI 1.5 million FEN 1.2 million FHS 850 thousand 4. Assuming that external funding should not exceed 10 million annually for each Faculty add a custom exception, ExternalFundingException that will be thrown in the event that this condition is not met. Add all necessary code to handle this exception. 7 marks) 5. In the driver class do the following operations: a. Create at least two Faculty objects using different constructors in (1). (2 marks) b. Demonstrate polymorphism and write an appropriate comment. (2 marks) c. Display all the properties of the objects you created to the screen. (2 marks) [3 marks 6. Comments, readability and use of conventions [END] person into Page 2 of 2 Dubire person implement departm department fault ad=newl mine enum

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!