Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Remark: pls give the result of the output The following data contains information of guest staying at Hotel B stored in a text file named
Remark: pls give the result of the outputThe following data contains information of guest staying at Hotel B stored in a text file named guest.txt. Each line contains the guest's room no, the guest's name, the type of room, breakfast option, total price for room and date of stay. Write a Java program with a method that does the following: 1) Reads the input file guest.txt and display the information onto the screen ii) Count the number of guests who opt "Yes" for breakfast in the file and display the result onto the screen. Input file (guest,txt) 1501 Salina Mohd Sand Deluxe Yes 2401617/01/23 912 Nbdullah Mahd Isnail Fanily No 3502425/01/23 1105 Chan Lee kei suite Yes 4852325/01/23 210 Mohd Firdhaun Hussin Executive Yes 620.2224/01/23 608 David Anand Ravl Executive Yes 845 14-17/02/23 1209 Timotby tee Anderson single No. 1801819/02/23 Guests with a "Yes" for breakfast: 4
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started