Hi just need the following code of each method which is at page 3. The specifications on what to do on each method is on page 4. This is for JAVA btw am using intellij. Thank you! The input file is a csv file named data.csv here is the link if you needed to download: https://drive.google.com/file/d/1vi3nuPYk8tVe1ckbDOoslYU3N5-XWOrP/view

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Hi just need the following code of each method which is at page 3. The specifications on what to do on each method is on page 4. This is for JAVA btw am using intellij. Thank you!

The input file is a csv file named data.csv here is the link if you needed to download:
https://drive.google.com/file/d/1vi3nuPYk8tVe1ckbDOoslYU3N5-XWOrP/view

Create a project using IntelliJ based on the following specifications.
Using the provided data text file ("data.csv"), you are to produce output files that are to be generated by a correct
program. Each line in the data file pertains to a set of information about an employee and is fomatted as follows:
ID,Full Name,Gender, Age,Department, Years of Service,Salary,Employment Status
where:
Gender - is a single character (either M or F)
Employment Status - is either pemanent or not permanent
Note that the data file is attached along with this document.
To convert the data into objects, you should utilize the Employee reference class with the following details:
public class Employee{
private String id;
private String name;
private String department;
private char gender;
private
int age;
private boolean isPermanent;
double salary;
private int yrsofService;
private
public Employee (String id, String name, String department, char gender,
int age, boolean isPermanent, double salary, int yrsofService) {
this.id = id;
this.name = name;
this.department - department;
this.gender - gender;
this.age = age;
this.isPermanent isPermanent;
this.salary - salary;
this.yrsofService = yrsofService;
eoverride
public String tostring() {
return "Employee{" +
"id='" + id + '\'' +
", name='" + name + '\' +
department='" + department + '\'' +
gender=" + gender +
age=" + age +
", employment status=" +
(isPermanent ? "Permanent" : "Not Permanent") +
", salary=" + salary +
", years of service=" + yrsofService +
'}';
}
public String getId() {
return id;
public String getName ( {
return name;
public String getDepartment() {
return department;
}
public char getGender () {
return gender;
}
public int getAge () {
return age;
}
public boolean isPermanent () {
return isPermanent;
}
public double getSalary () {
return salary;
}
public int getYrsofService() {
return yrsofservice;
}
}
public class Main {
/* Put the code for the main method here * /
/* . Put necessary codes here (e.g. method header for the run method).* /
// Invoke doRequirementl1
List<Employee> employees = doRequirement1 ("res/data.csv");
// Invoke doRequirement2
doRequirement2 (employees);
// Invoke doRequirement3
doRequirement3(employees);
//Invoke doRequirement4
doRequirement4 (employees);
//Invoke doRequirement5
doRequirement5 (employees);
//Invoke doRequirement6
doRequirement6 (employees);
/* . Other necessary codes should follow . */
Note: You are to provide the necessary package, import statements and method declarations for the Main class.
Transcribed Image Text:Create a project using IntelliJ based on the following specifications. Using the provided data text file ("data.csv"), you are to produce output files that are to be generated by a correct program. Each line in the data file pertains to a set of information about an employee and is fomatted as follows: ID,Full Name,Gender, Age,Department, Years of Service,Salary,Employment Status where: Gender - is a single character (either M or F) Employment Status - is either pemanent or not permanent Note that the data file is attached along with this document. To convert the data into objects, you should utilize the Employee reference class with the following details: public class Employee{ private String id; private String name; private String department; private char gender; private int age; private boolean isPermanent; double salary; private int yrsofService; private public Employee (String id, String name, String department, char gender, int age, boolean isPermanent, double salary, int yrsofService) { this.id = id; this.name = name; this.department - department; this.gender - gender; this.age = age; this.isPermanent isPermanent; this.salary - salary; this.yrsofService = yrsofService; eoverride public String tostring() { return "Employee{" + "id='" + id + '\'' + ", name='" + name + '\' + department='" + department + '\'' + gender=" + gender + age=" + age + ", employment status=" + (isPermanent ? "Permanent" : "Not Permanent") + ", salary=" + salary + ", years of service=" + yrsofService + '}'; } public String getId() { return id; public String getName ( { return name; public String getDepartment() { return department; } public char getGender () { return gender; } public int getAge () { return age; } public boolean isPermanent () { return isPermanent; } public double getSalary () { return salary; } public int getYrsofService() { return yrsofservice; } } public class Main { /* Put the code for the main method here * / /* . Put necessary codes here (e.g. method header for the run method).* / // Invoke doRequirementl1 List<Employee> employees = doRequirement1 ("res/data.csv"); // Invoke doRequirement2 doRequirement2 (employees); // Invoke doRequirement3 doRequirement3(employees); //Invoke doRequirement4 doRequirement4 (employees); //Invoke doRequirement5 doRequirement5 (employees); //Invoke doRequirement6 doRequirement6 (employees); /* . Other necessary codes should follow . */ Note: You are to provide the necessary package, import statements and method declarations for the Main class.
Requirements:
Listed below are the things that each of the following methods used in the Main class will be doing:
• doRequirement
method description: This method reads the content of the file and converts each line into an Employee object
which will be stored into a collection object. The reference to the collection object will then be returned by this
method, In addition, the Employee objects are shown on the output screen.
doRequirement2
method description: It creates an output file showing the list of permanent male employees, the average salary
of permanent male employces, the list of permanent female employees and the average salary of pemanent
female employees.
filename of output: req2.txt
location of output file to be created: within the res folder of this project
doRequirement3
method description: This method creates an output file containing the list of the 10 highest paid male
employees and the list of 10 highest paid female employees. Content of the file should show the name and
corresponding salary of the employees.
filename of output: req3.txt
location of output file to be created: within the res folder of this project
doRequirement4
method description: This method creates an output file containing a list of the pemanent employees who will
be retiring in the next 5 years. Note that the age of retirement is set at 60. The output file must show the name
and the corresponding age of the employees.
filename of output: req4.txt
location of output file to be created: within the res folder of this project
doRequirements
Method description: It creates an output file that shows a list of the permanent employees who will be awarded
10 years of scrvice by next year. The output file must show the male employees first followed by the female
employees. In cach group, the list must be arranged based on the names in ascending order.
filename of output: req5.txt
location of output file to be created: within the res folder of this project
doRequirement6
method description: It creates an output file where the content is a list of all employees with the following
sections:
o show the departments first and in each department, group the pemanent from the non-permanent
employees
all groups of employees will have to be shown according to their name in alphabetical order
o sample layout:
department name
permanent employees
(list of employees)
...
non-permanent employees
(list of employees)
...
filename of output: req6.txt
Transcribed Image Text:Requirements: Listed below are the things that each of the following methods used in the Main class will be doing: • doRequirement method description: This method reads the content of the file and converts each line into an Employee object which will be stored into a collection object. The reference to the collection object will then be returned by this method, In addition, the Employee objects are shown on the output screen. doRequirement2 method description: It creates an output file showing the list of permanent male employees, the average salary of permanent male employces, the list of permanent female employees and the average salary of pemanent female employees. filename of output: req2.txt location of output file to be created: within the res folder of this project doRequirement3 method description: This method creates an output file containing the list of the 10 highest paid male employees and the list of 10 highest paid female employees. Content of the file should show the name and corresponding salary of the employees. filename of output: req3.txt location of output file to be created: within the res folder of this project doRequirement4 method description: This method creates an output file containing a list of the pemanent employees who will be retiring in the next 5 years. Note that the age of retirement is set at 60. The output file must show the name and the corresponding age of the employees. filename of output: req4.txt location of output file to be created: within the res folder of this project doRequirements Method description: It creates an output file that shows a list of the permanent employees who will be awarded 10 years of scrvice by next year. The output file must show the male employees first followed by the female employees. In cach group, the list must be arranged based on the names in ascending order. filename of output: req5.txt location of output file to be created: within the res folder of this project doRequirement6 method description: It creates an output file where the content is a list of all employees with the following sections: o show the departments first and in each department, group the pemanent from the non-permanent employees all groups of employees will have to be shown according to their name in alphabetical order o sample layout: department name permanent employees (list of employees) ... non-permanent employees (list of employees) ... filename of output: req6.txt
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Multimedia tools and applications
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education