Considering the following specifications:
Structure name | Data | Type | Size |
Name | first | array of characters | 60 |
mid | array of characters | 40 | |
last | array of characters | 60 | |
phone | area | array of characters | 4 |
exch | array of characters | 4 | |
numb | array of characters | 6 |
class name | Date | Type |
p-rec | name | Name |
phone | Phone |
with member functions constructors and display_rec.
(i) Declare structures in C++ for Name and Phone.
(ii) Declare a class for P_rec.
(iii) Define the constructor (outside the class P_rec) that gathers information from the user for the above two structures Name and Phone.
(iv) Define the display_rec (outside the class P_rec) that shows the current values.
All Replies
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.