Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Meaningful variable names and prompts Identifiers are written in upper CamelCase Class name starts with upper case letter and variables in lower case letter

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Meaningful variable names and prompts Identifiers are written in upper CamelCase Class name starts with upper case letter and variables in lower case letter Constants are written in All Capitals Use proper spacing and empty lines to make code human-readable Capture execution: You should capture and label screen capture associated with compiling your code and running a test case. There should be a screenshot for the execution of each menu selection Submission requirements Deliverables include a Java program (.java) and a single Word (or PDF) document. The Java and Word/PDF files should be named appropriately for the assignment (as indicated in the Submission Requirements document. The word (or PDF) document should include screen captures showing the successful compiling and running of each of the test cases. Each screen capture should be properly labeled clearly indicate what the screen capture represents. Submit your files to the Project dropbox submission area no later than the due date listed in the online classroom. 48 49 // - employee id 50 51 public void setId(int id) { 52 this.id = id; 53 } 54 //employee annual salary 55 56 public void setSalary(double salary) { 57 this.salary salary; 58 } 59 H 60 //to string method to print employee object in the given format 61 62 public String toString() { 63 return "Employee Name : " + name + ", Empoyee ID : " + id + ", Annual Salary : " + salary; } 64 65 66 } 67 68 import java.util.Scanner; class Test { 69 70 71 72 73 74 = // create scanner object static Scanner scan = new Scanner(); 75 76 77 78 79 80 while (true) { 81 82 83 84 85 // create employee array of size 100 static Employee [] employees = new Employee [100]; // count variable to count number of employees in the array public static int employeeCount = 0; public static void main(String[] args) { // loop till exit execution // print the menul System.out.println( "1. Load employee's data 2. Add new employee 3. Display all employees 4. Retrieve specific employee's data 5. Retrieve employees with salaries based on range 6. Exit"); // get menu option from user int option scan.nextint(); 86 // use switch to select a method based on the user input 87 switch (ontion) { < = On 0 W Writable K D Smart Insert 68:27: 1206 ? 57F Mostly cl... ENG 3:58 AM 5/5/2022 TG SELECT Stc X C Apps HH Digital Uni x onlinegdb.com/online_c++_compiler# + OnlineGDB beta online compiler and debugger for c/c++ code. compile. run. debug. share. sa Create New Project My Projects Classroom new Learn Programming Programming Questions Sign Up Logout f +67.7K K About FAQ Blog. Terms of Use . Contact Us GDB Tutorial Credits . Privacy 2016 - 2022 GDB Online O Grades - CX EF Eclipse Con X 19 71 72 SPONSOR Mailchimp - Our creative tools, marketing automations and recommendations work together to help you create better results. Debug I Stop Share Save {} Beautify + Language Java Main.java 64 65 66 67 68 69 - 70 // create scanner object A } } Difference X Run import java.util.Scanner; class Test { static Scanner scan = new Scanner(); input Compilation failed due to following error(s). Main.java:68: error: illegal start of expression import java.util.Scanner; 2 errors Online C++ X Main.java:68: error: not a statement import java.util.Scanner; Course He X 8 0 H 30899040 X 8 How to res x + ? stderr 57F Mostly cl... ^ ENG 0 x Other bookmarks * 3:57 AM 5/5/2022 Project Before attempting this project, be sure you have completed all of the reading assignments, non- graded exercises, discussions, and assignments to date. Write a Java program that displays a menu to allow the user the following functionality: 1. Load customers' data - prompt user for the number of customers to be loaded and then prompts for each customer's name, customer id (5 digit number), and total sales 2. Add new customer - prompts the user for customer data: customer name, customer id, and total sales 3. Display all customers - displays each customer's data to the console, one customer per line 4. Retrieve specific customer's data - prompts the user for the customer id and displays the corresponding customer's data: customer id, customer name, and total sales 5. Retrieve customers with total sales based on the range - prompts the user for the lowest and highest total sales and displays all customers with total sales in that range. Display each customer on a separate line with all information - Customer Name, Customer ID, and Total Sales 6. Exit Design and implementation notes: o Each menu selection should be implemented as a separate method o Customers' data should be saved in arrays, you can allocate for a maximum of 100 elements o After completion of each selection, the program should display the menu again to allow the user another selection until they select Exit Make sure your Java program is using the recommended style such as: Javadoc comment upfront with your name as author, date, and brief purpose of the program Comments for variables and blocks of code to describe major functionality Meaningful variable names and prompts Identifiers are written in upper CamelCase Class name starts with upper case letter and variables in lower case letter Constants are written in All Capitals

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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Programming questions