Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Construct code for storing a college database using an appropriate class hierarchy. The people associated with the college are generally classified as students or employees,

Construct code for storing a college database using an appropriate class hierarchy. The people associated with the college are generally classified as students or employees, and employees are further subdivided into faculty and staff. All people will have names and email addresses in the database. Write an appropriate abstract class Person that is a superclass of Student. Students have year (freshman, sophomore, junior, or senior), major (Computer Science, Mathematics or English), and grade point average (0.0 to 4.0). Write appropriate accessor and mutator methods for displaying and modifying the data in both classes. The Dean of the college has decided that participation in band will be mandatory for all students. Students will be assigned instruments based on year: freshmen will play bells, sophomores will play trumpet, juniors will play baritone, and seniors will play tuba. Write code that will read the student database and create a new database that includes all student information (including instrument) except grade point average (a placeholder value such as 0 can be used instead, if needed). The new database should use a class that does not include mutator methods for changing anything except for instrument, and your code should include a static method that displays the band roster. You may write a BandMember class that extends the Student class and overrides the mutator methods so that they are nonfunctional, or you may create a separate BandMember class that does not extend Student. Your code should create a student database and use it to create a new database of band members, then it should display the band roster, including name, email address, instrument, and major.

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

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions