Create an application called registrar

Assignment Help JAVA Programming
Reference no: EM13810067

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.

Reference no: EM13810067

Questions Cloud

Process of freezing : She left the other on high. Which will cook more quickly, the potatoes on high, the potatoes on low, or will they cook at the same rate? Explain your reasoning.
Sold to food packaging companies : Wisconsin Canning manufacturers decorative cans that store various food products such as candies, pretzels, and cookies.   The finished cans are sold to food packaging companies that fill the cans.  In making the actual cans, minus the lid, there ..
Write a paper report on an airport of your choice : Write a paper report on an Airport of your choice.
Compare and contrast the parties'' goals in specific area : summarize each of the three parties' policy goals in your issue area. Compare and contrast the parties' goals in that area. Evaluate each party's goals from two perspectives:
Create an application called registrar : Create an application called Registrar that has the following classes: A Student class that minimally stores the following data ?elds for a student and An Instructor class that minimally stores the following data ?elds for an instructor
Imitability of a resource : Imitability of a resource can occur through:
Write an essay about sharks eating habits and attacks : Write an essay about Sharks eating habits and attacks.
Effects of cortisol release on the human body : Describe the stress response and the effects of cortisol release on the human body. (With which division of the nervous system is the stress response associated?)
Bioterrorism thesis paper for nyanya : Bioterrorism thesis paper for nyanya

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program that reads in a list of numbers from a file

write a program that reads in a list of numbers from a file and adds up all those numbers. You may hard code in the name of the file, allowing the user to input the filename is not required

  Given an array with 100,000 entries to sort

Sorting  given an array with 100,000 entries to sort. Under what circumstances would you use each of the following: insertion sort,mergesort'quicksort

  Method that accepts a string object

Word Counter Write a method that accepts a String object as an argument and returns the number of words it contains. For instance, if the argument is "Four score and seven years ago" the method should return the number

  Echo client-server application

ASSIGNMENT 1- An echo client-server application, You are required to develop an application that allows clients running on MS Windows platforms to send sequences of strings to an echo server running on a windows platform

  Compare the average completion times of all jobs

Compare the average completion times of all jobs for each scheduling algorithm. Output the details of each algorithm's execution. You need to show which jobs are selected at what times as well as their starting and stopping burst values. You can choo..

  Executing stringed musical instrument class

Create and execute a stringed musical instrument class.

  Using netbeans, use repetition to display a table of values

Using Netbeans, use repetition to display a table of values showing x, the square of x and the cube of x. X is to go up to 5.

  Write a number guessing game in java

ou have to write a number guessing game in Java. The program should have three difficulty levels, each one having a different maximum number. After the user selects a difficulty,

  Define a piece of dna sequence

Please consider the features of Java classes, and then define a Java class for a DNA sequence object to include instance variable names and methods that you can use to define a piece of DNA sequence

  Implement a game called bunko-poker

Implement a game called Bunko-Poker. The gameplay is an easily programmed version of the popular game Yahtzee. Your program will make use of the supplied static functions Dice.roll() and, in cases where you might need the string ordered, Dice.ordered..

  Write a java program that uses the elapsed time

Write a Java program that uses the elapsed time for an event in second and then outputs the elapsed time in hours, minutes and seconds. (For example, if the desired time is 9630 seconds, then the output is 2: 40: 30)

  This is a client server monitoring system project

this is a client server monitoring system project design.first in the server side the 1a program is my own and i have

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd