Ask Java Expert


Home >> Java

After hearing the excellent job you have done designing software solutions for entities in and around campus, your work comes full circle when the University of Florida English department asks you to create an autograder for its introductory class. There are many types of students who are taking this class. Some are high-achieving high school students, some UF undergraduate students, and some graduate students who need a refresher. They would like to create a parent object that can be extended to provide functionality for a number of kinds of students. The department would also like to have the ability to supply the name of a file containing an essay (as a numeric ID) and have you grade the essay, by deducting an appropriate number of points for every word that is misspelled. After reading in the UF ID, which you will use to open the correct essay file, you will create an output file that contains the student's grade.

Objective

Read in the file given

Count the number of misspelled words

Deduct points accordingly for each misspelled word.

-1 High School Student, -3 College Student, -5 Graduate Student

Generate an output file that contains the student's graded output

Your Assignment

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 ClassThe 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 ClassThe 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 ClassThe GraduateStudent Class, which is stored in GraduateStudent.java, will be the final child class of the Student Class. This classmust 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 ClassThe 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!

Java, Programming

  • Category:- Java
  • Reference No.:- M91616226

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