Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed

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

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_2

Step: 3

blur-text-image_3

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

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions