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

  Programming using the java language

Programming using the Java language. The basic concepts of object-oriented programming. Topics used will include algorithmic logic, control structures, data and program design, objects and classes.

  Write program to keep track of a hardware stores inventory

Write a program to keep track of a hardware store's inventory. The store sells various items. For each item in the store, the following information is kept: item ID, item name, number of pieces in stock, manufacturer's price of the item, and the s..

  Videorental store operatorrecord clients

Project is to design a program to help a videorental store operatorrecord clients' transactions - Design a primitive database indicating

  Tic-tac-toe game assignment

Assignment 1(Java): Tic-Tac-Toe Game (Assignment 1 is attached),  Use the concepts and scenario from Assignment 1 and continue with the tic-tac-toe game design and development.  Section 1: Java Program File, The following method, numPaths, is suppos..

  Write a java program and pseudocode to read a number

Write a java program and pseudocode to read a number up to 15 digits long or a date (dd/mm/yyyy). The program should distinguish numbers from input date, and prints them in alphabetic spelling form

  Executing stringed musical instrument class

Create and execute a stringed musical instrument class.

  Determines the surface area and volume of a hemisphere

Write an application that reads determines the surface area and volume of a hemisphere and then calculates the radius given a surface area and volume.The first step is to read in the radius from the users and then calculate the surface area and vo..

  Xml assignment help please follow instructions in the

please follow instructions in the attached assignment instructions. ltbrgtplease follow instructions in the attached

  Create a new project in ide named exceptionhandler

Write code to accept numbers as described above from the user. Your code should ensure that only numbers are accepted.

  Write a program to read a file and encode

Write a program to read a file and encode the file to an encrypted file. And write a program to get an encrypted file and decode to original file. Your program should prompt the user to enter an input file name and an output file name

  Describe the usefulness of the jframe class

What is a JFrame? Describe the usefulness of the JFrame class

  Write an algorithm for fining the middle node

Write an algorithm for fining the middle node of a doubly linked list given both the head and the tail of the list.And Write a  recursive  java function that counts the number of nodes in a circularly linked list.

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