Expert answer:Application of Programming in Java Project

  

Solved by verified expert:Please make some change with my code(see attachment) to follow these question below. **MOST PART OF THESE PROJECT ARE SAME, JUST DO SOME MODIFY**Task 1, Value: 8 marksIn this task, you are required to provide the definition of a class called Student, which represents a typical (but limited) university student.Each student has a name (which consists of a string of characters – for example: Janet May or Neil Kirby), a unique student identification (ID) number (consisting of a string of exactly seven numerical digits – for example: 1167895 or 8880123) and a course they are enrolled in (consisting of exactly three uppercase alphabetic characters – for example: MIT or BIT).You are also required to define a class called TestStudent, which will be used to perform a number of test used to among other things, verify the correctness of the Student class.In order to maintain the uniqueness of the student ID, your program will need to check that any new IDs supplied by the user is not the same as any of the existing student IDs. The program should also ensure that the student IDs and course names conform to the format specified above. Following area list of specifications of the Student class:Two fields name,id and course representing the student name, student ID and course respectively as described aboveGet and set methods for each field (getName(), getId(),getCourse(),setName(), setId(), setCourse())A toString() method that returns a string description of a given student objectAn isValidId() method which accepts a string representing a possible new student ID as an argument and returns a boolean value (true or false) indicating whether the new ID satisfies the structural requirements of the student ID or notA idExists() which accepts a string argument representing a possible new student ID and returns a boolean value indicating whether the new ID is already being used by another student or notAn isValidCourse() method which accepts a string representing a possible new course as an argument and returns a boolean value (true or false) indicating whether the new course name satisfies the structural requirements of the course or notYour TestStudent class should be able to perform the following functions:Create an ArrayList object of Student objects called studentList, using the student data stored in a text file named students.txt (you should create this file such that it stores the student name, ID and course of several students initially – one line per student)Allow the user to add as many new Student objects as the user requests to the ArrayList ensuring that each student has a unique student IDWhen the user has finished adding new students to the list, the program will override the students.txt file such that it includes the data relating to the new students as well as the original onesAbility to display a full list of students as well as just the existing student IDs when necessaryEnsure that the program is appropriately documented throughout and thoroughly tested to demonstrate its correct operation.Task 2, Value: 12 marksIn this task, you are required to provide complete class definitions and then create instances of various classes and use methods to perform various tests. (a) Define an abstract class called Staff with the following fields and methods:Fields: name, id, status representing the name, staff id and the status (full, part or casual) of a staff member in an organisation. Encapsulation should be used to protect these fields against intentional or accidental, direct modificationConstructors: a no-args/default constructor, and an overloaded constructor to initialise the fields to appropriate values when the instances of the class are createdMethods: a toString() method to print a string representation of the objects, get and set methods to provide access to each of the three fields(b) Define a subclass of the Staff class called FullTimeStaff with the following additional field and methods:Field: researchArea,a string variable representing the research are of the staff member. Again, encapsulation should be used to protect this field against intentional or accidental, direct modificationConstructors: a no-args/default constructor, and an overloaded constructor to initialise the fields to appropriate values when the instances of the class are createdMethods: a toString() method to print a string representation of the objects, additional get and set methods as required to provide access to the field(c) Define a subclass of the Staff class called PartTimeStaff with the following additional field and methods:Field: timeFraction representing the time fraction of a part-time staff member. This would be a number between 0.1 and 1.0. Again, encapsulation should be used to protect this field against intentional or accidental, direct modificationConstructors: a no-args/default constructor, and an overloaded constructor to initialise the fields to appropriate values when the instances of the class are createdMethods: a toString() method to print a string representation of the objects, additional get and set methods as required to provide access to the field(d) Define another subclass of the Staff class called CasualStaff with the following additional field and methods: Field: hours,an integer variable representing the number of hours that the casual staff member works at the organisation. Again, encapsulation should be used to protect this field against intentional or accidental, direct modificationConstructors: a no-args/default constructor, and an overloaded constructor to initialise the fields to appropriate values when the instances of the class are createdMethods: a toString() method to print a string representation of the objects, additional get and set methods as required to provide access to the field(e) Finally, define another class called TestStaff with a main() method to perform necessary testing for the classes defined in the previous sections. In the main method, write the code to: (1) create an ArrayList object to store references to Staff objects; (2) open a text file named staff.txt (available on interact resources), which contains data relating to staff members, create FullTimeStaff, PartTimeStaff and CasualStaff objects based on the first field in each row in the file (“full”, “part”, or “casual”); (3) add these objects to the ArrayList; and (4) test various methods of the objects using loop(s) and methods as necessary, including the code to:Repeatedly display a menu of five options (1, 2, 3, 4 and 5) such thatOption 1 will display details of only full-time staffOption 2 will display details of only part-time staffOption 3 will display details of only casual staffOption 4 will display details of all staffOption 5 terminate the programEnsure that the program is appropriately documented throughout and thoroughly tested to demonstrate its correct operation.
java.zip

Unformatted Attachment Preview

Don't use plagiarized sources. Get Your Custom Essay on
Expert answer:Application of Programming in Java Project
Just from $10/Page
Order Essay


Purchase answer to see full
attachment

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 30% with the discount code ESSAYSHELP