Problem Solving and Programming
1.Develop an algorithm to keep track of the number of available rooms and the number of visitors. The program should calculate the cost of accommodation, any discounts that may apply, the final cost for each visitor and the overall total bill for the company. The program should accept as input the name of one of the companies and the visitors’ information for that company. Accept the first name, last name, status (resident or non- resident) and duration of stay for each visitor and also prompt the user to state whether or not the visitor is an early bird. The program should then display the name and the total amount that should be paid by the company, the number of registered guest and the number of available rooms. The program should also produce a listing of all the visitors for each package. Include in the list of names the final cost, discount amounts and room numbers assigned to each visitor. 2.Design and execute a trace table that accepts data for reservation for that company. Data should include the names of the visitors, early bird option, package type, status and duration of stay for the visitors. The table should trace the cost, discount, final cost for each visitor and overall total cost for the company. The number of registered guest and available rooms should be counted. The table should have at least 10 iterations.
3.Using the programming language Pascal, write a program code to implement the algorithm in (1).