Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the Employee Class Program in the Company Employee Program tutorial, imagine you need to add in a way to update the salary based on

For the Employee Class Program in the Company Employee Program tutorial, imagine you need to add in a way to update the salary based on an input of "upd" and the employee ID.
What code segment would need to be added to the while loop in the main method to implement this?
a.)
else if(cmd.toLowerCase().equals("upd")){
updateEmployees(csvFile);
}
b.)
else if(cmd.toLowerCase().equals("upd")){
System.out.print("Employee ID to update: ");
int emplId = input.nextInt();
input.nextLine();
updateEmployees(emplId);
}
c.)
else if(cmd.toLowerCase().equals("upd")){
System.out.print("Employee ID to update: ");
int emplId = input.nextInt();
input.nextLine();
updateEmployees(csvFile, emplId);
}
d.)
else if(cmd.toLowerCase().equals("update")){
input.nextLine();
updateEmployees(csvFile, emplId);
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions