0% found this document useful (0 votes)
11 views2 pages

Customer Directory Class Implementation

Uploaded by

MD Al Islam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Customer Directory Class Implementation

Uploaded by

MD Al Islam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Program 2: Class & Objects

Write a class called as CustomerDirectory. The class will have the following
private member data/attributes.

Member Data/ Class Attributes


Private char cusFirstName[30]
char cusLastName[20]
char cusDoB[10]
char cusTelNum[13]
char cusCountry[20]

The class will have following member functions/methods.

Member Function/Methods
public Void setCusInfo() In this method, you will
{ set the customer’s first
//write the and last name, with
method Date of Birth,
} telephone number and
customer’s country.
Void getCusInfo() In this method you will
{ show the customer’s
//write the details on the console.
method
}

Create two objects cus101 and cus102 in the main(). Access both methods with
two objects and show the output. A sample output is shown below:

You might also like