Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For todays lab you will create a java project that will contain a main class called Tester and a Class called Student.Your Student class should

For todays lab you will create a java project that will contain a main class called Tester and a Class called Student.Your Student class should contain the following: 1.Properties make these privatea.studentId (int), uniqueId (String), firstName (String), lastName (String), t1 (int), t2 (int), t3 (int), t4 (int)

2.Methods make these public and write the codea.4 Constructors:empty, workhorse, copy, and a constructor that accepts a Scanner objectb.equals()c.getters and setters for your properties (note: make sure each test grade (e.g., t1) cannot be set lower than 0 or greater than 100)d.save(PrintWriter pw) and read(Scanner fin)e.getAverage()f.toString() this should return a well formatted string.

Code:

3. Your Student code should be complete and have sections. It will have the ability to load 1 record from a given open text file, control what data is going to be restricted to a range, ability to write its data back to an open file, and everything else we completed in class notes today.

4.Put the code author(s) name at the top of your Tester file by typing: /** above the line: public class Student { and then hitting enter. Add an additional @author if you are working with a partner

5.In Tester create a static ArrayList that will store Student objects and call it students. Make sure it is coded just above your main() method

6.In your main() method create the code that will open the provided text file: Lab_01-StudentData.txt and read in each student record into a Student object and add that Student to the array list - dont forget the try{} catch{} finally{}

7.Once you have read in all student records calculate and print the following:a.Total studentsb.Overall student body averagec.The number of As, Bs, Cs, Ds, and Fsd.The name and average of all students that received an A

8.Your output should look exactly like the following give or take spacing (FYI: these are the correct values)

Total Students: 1000

Total Average : 49.3175

Total A's : 2

Total B's : 9

Total C's : 70

Total D's : 160

Total F's : 759

All "A" Students:

Evangelina Crockett 90.25

Stavros Fozard 91.75

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

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

What fonts does Java guarantee you have?

Answered: 1 week ago