RSS
 

how can i make the program?

31 Mar

Problem Statement: Movie Rental Store

You are required to write a program for Movie Rental Store. The basic idea is that user/reader will provide customer information, movie name, and number of days. Upon this information your program will calculate the charged amount for that movie.

Detailed Description:

1.The program should display

Please provide customer Name:
Please provide Movie Description.
Enter ‘R’ for Regular Movie.
Enter ‘C’ for children Movie.
Enter ‘N’ for New Released Movie.
Enter ‘E’ for English Movie.

Then your program should take these inputs,

2.Depending upon the choices that user has entered, your program will further display the prompt

3.If user has entered Movie description, then your program should prompt the user to enter the Movie Name and Number of days.

—————————————————————–
Movie Name :
Number of day’s:
—————————————————————–

4.After getting all this information, now write a function which will calculate rental/charged amount on the basis of this information.

To calculate rental/charged amount we will use this formula:
Rental amount = charged amount * number of days

Charged amount will be different for different movies according to following description:

Regular Movie: 40 RS
Children Movie: 30 RS
English Movie: 50 RS
New release: 100 RS

After calculating charged amount for this movie and display it on the screen.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
 
2 Comments

Posted in General

 

Tags:

Leave a Reply

 
 
  1. swtdelicaterose

    March 31, 2010 at 11:57 am

    These are the easiest programs as the only algorithm they require is common sense. You didn’t state what language you need to program in, so all I can say is this:

    You need to store movie type variables with the amount charged. That’s all the computer needs to know, including the formula on how much to charge.

    This is probably a first year course, so what you need is to create separate functions to call depending on the user’s choice. i.e. each different function causes program to display or prompt for the required task.

    Moving on, you need to ask user to input certain variables, i.e. movie name, number of days, type of movie.

    So something like, if type = regular movie, print “you will be charged” (REGULAR_MOVIE * days)

    FYI This is not real code.

     
  2. Paul

    March 31, 2010 at 12:56 pm

    You need to decide what programming language you are going to be using before you can get into the implementation details.