Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

1. Create an application called Registrar that has the following classes:

A Student class that minimally stores the following data ?elds for a student:

- name

- student id number

- number of credits

- total grade points earned

The following methods should also be provided:

- A constructor that initializes the name and id ?elds

- A method that returns the student name ?eld

- A method that returns the student ID ?eld

- A method that determines if two student objects are equal if their student id numbers are the same (override equals from the class Obj ect)

- Methods to set and retrieve the total number of credits

- Methods to set and retrieve the total number of grade points earned

- A method that returns the GPA (grade points divided by credits)

An Instructor class that minimally stores the following data ?elds for an instructor:

- name

- faculty id number

- department

The following methods should also be provided:

- A constructor that initializes the name and id ?elds

- Methods to set and retrieve the instructor's department

A Course class that minimally stores the following data for a course:

- name of the course

- course registration code

- maximum number of 35 students

- instructor

- number of students

- students registered in the course (an array)

The following methods should also be provided:

- A constructor that initializes the name, registration code, and maximum number of students

- Methods to set and retrieve the instructor

- A method to search for a student in the course; the search should be based on an ID number.

- A method to add a student to the course. If the course is full, then an exception with an appropriate message should be raised (try creating your own exception class for this). Also, be sure that the student is not already registered in the course. The list of students should be in the order that they registered.

- A method to remove a student from the course. If the student is not found, then an exception with an appropriate message should be raised (use the same exception class mentioned above).

- A method that will allow Course objects to be output to a ?le using object serialization

- A method that will allow Course objects to be read in from a ?le created with Object serializtion

You will note that the Student and Instructor classes described above have some commonality. Create a Person class that captures this commonality and uses it as a base class for Student and Instructor. This class should be responsible for the name and id ?elds and also provide a toString method that returns a string of the form name, id. This will be the inherited toString method for the Student and Instructor classes.

a. Draw a UML diagram for this application.

b. Implement the previous classes in Java. Write a main program that can serve as a test class that tests all of the methods created and demonstrates that they are working.

c. Write a second main program that provides a menu to allow the user to

i. create a course, prompting the user for all of the course information,

ii. add students to the course,

iii. check to see if a student is registered in the course, and

iv. remove a student from the course.

d. Add to the previous menu the ability to save a course using object serialization.

Also add a menu choice to read in a course from a file given the course code.

Come up with a system of naming the file so that the user need only be asked the course code to load the course information from a file.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92054197
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Programming Language

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As