[solved]-Cis 144 Java Object Oriented Programming Lab 10 Project Customer Data Simulation Using Mul Q39063406
Java LabCIS 144 Java Object Oriented Programming Lab 10 PROJECT Customer Data Simulation: Using Multi – Dimensional Arrays Obiective to type a simple Java program, execute (run) the program for some particular values, observe the output and then modify the program PROJECT DESCRIPTION Write a program that uses a two-dimensional Java language array, which will simulate the process of counting the number of customers that are serviced through the checkout lanes of a retail store. The simulation will be used to analyze front-end store employee efficiency. Assuming that the store has seven cashier lanes, your simulation will use random numbers to record customer counts as the fictitious customers pass through their respective cashier lanes. The two-dimensional array will store the customer count data for each hour, over an eight-hour span. The initial Java array that you will create will have 6 rows, for each of the cashier lanes, and 8 columns, for each hour in the eight-hour data study. The 6 times 8 or 48 array entries will be populated by random number generation. The first lane in the two- dimensional array will be a special 15 items or less checkout lane and thus will take on a larger random number value than the other checkout lanes. After you populate the array elements you will perform a statistical analysis on the collected data. The goal of the simulation is to determine if more bagging derks are required to be utilized for increased productivity and faster checkout times for the store’s customers. The determining factors for adding additional checkout dierks will be when the average number of customers served per hour per lane will be greater than some value, such as 10. Run your simulation multiple times (at least five times) to ascertain the rationale for adding more clerks. Type, compile and run the basic Java program that is shown in Figure 1, which follows. Then compile and run your program, observe the output then modify the program. Information About This Project Efficiency testing for the up-front checkout counter lanes in a retail store could mean counting the number of customers that pass through each lane for every hour in the study time frame. This efficiency event can be simulated by a computer program that can generate customer counts with random numbers. Here is an example of data that can be collected. Data Simulation] hour 1 hour 2 hour 3 hour 4 hour 5 hour 6 hour 7 hour 8 12162610717 express checkout lane 2 Lane 3 614697 Lane 5 10 6 6 7 7 7 ne 6579106 We can perform row analysis on the about table data and find the average number of customers per lane. We can also perform column analysis on the about table data and find the average number of customers per hour. Copyright 2019 by PEP. Page 1 of 6 Java objed oriented Programming Lab 108 RECIS 144 PROJECT Customer Data Simulation: Using Multi – Dimensional Arrays Steps to Complete This Project STEP 1 Open Eclipse or NetBeans Open Edipse or NetBeans and create a Java project with the following details For Project Name indude: Retail Store For the Main Class include: Retail Store In your Code window, shown below, copy in the program code shown in Figure 1 below, in the appropriate places, except substitute your own name in place of Sammy Student Figure 1 Source Code for the Multi-Dimensional Array Program import java.util.Scanner; import java.util. Random; import javax.swing.JOptionPane; // Sammy Student public class RetailStore Scanner scan = new Scanner(System.in); public static void main(String args[]) int rows = 6; int columns = 8; int[ ] table = new int[rows][columns); Random randomGen = new Random(); StringBuilder s = new StringBuilder(); int random Inti ; int random Int2 = @; // generate column titles for (int j = @; j <columns; j++) S.append(“thr + ( + 1)); s.append(“nn”); // populate data for each cashier lane for (int i; i <rows; i++) S.append(“lane (i + 1)); s.append(“t”); for (int j = ; j <columns; j++) // express checkout lane random Inti = 1 + randomGen.nextInt(20); // standard checkout lane random Int2 = 1 + randomGen.nextInt(18); Copyright 2019 by PEP Page 2 of 6 We were unable to transcribe this imageCIS 144 Java Object-Oriented Programming Lab 10 PROJECT Customer Data Simulation: Using Multi – Dimensional Arrays Figure 1 Source Code for the Multi-Dimensional Array Program ( continued) // reset the accumulating variable sum = @; for (int i = @; i <rows; i++) sum += table[1][hour Num); System.out.println( table[1][hour Num)); average = sum / rows; System.out.println(“”); outputMsg = “”; outputMsg + “n for hour number ” + (hour Num + 1); outputMsg += “In the data analysis is: “; outputMsg += “In customer count ->” + Math.round(sum); outputMsg + “n average ->” + Math.round(average); JOptionPane.showMessageDialog(null, outputMsg, “Data Column Analysis”, JOptionPane.PLAIN_MESSAGE); STEP 2 STEP 3 Review the Logic and Syntax of the Starter Code Program The initial program code for this application consists of a two-dimensional array that is populated via random number generation. The rows represent the the individual cashier lanes of the grocery store and the columns represent the hour of the day. When the program is executed, a cashier lane number is entered as well as an hour number. Both row and column data are then analyzed and the report is displayed in a message box. Build, Compile and Run the Program From the menu select Run 1 and click Run Project to run your app. Test the Program Once you have successfully compiled your program, review the output that appears in the message boxes that follow in Figure 2. The output will of course be randomized and changed with each program execution. With the program running enter valid values in the two input boxes that appear. STEP 4 Input enter a cashier lane number: OK Cancel Input enter an hour number: OK Cancel Copyright 2019 by P.E.P. Page 4 of 6 We were unable to transcribe this imageACIS 144 Java Object Oriented Programming Lab 101 PROJECT Customer Data Simulation: Using Multi – Dimensional Arrays Include an if() statement that will determine if the average of either your row or column analysis shows a value more than 10. You can also display a message, such as “Schedule another Bagging Clerk”, when an above average value occurs. Finally, supplement your program code by using a nested loop structure to determine the total number of customers that were served in all of the cashier lanes. STEP 6 Submit Your Project Once you have determined that your modified program is correctly displaying the required information, complete the submission process as follows: Open MS Word and type a heading for a new document that includes your full name, course number, lab number and date. Within the document paste snapshots of your modified program in action. Label the snapshots of your modified run with a reasonable description. After your snapshot, paste in your finished source code as well copied in from your Java editor. Include a sufficient number of sample program outputs. Submit your MS Word document, when complete. Show transcribed image text CIS 144 Java Object Oriented Programming Lab 10 PROJECT Customer Data Simulation: Using Multi – Dimensional Arrays Obiective to type a simple Java program, execute (run) the program for some particular values, observe the output and then modify the program PROJECT DESCRIPTION Write a program that uses a two-dimensional Java language array, which will simulate the process of counting the number of customers that are serviced through the checkout lanes of a retail store. The simulation will be used to analyze front-end store employee efficiency. Assuming that the store has seven cashier lanes, your simulation will use random numbers to record customer counts as the fictitious customers pass through their respective cashier lanes. The two-dimensional array will store the customer count data for each hour, over an eight-hour span. The initial Java array that you will create will have 6 rows, for each of the cashier lanes, and 8 columns, for each hour in the eight-hour data study. The 6 times 8 or 48 array entries will be populated by random number generation. The first lane in the two- dimensional array will be a special 15 items or less checkout lane and thus will take on a larger random number value than the other checkout lanes. After you populate the array elements you will perform a statistical analysis on the collected data. The goal of the simulation is to determine if more bagging derks are required to be utilized for increased productivity and faster checkout times for the store’s customers. The determining factors for adding additional checkout dierks will be when the average number of customers served per hour per lane will be greater than some value, such as 10. Run your simulation multiple times (at least five times) to ascertain the rationale for adding more clerks. Type, compile and run the basic Java program that is shown in Figure 1, which follows. Then compile and run your program, observe the output then modify the program. Information About This Project Efficiency testing for the up-front checkout counter lanes in a retail store could mean counting the number of customers that pass through each lane for every hour in the study time frame. This efficiency event can be simulated by a computer program that can generate customer counts with random numbers. Here is an example of data that can be collected. Data Simulation] hour 1 hour 2 hour 3 hour 4 hour 5 hour 6 hour 7 hour 8 12162610717 express checkout lane 2 Lane 3 614697 Lane 5 10 6 6 7 7 7 ne 6579106 We can perform row analysis on the about table data and find the average number of customers per lane. We can also perform column analysis on the about table data and find the average number of customers per hour. Copyright 2019 by PEP. Page 1 of 6
Java objed oriented Programming Lab 108 RECIS 144 PROJECT Customer Data Simulation: Using Multi – Dimensional Arrays Steps to Complete This Project STEP 1 Open Eclipse or NetBeans Open Edipse or NetBeans and create a Java project with the following details For Project Name indude: Retail Store For the Main Class include: Retail Store In your Code window, shown below, copy in the program code shown in Figure 1 below, in the appropriate places, except substitute your own name in place of Sammy Student Figure 1 Source Code for the Multi-Dimensional Array Program import java.util.Scanner; import java.util. Random; import javax.swing.JOptionPane; // Sammy Student public class RetailStore Scanner scan = new Scanner(System.in); public static void main(String args[]) int rows = 6; int columns = 8; int[ ] table = new int[rows][columns); Random randomGen = new Random(); StringBuilder s = new StringBuilder(); int random Inti ; int random Int2 = @; // generate column titles for (int j = @; j
Expert Answer
Answer to CIS 144 Java Object Oriented Programming Lab 10 PROJECT Customer Data Simulation: Using Multi – Dimensional Arrays Obiec… . . .
OR