Question Details

(solution) You will need to create five files complete this project and name


You will need to create five files complete this project and name them exactly as follows: Project5.java, Student.java, HighSchoolStudent.java,UndergraduateStudent.java, and GraduateStudent.java. TheProject5.java file will be the only file to contain a main() method. Each of the .java files and their associated classes are described below:

The Student Class

The Student class, which is stored in Student.java, will act as your parent class from which the different types of students will be derived from. This class must have the following members:

Fields for the following attributes

Name

ID Number

?Getter?/?Setter? methods for each attribute

public String getName()

public void setName(String n)

public String getIDNumber()

public void setIDNumber(int id)

A method that will return a String of all of the attributes for this object

public String toString()

An appropriate constructor

The constructor must initialize both fields of the Student object with the constructor?s parameters

public Student(String n, int id)

The HighSchoolStudent Class

The HighSchoolStudent class, which is stored in HighSchoolStudent.java, will be a child class of the Student Class. This class must have the following members:

A field for the following attribute

Name Of School

A ?getter? and ?setter? method for this attribute

public String getNameOfSchool()

public void setNameOfSchool(String schoolName)

A method that will return a String of all of the attributes for this object

public String toString()

An appropriate constructor

The constructor must initialize both fields of the Student object with the constructor?s parameters

public HighSchoolStudent(String n, int id, String schoolName)

The UndergraduateStudent Class

The UndergraduateStudent Class, which is stored inUndergraduateStudent.java, will also be a child class of the Student Class. This class must have the following members:

A field for the following attribute

Major

A ?getter? and ?setter? method for this attribute

public String getMajor()

public void setMajor(String major)

A method that will return a String of all of the attributes for this object

public String toString()

An appropriate constructor

The constructor must initialize both fields of the Student object with the constructor?s parameters

public UndergraduateStudent(String n, int id, String major)

The GraduateStudent Class

The GraduateStudent Class, which is stored in GraduateStudent.java, will be the final child class of the Student Class. This class must have the following members:

Fields for the following attributes

Major

Advisor

?Getter?/?Setter? methods for each attribute

public String getMajor()

public void setMajor(String major)

public String getAdvisor()

public void setAdvisor(String advisor)

A method that will return a String of all of the attributes for this object

public String toString()

An appropriate constructor

The constructor must initialize both fields of the Student object with the constructor?s parameters

public GraduateStudent(String n, int id, String major, String advisor)

The Project5 Class

The Project5 Class, which is stored in Project5.java, will hold the main method of your program. Your main method will first read in the words that make up your dictionary from a file, and will then create different Student objects based on the files that your program will read from. Your program will then grade the essay that the student has written. Your program should handle FileNotFoundException and print to the console as shown in the sample below!

Your main method will prompt the user to specify the file that hold the dictionary information. You will then attempt to open the file and input the contents of the file into an array to be used by the remainder of your program.

Your program will then ask the user to specify the name of the file that holds the student information. You will then attempt to open the file, create a Student object based on the information given in the file and read the student?s essay from the file.

The first line in the file will identify the classification of the student (High School, Undergraduate, or Graduate)

The following lines will supply the values for the attributes of the specific classification, such as Name, ID Number, and Name Of School for a High School Student.

The remainder of the file will be the essay that the student has written.

After everything is read from the student file, your program will grade the essay and output the result to a new file.

You will read though the essay and determine whether or not a word is misspelled. If a word is misspelled, deduct the appropriate number of points from the student?s grade. The grade cannot be negative!

You will write the output to a text file (ID_graded.txt) with the same format shown in the Sample Runs section, where ID is the ID of the person whose essay is being graded.

Once the grade has been recorded, your program will start again at Step 2. However, if you are done grading essays, the user will type ?Finished?.

Sample Essay File (saved as 11111111.txt)

Graduate Student

John Smith

11111111

Computer Science

Kyla McMullen

This esasy is not very long. I hope my advisor wont be agnry with me.

Sample Essay File (saved as 12345678.txt)

Undergraduate Student

Jane Doe

12345678

Mechanical Engineering

Writing an essay is hard. If I had a nickel for every misspeled word in this essay I would have exactly one nickel.

Sample Essay File (saved as 99999999.txt)

HighSchool Student

Allen Anderson

99999999

Gainesville High School

Shall I compear thee to a summer's day?

Thou art more lovely and more temparate:

Rough winds do shake the darling buds of May,

And summer's leese hath all too short a date

Sample Output File (saved as 11111111_graded.txt)

Graduate Student John Smith

Student ID: 11111111

Major: Computer Science

Advisor: Kyla McMullen

Received a score of 90 with 2 misspelled words:

(1)esasy

(2)agnry

Sample Output File (saved as 12345678_graded.txt)

Undergraduate Student Jane Doe

Student ID: 12345678

Major: Mechanical Engineering

Received a score of 97 with 1 misspelled words:

(1)misspeled

Sample Output File (saved as 99999999_graded.txt)

High School Student Allen Anderson

Student ID: 99999999

Name of School: Gainesville High School

Received a score of 96 with 4 misspelled words:

(1)temparate

(2)winds

(3)buds

(4)leese

Sample Run (input in red)

Please specify the name of the file that contains the dictionary information.

pineapple

File pineapple cannot be found!

Please specify the name of the file that contains the dictionary information.

dictionary

File opened successfully!

Please specify the ID of the student whose essay will be graded.

11111111

File opened successfully!

Please specify the ID of the student whose essay will be graded.

12345678

File opened successfully!

Please specify the ID of the student whose essay will be graded.

pokemon

File pokemon cannot be found!

Please specify the ID of the student whose essay will be graded.

Finished

Other Important Notes:

Please make sure to mimic the output in the Sample Runs, you guys know the drill by now. Also please be sure to name your files appropriately. In addition, make sure to comment your code. If your program needs to be regraded manually, it would benefit your grade if your TA were to actually be able to understand what you are trying to accomplish.

Submission Requirements

  • Name the classes described above as Project5.java, Student.java,HighSchoolStudent.java, UndergraduateStudent.java, and GraduateStudent.java
  • This time we actually want you to create a folder since more than one file is being submitted. To do this, please read and follow these instructions :

Create a new folder and name it ?Project5?

Insert the 5 Java files Project5.java, Student.java,HighSchoolStudent.java, UndergraduateStudent.java, and GraduateStudent.java into the folder that you just created in the previous step

Zip the entire folder. Reminder: You are zipping the folder that is named Project5. After you zip it, please rename the zipped file such that it is named project5_ulfid.zip where uflID is the alphanumeric portion of your ufl email account that comes before the <..>@ufl.edu part.

 


Solution details:

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Sep 13, 2020

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.

Order Now