PLEASE HELP ME ON THIS PROGRAM GUYS AND MY U PLEASE SEND IT TO MY E-MAIL ADDRESS TOMORROW B 4 12 GUYS PLEASE!!
HERE IS THE PROBLEM
MULTICHOICE VIDEO RENTAL SHOP needs an Object Oriented program that process the following information about ten (10) videos in their stock
The title, the director, the year produced and a list of main actors for each video. (If there are more than five main actors, include only the five most famous actors)
The function setVideo that input information into each video object
The function getVideo that displays information of a particular video on the screen
A customer (identified by ID) plus his full names and address can borrow at most 2 videos @ R12.50 per day. A penalty of 10% per day is charged if returned late. The borrow period is at most 7 days
Video titles should not exceed 25 characters in length. If that happens, truncate the length to a most 25 characters
A video should be checked if is not rented out before borrow transaction is processed. If borrowed out the customer should either be requested for the second choice or be advised when the video is expected back in the shop
Failure for the shop to receive the video back within 7 days, is considered permanent loss and the customer is liable to a R400.00 compensation fee
Information about the number of films in stock at any point in time should be readily available
At the end of business, a report should be generated showing
Which films are rented out and when are they due
To which customers they are borrowed to
Which videos are left in stock
How much money was collected for the day
AND HERE IS MY SOURCE CODE
CODE
#ifndef "VIDEO_H"
#define "VIDEO_H"
#include<iostream>
#include<string>
using namespace std;
class video
{ public:
const static int actor=2;
const static int size=1;
video();
void setVideo();
void getVideo();
void count(int);
void date(int,int,int);
void disDate();
private:
string title;
string director;
int yearProduced;
int number;
string mainActors[actor];
int day;
int month;
int year;
};
#endif
video::video()
{
yearProduced=day=month=year=0;
}
void video::setVideo()
{
for(int a=0;a<1;a++)
cout<<" VIDEO NO:"<<a+1<<endl<<endl;
cout<<"ENTER VIDEO TITLE: ";
getline(cin,title,'\n');
cin.get();
cout<<"\nENTER DIRECTORS NAME: ";
getline(cin,director,'\n');
cin.get();
cout<<"\nENTER THE YEAR VIDEO WAS PRODUCED: ";
cin>>yearProduced;
cin.get();
cout<<"\nENTER MAIN ACTORS IN THE VIDEO"<<endl;
const int Actor=2;
for(int a=0;a<Actor;a++)
{
getline(cin,mainActors[a],'\n');
}
cin.get();
}
void video::count(int videoNum)
{
if(videoNum==1)
{
getVideo();
}
else
cout<<"\n\t-------------------------"<<endl;
cout<<"\n\tVIDEO HAS BEEN RENTED OUT"<<endl;
cout<<"\n\t-------------------------"<<endl;
}
void video::getVideo()
{
cout<<"VIDEO TITLE: "<<title<<"\n\nDIRECTORS NAME: "<<director
<<"\n\nYEAR PRODUCED: "<<yearProduced<<endl;
cout<<"\n\nMAIN ACTORS IN THE VIDEO"<<endl;
for(int j=0;j<actor;j++)
{
cout<<mainActors[j]<<"\n";
}
cout<<endl<<endl;
}
void video::date(int d, int m, int y)
{
day=d;
month=m;
year=y;
}
void video::disDate()
{
cout<<day<<'/'<<month<<'/'<<year<<endl;
}
int main()
{
video video1;
cout<<"CAPTURE INFORMATION ABOUT EACH VIDEO "
<<"IN STORE TODAY"<<endl<<endl;
video1.setVideo();
cout<<"__________"<<endl;
cout<<"VIDEO NO:1"<<endl;
cout<<"__________"<<endl<<endl;
video1.getVideo();
cout<<"\nDO U WANT TO BORROW A VIDEO(Y/N)?: ";
char answer;
cin>>answer;
if(answer=='y' || answer=='Y')
{
cout<<"\nENTER UR ID NO: ";
string Id;
cin>>Id;
cin.get();
cout<<"\n\nUR NAMES IN FULL: ";
string names;
getline(cin,names,'\n');
cout<<"\n\nENTER UR ADDRESS"<<endl;
string addres;
getline(cin,addres,'\n');
cout<<"\nENTER THE NUMBER OF THE VIDEO U WANT TO BORROW: ";
int videoNum;
cin>>videoNum;
video1.count(videoNum);
cout<<endl;
cout<<endl<<endl;
cout<<"\n\t--------------------------------"<<endl;
cout<<"\n\tTHE VIDEOS BEING RENTED OUT "<<endl;
cout<<"\n\t--------------------------------"<<endl;
video1.getVideo();
cout<<"HAS BEEN BORROWED BY: "<<names<<"\n\nID NUMBER: "
<<Id<<"\n\nADDRESS NO: "<<addres<<"\n\nRETURN DATE: ";
video1.disDate();
}
else
cout<<"\nPLS DO VISIT US NEXT TIME"<<endl<<endl;
return 0;
}
This post has been edited by jjhaag: 30 Oct, 2007 - 11:44 AM