Create a main method and use these input files to test

Assignment Help Computer Engineering
Reference no: EM132096061

Please help in Java:

Create a main method and use these input files to test that you are able to input the Undergraduates, put them into an ArrayList, print out the list. Repeat for Graduate, Faculty, Staff. Do it all in ONE main.

Then- Add a compareTo to each class (and any other code you need) so you can sort all your ArrayLists and print out the results. Your final output should be all the Undergraduates (sorted), all the Graduates (sorted), all the Faculty(sorted), and all the Staff (sorted).

To sort: Sort undergrads and grads according to ID. Sort Faculty according to Department and Staff according to Salary.

I have Lab10.java to keep main in but it is not completed, which is what im seeking help for.

I have Person.java ; Student.java ; Employee.java ; Undergraduate.java ; Graduate.java ; Faculty.java & Staff.java completed. Example:

Graduate.java

public class Graduate extends Student{ //add attributes : String degree and boolean thesis private String degree; private boolean thesis; //default value of boolean is false public Graduate(){ super(); degree=" "; } public Graduate(String initialDegree, String initialName, int initialStudentNumber){ super(initialName, initialStudentNumber); degree=initialDegree; } public boolean isThesis() { return thesis; } public void setThesis(boolean thesis) { this.thesis = thesis; } public String getDegree() { return degree; } public void setDegree(String degree) { this.degree = degree; } public void writeOutput(){ super.WriteOutput(); // print student details //now print extra details present for graduate System.out.println("Degree: "+ degree); System.out.println("Thesis Completed: "+ thesis); } public boolean equals(Graduate otherGraduate){ return this.degree == otherGraduate.degree; } }
Staff.java

public class Staff extends Employee { int payGrade; public Staff(){ super(); payGrade=0; } public Staff(String initialName, int payGrade){ //constructor call of Employee super(initialName); //extra attribute setting of Staff this.payGrade = payGrade; } public int getPayGrade() { return payGrade; } public void setPayGrade(int payGrade) { //you can also add checks here or wherever you set Pay Grade for valid value between 1 to 20 this.payGrade = payGrade; } }
Faculty.java

public class Faculty extends Employee { private String title; public Faculty(){ super(); title= " "; } public Faculty(String initialName, String initialTitle){ super(initialName); title=initialTitle; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public void Reset(String newName){ setName(newName); } public void WriteOutput(){ super.WriteOutput(); System.out.println("Title: "+title); } public boolean Equals(Faculty other){ return this.hasSameName(other)&&(this.title==other.title); } }

Reference no: EM132096061

Questions Cloud

Suggest a subset selection method and a shrinkage : Suggest a subset selection method and a shrinkage method that could be used here.
Analyze the following algorithm s and provide its worst case : When searching an array with 1,048,576 elements, how many comparisons will there be (at most) using binary search?
How many units on average while holding x2 constant : Suppose a multiple regression model is given by y = 4.44X1 -9.29X2 + 39.67. How do I determine what an interpretation of the coefficient of X1 be if X1
What are your thoughts about the intervention employed : What health state/health status and population resonated with you from the video - what was the primary determinant influencing their health state/health status
Create a main method and use these input files to test : Create a main method and use these input files to test that you are able to input the Undergraduates, put them into an ArrayList, print out the list.
Create an iterator that will allow the program to return : Create unique key values (Do not use map class from STD library.) Create an iterator that will allow the program to return the key,value pairs.
Show the new class header for movie and then implement : show the new class header for Movie and then implement the compareTo method as follows.
Show how the bottom-up parse you completed : Show a rightmost derivation for the string above, and show how the bottom-up parse you completed in step 7 correctly finds all of the handles.
Prepare an audit report on given company : HI6026 - Audit, Assurance and Compliance Assignment - Prepare an audit report on given company and company must be present in ASX S&P 300 index

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd