141k views
4 votes
All students of NBD University like to live on campus. Single room is $4500 per semester, while double room is $6000 per semester. There are also two meal plans to choose. The 14-meal plan serves 14 meals each week with the price of $4200 per semester. The 10-meal plan serves 10 meals each week with the price of $3000 per semester.

Write a program for a student to choose room type and meal plan. Define and use the following two functions:

a. choose_room function: Display room types and get user choice. Display user choice.

b. choose_meal function: Display meal plans and get user choice. Display user choice.

Each of these functions returns the price of the chosen item.

Write a main function to implement the mainline logic of the program. Calculate and display the total price in the main function. The following is a sample running of this program:​

a. The program is missing essential details.
b. The program logic is not specified.
c. The program is complete and functional.
d. The question is incomplete.

1 Answer

1 vote

Final answer:

The question is asking for a program that allows users to select a room type and meal plan and then calculates the total cost at NBD University. The program requires implementing two functions, choose_room and choose_meal, and a main function to display the total price. The problem is incomplete as it lacks implementation details.

Step-by-step explanation:

The student is tasked with writing a program for choosing a room type and meal plan with costs associated at NBD University. The problem includes defining two functions: choose_room and choose_meal that display options and return the price of the chosen item. A main function that calculates the total price and displays it should accompany these functions. This assignment is clearly part of a computer programming or technology class aimed to give students real-world applications for their coding skills.

Given the details provided, the program is incomplete due to the lack of essential details such as program language, method and variable declaration. The question doesn't contain the listings for the implementation of the said functions or the main program. Typically, when such a program is required, it would involve conditions to get user input and loops or data structures to manage the display and selection of the choices. The assignment might involve using basic control structures and user interaction to calculate the total cost of living on campus.

User Reflexgravity
by
8.9k points