Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.
-
Upload
allison-bell -
Category
Documents
-
view
212 -
download
0
Transcript of Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.
![Page 1: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/1.jpg)
Abdulrahman Bin Humood
ECE 2552 Soft/Hardware Integration
DVD Rental
![Page 2: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/2.jpg)
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?
![Page 3: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/3.jpg)
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.
OBJECTIVE :
![Page 4: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/4.jpg)
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
![Page 5: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/5.jpg)
The Code:#include <iostream>
#include <fstream>
#include <string>
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";
}
![Page 6: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/6.jpg)
int main(){
char op;string op2,op3,op4,op5,op6,op7,op8;int op1,op11;double op10,op9;cout<<"Welcome To Walmart movie rental\n";cout<<"-------------------------------\n";cout<<"-------------------------------\n\n";
cout<<"Please Enter Movie Options:\n"; cout<<"Enter 'L' for Legend Movies\n"; cout<<"Enter 'N' for New Movies\n";
cout<<"Enter 'C' New Childrean Movies\n"; cout<<"Enter 'E' for English Movies\n";
cin >> 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";
![Page 7: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/7.jpg)
The output:
This output appears when you select the right option.
![Page 8: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/8.jpg)
The output:
This output appears when you select the wrong option.
![Page 9: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/9.jpg)
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.
![Page 10: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/10.jpg)
Improvement:
Able to use <ctime> 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 .
![Page 11: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/11.jpg)
Reference:
1) http://answers.yahoo.com/question/index?qid=20091016105846AA3xrcH
2) http://www.cplusplus.com/doc/tutorial/
![Page 12: Abdulrahman Bin Humood ECE 2552 Soft/Hardware Integration DVD Rental.](https://reader036.fdocuments.in/reader036/viewer/2022072016/56649efa5503460f94c0ca22/html5/thumbnails/12.jpg)
Questions?