Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve q1.a Q1. Suppose we have a University System. The university has three departments CS, IT and CNET. Each department has students, the students can

solve q1.a

image text in transcribed

Q1. Suppose we have a University System. The university has three departments CS, IT and CNET. Each department has students, the students can be regular students or irregular students. Following are the classs and attributes in the university system: (4 Marks) Class University, Fields: University_Name, University Type, Location. class IT_Dept, Fields: Dept_code. class CS_Dept, Fields: any 2 fields class CNET_Dept, Fields: any 2 fields class Student, Fields: studentName, studentID. Class Reglar Student, Fields: any fields of your choice Class Irregular Student, Fields: any fields of your choice class Staff Members , Fields: staffid. a) Define all the given classes and Draw an inheritance relationship between the classes in a best possible way. The University class should have a list of staff members, use ArrayList. All the methods in the university class should be declared as protected. b) Declare a method display() in the university class and override the display() method in all subclasses. c) In class CS_Dept, show how the call to a base class contrcutor is made

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

Example. Evaluate 5n+7 lim 7-00 3n-5

Answered: 1 week ago