Ask Java Expert


Home >> Java

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

Java, Programming

  • Category:- Java
  • Reference No.:- M91335500
  • Price:- $50

Guranteed 36 Hours Delivery, In Price:- $50

Have any Question?


Related Questions in Java

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

  • 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