Define a class License that has a driving license number, name and address. Define constructors that take on parameter that is just the number and another where all parameters are present.
#include<iostream>
using namespace std;
class License {
public:
int drivingLicenseNumber;
string name;
string addres;
Constructor1(string a) {
name = a;
}
Constructor2(string b) {
address = b;
}
Constructor3(int c) {
drivingLicenseNumber = c;
}
};
int main() {
return 0;
}
Comments
Leave a comment