This project is designed to exercise all the java tools

Assignment Help JAVA Programming
Reference no: EM13765730

Purpose

This project is designed to exercise all the Java tools that you have learned about this term: classes/objects, variables, decision constructs, loops, arrays, encapsulation, overloading, inheritance, error handling, and application deployment.

Assignment

You are to create a Java application that keeps track of school courses. Your Course class is composed of Persons of 2 types: Instructors and Students. A Course can only have 1 Instructor but it can have 5-10 Students. I recommend you build and test your classes in the following order: Person, Instructor, Student, Course.

Course Class Properties and Behaviors

· Properties or attributes
o Course Title
o Instructor (1) of type Instructor
o Students (5-10) array of type Student
o Current Number of students
o Maximum Number of students
o Average grade //in points using a 0-100 scale
o Highest grade //in points using a 0-100 scale
o Lowest grade //in points using a 0-100 scale

· Behaviors or methods

o Constructor that allows all the following attributes to be initiated when a Course object is instantiated: Course Title, Instructor and Maximum Number of Students in the class.

o Setter and getter methods for Course Title and Instructor
o addStudent() method for Students (which adds a student to the Students array)
o Getter method for Current Number of Students
o The following getter methods which all return a double value
* getAverageGrade() //returns the average grade of the class
* getHighestGrade() //returns the highest grade of the class
* getLowestGrade() //returns the lowest grade of the class
o Overload the Object toString method to print out the following:
* Course Title
* Instructor: Title Firstname Lastname
* Student Roster:

//for each student print out first and last name, student ID, and grade
* Number of students: __
* Average grade: __
* Highest grade: __
* Lowest grade: __

Person Class Properties and Behaviors

· Properties or attributes
o First name
o Last name

· Behaviors or methods
o Constructors
Default no-argument constructor
2-argument constructor that sets the first and last name attributes
o Setter and getter methods for each attribute
o Override Object's default toString() method to print out "FirstName LastName"
Student Class Properties and Behaviors (inherits Person class)
· Attributes
o Student ID
o Grade //0-100 point scale
· Methods
o Constructors
Default no-argument constructor
4 Argument constructor (First Name, Last Name, Student ID, Grade)
o Setter and getter methods for all attributes
o Create a getLetterGrade method that returns a letter grade instead of a point value: 0-59 F, 60-69 D, 70-79 C, 80-89 B, and 90-100 A
o Overload toString to print out the following: First name, Last name, Student ID, and Letter grade
Instructor Class Properties and Behaviors (inherits Person class)
· Attributes
o Title (Prof or Dr.)
· Methods
o Constructors
* Default no-argument constructor
* 3-argument constructor (First Name, Last Name, Title)
o Setter and getter methods for all attributes
o Overload toString to print out the following: Title Firstname Lastname

Additional Instructions

Your program must use the following Java capabilities:
· Inheritance (is-a relationships)
· Composition (has-a relationships)
· Decision constructs
· Arrays
· Loops (to include at least 1 enhanced for-loop)
· Error handling (catch the ArrayIndexOutOfBoundsException)
· Overloaded methods and constructors
· Encapsulation

Create a CourseTest class to demonstrate your project. Your CourseTest class must create at least 2 Course objects with different instructors and 5 students. Every method in every class must be demonstrated (the best way to do that is to use setter methods in your constructors to show that they work and use getter methods in your toString methods to show that they work whenever the toString method is called). You must also attempt to add an 6th student to 1 of your courses to demonstrate your try/catch implementation for ArrayOutOfBoundsException.

Run your CourseTest class and paste screen shots of the output into a Word document to show it working. Turn in the following:
· Word file showing the results of your test runs (screen shots)
· Source (.java) files
· Compiled (.class) files
· The deployable JAR file

Reference no: EM13765730

Questions Cloud

Aspects of budget deficits and surpluses : What are the positive and negative aspects of budget deficits and surpluses? What policy is best for today's economy? Explain your answer.
Write essay that discuss erdrichs use of symbolism in story : Write an essay that discuss Erdrich's use of symbolism in the story by identifying three major symbols. Review your definition of "symbolism."
Discuss in detail the goals of penology theory : Assignment: Centervale State Penitentiary Management of Prison Violence, Define and discuss in detail the goals of penology theory and integrate the discussion with the overarching goal of prison management and leadership
Interest-earning savings accounts and treasury bills : What determines whether a financial asset is included in the M1 money supply - Why are interest-earning checkable deposits included in M1, whereas interest-earning savings accounts and Treasury bills are not?
This project is designed to exercise all the java tools : This project is designed to exercise all the Java tools that you have learned about this term: classes/objects, variables, decision constructs, loops, arrays, encapsulation, overloading, inheritance, error handling, and application deployment.
Fraction of the demand and savings deposits : Why are banks able to maintain reserves that are only a fraction of the demand and savings deposits of their customers? Is your money safe in a bank? Why or why not?
Which helping professionals are currently involved in case : Identify and discuss which helping professionals are currently involved in the case and which helping professionals you believe ought to be involved in the case. Explain why.
Evolution of the telecommunications industry : The World Wide Web the best know example of a WAN that's why once a WAN is in place, WAN security must be implemented. Some methods for securing WANs include firewalls, routers with access control lists, and intrusion detection systems
Describe the ethical system that applies : Research a government official who has been charged with ethics violations. explain the issues in terms of the ethics associated with the Criminal Justice system and describe the ethical system that applies in this ethics violation(s)

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program called inheritancetest java

Write a program called InheritanceTest.java to support an inheritance hierarchy for class Point-Square-Cube. Use Point as the superclass of the hierarchy. Specify the instance variables and methods for each class.

  Java application prompt user to put in integer from keyboard

Write a java application that performs the following task: prompt user to put in an integer from the keyboard, search for the user input from the array created in step 1.

  A program that reads a four-digit number from the keyb

Write a program that reads a four-digit number from the keyboard as a string and then converts it into decimal. For example, if the input is 1100, the output should be 12. Hint: Break the string into characters and then convert each character to a va..

  Draw a uml diagram of each of the shapes

Draw a UML diagram of each of the Shapes, Rectangle and Square classes using the code that has been provided. Complete this using the examples that have been provide in the lecture slides.

  Implement the finite field gf

Write a program called "GF2.java" to implement the finite field GF(p n )where p is a prime number andn is a positive integer.You also need to write four methodsto realize.

  Class to initialize values

Create a constructor that allows a user of the class to initialize values. Also create a method named SetJustSold()(Hint ++) that increments the number of hot dogs the stand has sold by one and should also increase the TotalSold by one

  Text file containing the data

This program should begin by asking the user for the name of a text file containing the data. Then read the data which will be a line containing the dimensions of a 2 dimensional array followed by a 2 dimensional array of ints. Then perform variou..

  Create a form that contains a guessing game

Create a Form that contains a guessing game with five RadioButtons numbered 1 through 5.  Randomly choose one of the RadioButtons as the winning button.  When the user clicks a RadioButton, display a message indicating whether the user is correct.

  What is the greatest common divisor

What is the greatest common divisor of the Fibonacci numbers f100 and f101 by Euclid algorithm.

  Write a program displaying a text file that is in a text are

Write a program displaying a text file that is in a text area. The user enteres a file name in a text field and clicks the view button; the file is then displayed in the text area. Do not use BufferedInputStream.

  Create an application with a jframe

Create an application with a JFrame that holds five labels describing reasons that acustomer might not buy your product (for instance, "Too expensive").

  Implement the application using a singly linked list

Implement the following application using a singly linked list. This application accepts from console and stores a list of 10 names of your friends in the singly 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