Purchase Solution

Java code - college members classes

Not what you're looking for?

Ask Custom Question

Im studying for my finals in Java programming 1.
Im struggling with the attached practice question. I need to write a code for this example.
Can you please ENSURE you add COMMENTS to the code so I can understand how it works. AND also following exactly the instructions in the attachment PLEASE.

The File name is task2 and NOT task1

-

Develop a set of classes for a college to use in various student service and personnel applications. Classes you need to design include following:

- Person: A Person contains a first name, last name, street address, zip code, and phone number. The class also includes a method that sets each data field and display method that displays all of a Person's information.
- CollegeEmployee: CollegeEmployee descends from Person. A CollegeEmployee also includes a Social Security number, an annual salary, and a department name, as well as methods that override the Person methods to accept and display all collegeEmployee data.
- Faculty: Faculty descends from ColegeEmployee. This class also includes a Boolean field that indicates whether the Faculty member is permanent, as well as methods that override the CollegeEmployee methods to accept and display this additional piece of information.
- Student: Student descends from Person. In addition to the fields available in Person, a Student contains a major field of study and a grade point average as well as methods that override the Person methods to accept and display these additional facts.

Write a test Java program named CollegeList that declares an array of four "regular" CollegeEmployees, three Faculty, and seven Students. Prompt the user to specify which type of person's data will be entered ('C', 'F', or 'S' indicates CollegeEmployee, Faculty, and Student respectively) or allow the user to quit ('Q'). While the user choose to continue (that is, does not quit), accept data entry for the appropriate type of Person. If the user attempts to enter data for more than four CollegeEmployees, three Faculty, or seven Students, display an error message. When the user quits, display a report on the screen listing each group of Persons under the appropriate heading "College Employees," "Faculty," or "Students." If the user has not entered data for one or more types of Persons during a session, display an appropriate message under the appropriate heading.

Save the files as Person.java, CollegeEmployee.java, Faculty.java, and Student.java, and CollegeList.java.

Purchase this Solution

Solution Summary

A Java program is written which contains classes which descend from other classes. Finally main method invoke a few objects of these classes as per requirements.

Solution provided by:
Education
  • BEng, Allahabad University, India
  • MSc , Pune University, India
  • PhD (IP), Pune University, India
Recent Feedback
  • " In question 2, you incorrectly add in the $3.00 dividend that was just paid to determine the value of the stock price using the dividend discount model. In question 4 response, it should have also been recognized that dividend discount models are not useful if any of the parameters used in the model are inaccurate. "
  • "feedback: fail to recognize the operating cash flow will not begin until the end of year 3."
  • "Answer was correct"
  • "Great thanks"
  • "Perfect solution..thank you"
Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.