Question: Create a console application that can estimate whether the booking is a profit or loss, thereby enabling hall owners to reduce or increase expenses depending
Create a console application that can estimate whether the booking is a profit or loss, thereby enabling hall owners to reduce or increase expenses depending on the status. Hence if several Booking details are given, compute whether the bookings are profitable or not. Use Threads to compute for each booking, Finally display the details along with the profit/loss status.
Create a class Event with the following private attributes
| Attributes | Datatype |
| name | String |
| hallbooking | HallBooking |
Include appropriate getters and setters. Create default constructor and a parameterized constructor with arguments in order Event(String name,HallBooking hallbooking).
Create a class HallBooking with following private attributes
| Attributes | Datatype |
| hallName | String |
| cost | Double |
| hallCapacity | Integer |
| seatsBooked | Integer |
Include appropriate getters and setters. Create default constructor and a parameterized constructor with arguments in order HallBooking(String hallName, Double cost, Integer hallCapacity,Integer seatsBooked).
Create a class ComputeStatus that implements Runnable interface with List
Input Format: The first line of input corresponds to the number of events 'n'. The next 'n' line of input corresponds to the event details in CSV format of (Event Name,Hall Name,Cost,Hall Capacity,Seats Booked). Refer to sample input for formatting specifications. Output Format: The output consists of event names with their status (Profit or Loss). Refer to sample output for formatting specifications. Problem Constraints: If n>0 and n then even. Otherwise, display as "Invalid Input". Sample Input and Output 1: [All text in bold corresponds to input and rest corresponds to output] Enter the number of events 4 Enter event details in CSV Party,Le Meridian,12000,400,250 Wedding,MS mahal,500000,1000,400 Alumni meet,Ramans,10000,600,300 Plaza party,Rizzodous,30000,1200,1000 Party yields profit Wedding yields loss Alumni meet yields loss Plaza party yields profit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
