Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Assignment #1 Create a class called Student that stores a students name, student ID number, class name, numerical average, and letter grade associated with

Programming Assignment #1

Create a class called Student that stores a students name, student ID number, class name, numerical average, and letter grade associated with that average. Create a default constructor, and a constructor to accept a value for the students name, id, and class and assign a default value to the average and letter grade. Make sure the appropriate getters and setters are in the class. Be sure to handle determining the letter grade within the class.

Create an application for a teacher that creates an ArrayList of Student objects. This application should allow the teacher to enter 10 grades for each student and compute the average based on these grades. Be sure each grade is between 0 and 100. The information for the student should be stored in a Student object. Allow the teacher to enter information for as many students as needed. The teacher must also have the option to display a roster (names), display names and letter grades, display all information for each student, delete a student from the roster that moves away, update student information such as computing a new average, and add a new student. Create a menu to allow the teacher to choose which activity to complete. Continue the program until the teacher (user) is ready to quit.

You may add other functionality you consider relevant but be sure to include what is listed above at a minimum. Be sure to make use of static methods in your application.

Be sure to test your program with various input values. Make sure your program is properly documented using comments where needed. Note that this project must be done individually. The program will be checked using a code plagiarism tool against other solutions, so please ensure that all work submitted is your own.

You may read and write from the console window. Make sure your input and output are formatted nicely and easy to read.

This what I have so far:

Student.java

public class Student {

//Declare private fields - student name, student ID, class name, numerical average, letter grade

private String name;

private int id;

private String class;

//Numerical Average

private int gradeAverage;

private char letterGrade; (I'm not sure if this is written correctly)

//Default constructor

public studentReport ()

{

gradeAverage = 0;

letterGrade = F;

}

//Another constuctor

public studentReport (String name, int id, String class)

{

this.name = name;

this.id = id;

this.class = class;

}

//Declare set methods

public void set name (String studentName)

{

name = studentName;

}

public void set id (String studentID)

{

id =studentID;

}

public void set class (String className)

{

class = className;

}

//Declare get methods

public getname ()

{

return studentName;

}

public getid ()

{

return studentID;

}

public getgradeAverage()

{

Question: this is where I stopped because I got confused. I know a formula belongs here because i need to calculate the average.

I just don't know how to. Do i add another variable here for the individual grades? How do I add all the grades together if the teachers input varies from 1 to 10?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

Students also viewed these Databases questions