Develop a menu driven console java program

Assignment Help JAVA Programming
Reference no: EM132990545

COIT 20245 Introduction to Programming - Central Queensland University

Assessment - JAVA Program using array of objects

Details
For this assignment, you are required to develop a Menu Driven Console Java Program to demonstrate you can use Java constructs including input/output via the console, Java primitive and built-in types, Java defined objects, arrays, selection and looping statements and various other Java commands. Your program must produce the correct results.

The code for the menu and option selection is supplied: GradingSystemMenu.java and is available on the unit website, you must write the underlying code to implement the program. The menu selections are linked to appropriate methods in the given code. Please spend a bit of time looking at the given code to familiarise yourself with it and where you have to complete the code. You will need to write comments in the supplied code as well as your own additions.

Assignment Specification
You have completed the console program for processing grade of students for COIT20245. We are going to extend this application so the students name, student number, marks and grades can be stored in an array of objects, do not use ArrayList.

The program will run via a menu of options, the file GradingSystemMenu.java has been supplied (via the Moodle web site) which supplies the basic functionality of the menu system.

Look at the code supplied and trace the execution and you will see the menu is linked to blank methods (stubs) which you will implement the various choices in the menu.

Student class
First step is to create a class called Student (Student.java).

The Student class will be very simple it will contain seven private instance variables:
o studentName as a String
o studentID as a String
o assignmentOneMarks as double
o assignmentTwoMarks as double
o takeHomeExamMark as double
o individualTotalMarks as double
o grade as a String
The numeric literal values, like P=50.00, HD=85.00 must be represented as constants. The following public methods will have to be implemented:
o A default constructor
o A parameterised constructor
o Five set methods (mutators)
o Five get methods (accessors)
o A method to calculate total marks and return student's total marks as double - calculateIndividualTotalMarks(). This calculation will be the same as in assignment one.
o A method to calculate grade and return the grade as String - calculateGrade(). This calculation will be the same as in assignment one. Use constants for all numeric literals.

Note: Following basic database principles, calculated values are not usually stored, so in this case we will not store the grade as a instance variable, but use the calculateGrade() method when we want to determine the grade.

GradingSystemMenu class
Once the Student class is implemented and fully tested we can now start to implement the functionality of the menu system.

Data structures
For this assignment we are going to store the students names, student number and assessment marks an array of Student objects.
Declare an array of Student objects as an instance variable of GradingSystemMenu class the array should hold ten students.
You will need another instance variable (integer) to keep track of the number of the students being entered and use this for the index into the array of Student objects.

Menu options
1. Enter students name, student number and assessment marks: enterStudentRcord() You will read in the student's name, student number and assessment marks as you did in assignment one.

Data validation (you can implement this after you have got the basic functionality implemented) You will need to validate the user input using a validation loop.
The student's name and student number name cannot be blank i.e. not null and the assessments marks needs to be within the range of (0-assessment weighting), the same as assignment one.

When entering record of student's name, student number and assessments marks, the student have been entered successfully into five local variables you will need to add these values into the Student

object array, you will also need to increment a counter to keep track of the number of students you have entered and the position in the array of the next student to be entered.
When the maximum number of students record is reached do not attempt to add any more student's record and give the following error message:

When the student details have been successfully entered, display the details of the student and the charge as follows:

Note: For the next three options, display all, statistics and search you should ensure at least one student's record has been entered and give an appropriate error message if it there are no students record entered and for the sorting option you must ensure at least two student records have been entered, for example:

2. Display all student's name, student number, assessment marks and grade:

displayAllRecordsWithGrade()

When this option is selected display all the records with grade which have been entered so far.

3. Display statistics: displayStatistics()
When this option is selected you will display the statistics as per detailed in assignment one document. You can loop through your array of objects to calculate this information.

4. Search for a student record: searchStudentRecords()
You can just use a simple linear search which will be case insensitive.

If the search is successful display the details about the student record as below.

If the search is unsuccessful display an appropriate message.

5. Sort the student records: sortStudentsRecrod()

This option you will sort the records alphabetically (ignore case) by the student's name, you can use any sorting algorithm which you like, do not use any in-built sort methods. Display the sorted list after the sort is complete.

Remember the welcome and exit messages as per assignment one.

Attachment:- Introduction to Programming.rar

Reference no: EM132990545

Questions Cloud

Environmental protection agency : Some organizations assign Environmental Protection Agency (EPA) hazardous waste compliance responsibilities to the occupational safety
Prepare journal entry to record transaction as at january : Prepare the journal entry to record transaction as at the 1 January 2019. Please show all workings. Marks will be allocated for workings.
Gilligan care perspective in moral development : Discuss the difference between Kohlberg's justice perspective and Gilligan's care perspective in moral development.
How much is the revaluation surplus : The estimate of residual value remained unchanged. How much is the revaluation surplus, net of tax, on December 31, 2021
Develop a menu driven console java program : Develop a Menu Driven Console Java Program to demonstrate you can use Java constructs including input/output via the console, Java primitive and built-in types
Find conversion cost per equivalent unit for month of march : Find the conversion cost per equivalent unit for the month of March. At the end of the month there were 8,000 units completed and transferred into the Finished
Osha safety and health management guidelines : Using OSHA's Safety and Health Management Guidelines, which element would you find most effective, and why?
What amount should be recognized as deferred tax asset : What amount should be recognized as deferred tax asset on Norman Company's Balance Sheet for the year end, December 31, 2020
Determine the cost per unit transferred to finished goods : Atlantis uses the weighted-average process costing method. Use this information to determine the cost per unit transferred to finished goods for the month

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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