Question

In: Computer Science

Assume that the Student class is part of a generalization/specialization hierarchy, with University Person as a...

  1. Assume that the Student class is part of a generalization/specialization hierarchy, with University Person as a general class. What attributes would Student inherit from University Person? What are attributes are unique to the Student class, which all University Persons would not have?

Solutions

Expert Solution

University Person Attributes :-

Variables:-

name : String

address : String

Age : int

phoneNo : int

email : String

Methods:-

getName() : String

getAddress() : String

setAddress() : String

getAge() : int

setAge() : int

-----------------------------------------------------------------------

Student class inherits above university persons attributes .

-----------------------------------------------------------------------

The attributes that are unique to the Student class are given below

Student Attributes :-

Variables:-

numCourse : int

course : String[]

StudentId : int

grades : int[]

yearOfStudy : int

Methods:-

enrollCourse(course : String) : void

payTution( fee:int) : void

dropCourse(course : String) : void

addCourseGrade( course : String , grade:int ) : void

printGrades() : void

getAverageGrade() : double

----------------------------------------------------------------------------

Thank you.

  


Related Solutions

Give an example that explains the generalization versus specialization in object orientated context.
Give an example that explains the generalization versus specialization in object orientated context.
C++ Programming. Create a class hierarchy to be used in a university setting. The classes are...
C++ Programming. Create a class hierarchy to be used in a university setting. The classes are as follows: The base class isPerson. The class should have 3 data members: personID (integer), firstName(string), and lastName(string). The classshould also have a static data member called nextID which is used to assignanID numbertoeach object created(personID). All data members must be private. Create the following member functions: Accessor functions to allow access to first name and last name (updates and retrieval). These functions should...
Answer to the following questions. 1.What is Generalization and Specialization 2. What is a Recursive Relationship...
Answer to the following questions. 1.What is Generalization and Specialization 2. What is a Recursive Relationship 3. What is the purpose of a query and What is a stored procedure 4. What is an index  
What is the enhanced ER Model? Explain extended ER features: Specialization, Generalization, and Aggregation with your...
What is the enhanced ER Model? Explain extended ER features: Specialization, Generalization, and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them?
Draw the class diagram of University; University (name and location etc) is maintaining the student affairs,...
Draw the class diagram of University; University (name and location etc) is maintaining the student affairs, faculty or non-faculty record, student record, hostel management, route management etc. University has a chancellor and different departments. Faculty and non-faculty members are the part of each department. Minimum 2 or 3 attributes and operations of each class. Show the cardinality or multiplicity constraints as well.
What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear...
What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them.
What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear...
What is enhanced ER Model? Explain extended ER features: Specialization, Generalization and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them.
Let X be the height of a student to be randomly selected at the University. Assume...
Let X be the height of a student to be randomly selected at the University. Assume (for the purpose of modeling) that X has the normal distribution with a mean of 68 inches and a standard deviation of 4.9 inches. a.) What is the probability a randomly selected student is shorter than 65 inches? b.) What is the probability a randomly selected student is taller than 73 inches? c.) What is the probability a randomly selected student's height falls within...
Let X be the height of a student to be randomly selected at the University. Assume...
Let X be the height of a student to be randomly selected at the University. Assume (for the purpose of modeling) that X has the normal distribution with a mean of 68 inches and a standard deviation of 4.9 inches. a.) What is the probability a randomly selected student is shorter than 65 inches? b.) What is the probability a randomly selected student is taller than 73 inches? c.) What is the probability a randomly selected student's height falls within...
A student with an eight​ o'clock class at a university commutes to school by car. She...
A student with an eight​ o'clock class at a university commutes to school by car. She has discovered that along each of two possible routes her traveling time to school​ (including the time to get to​ class) is approximately a normal random variable. If she uses the highway for most of her​ trip,μ=22 minutes and σ=5 minutes. If she drives a longer route over city​ streets, μ=26 minutes and σ=33 minutes. Which route should the student take if she leaves...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT