Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following table shows the number of customers staying in each room on each o

ID: 646001 • Letter: T

Question

The following table shows the number of customers staying in each room on each of the five floors in a hotel. Each row represents a floor and the five numbers in each row represent the number of people staying in each of the five rooms.

1 2 4 4 3

2 3 3 1 4

2 2 1 1 3

2 32 2 1

4 2 2 1 2

Create the text file floors.txt with the numbers as shown in the table. Write a program that will read the file and display the total number of customers staying on each floor. The program output will look somewhat like this: 14 people stay on floor 1 13 people stay on floor 2

Explanation / Answer

import java.io.*; class customerOrder { boolean valueset=false; String str[]=new String[3]; synchronized void d_takeOrder(Thread t) { if(valueset) { try { wait(); }catch(InterruptedException e) { System.out.println(e); } } System.out.println(" "+t); try { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); for(int i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote