Presentation is loading. Please wait.

Presentation is loading. Please wait.

Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.

Similar presentations


Presentation on theme: "Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental."— Presentation transcript:

1 Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental

2  A DVD rental is a machine provides a collection of movies, which is new, old, international, and a lot of movies with out any cashier.  A DVD rental machine can accept cash, or credit card, by giving your information, and be a customer there. What is a DVD Rental?

3  To be able to use some information from : http://www.cplusplus.com/doc/tutorial/  To be able to able to formulate an algorithm.  To be able to create a DVD Rental programs in C++ which I can use the subjects we covered and some information from website.  Create a program which makes it easy for people to rent movie without cashier in the real life. O BJECTIVE :

4 Description:  The basic idea is to provide a customer or the user information about movie name, how many days, and the member s (he) wants.  So, there are a few steps we need to follow:  Create a C++ project called DVD Rental.  Using class definition from its implementation, called DVD.  Using Access specifies  Create a function after main  Display some input then the program will further display the prompt  write a function which will calculate rental/charged amount on the basis of this information  run the program  getting the output

5 The Code: #include using namespace std; class dvd { public: double days; double amount; double prise; void count(double, double); }; void dvd:: count(double d, double pri) { days=d; prise=pri; amount = days*prise;//type casting variable cout<<"\nYour total amount is:"<<amount<<" Dollers\n"; }

6 int main() { char op; string op2,op3,op4,op5,op6,op7,op8; int op1,op11; double op10,op9; cout > op; switch(toupper(op)) { case 'L': cout << " Movie Legends...\n"; cout <<" 1)Rocky\n"; cout <<" 2)Good Father\n"; cout <<" 3)Good Fellas\n"; cout <<" 4)Titanic\n";

7 The output: This output appears when you select the right option.

8 The output: This output appears when you select the wrong option.

9 Conclusion: The project works successfully. try to make it more interesting by selecting 2 movies at the same time. the project is easy, simple, and not that complicated. the project covers some of the material in the class.

10 Improvement:  Able to use function prototypes and types for manipulating the time and date which makes it easy to know what time the person has come and rent the movie.

11 Reference: 1) http://answers.yahoo.com/question/index? qid=20091016105846AA3xrcH http://answers.yahoo.com/question/index? qid=20091016105846AA3xrcH 2) http://www.cplusplus.com/doc/tutorial/

12 Questions? Questions?


Download ppt "Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental."

Similar presentations


Ads by Google