Code:
// Class CONTRACT: Handles the rental contract details
#include <string>
#include "Date.h"
using namespace std;
class Contract
{
public:
Contract();
void setContractDetails(Date i, Date r, unsigned carR,
unsigned lndrID, string contID);
string getContractID();
Date getIssueDate();
Date getReturnDate();
unsigned getLenderID();
unsigned getCarReg();
private:
string contractID;
Date issued, returned;
unsigned lenderID;
unsigned carRegistration;
};
Code:
// Class ADDRESS : Handles the physical address of the lender
#include <string>
using namespace std;
class Address
{
public:
Address();
Address(string firstLine, string secondLine, string surbub,
string city, short code);
void setAddress(string firstLine, string secondLine, string surbub,
string city, short code);
string getFirstLine();
string getSecondLine();
string getSurbub();
string getCity();
short getCode();
private:
string firstLine;
string secondLine;
string surbub;
string city;
short code;
};
Code:
// Class DRIVER : Handles the driver's or lender's details
#include <string>
#include "Address.h"
using namespace std;
class Driver
{
public:
Driver();
void SetDriverDetails(string fname, string lname, unsigned IDno,
string contact, string license);
string getFName();
string getSName();
Address getAddress();
string getContact();
unsigned getIDNo();
string getLicense();
private:
string firstName;
string lastName;
unsigned idNo;
string license;
Address address;
string contact;
};
Code:
// Class DATE : Handles the fleet return and issue dates
#ifndef DATE
#define DATE 1
#endif
class Date
{
public:
Date();
~Date();
Date(int d,int m,int y,int h,int mn);
void setTimeAndDate(int d,int m,int y,int h,int mn);
int getDay();
int getMonth();
int getYear();
int getHour();
int getMinute();
private:
int day;
int month;
int year;
int hour;
int minute;
};
I think that's about enough classes i need for this program ...