This program I have to solve it before next week;so plezzzzz plezzzz help me
And I will be very happy if I solve it
:)
:)
ITCS102
Assignment #4(chapter 12)
Create a class called BloodDonor that maintains information about blood donors in a blood bank
having the following data members:
1. IdNumber, // long int
2. name, //Name of donor, maximum 20 Characters
3. bloodGroup //String
4. home_Phone//String
5. mobile_Phone//String
6. address // struct Address that holds int house number, int road number, int block number, string city, and string country
It will also have the following member functions:
1. Constructor function with default values IdNumber = 0, name = “”, bloodGroup = “”, home_Phone=””, mobile_Phone=””, address={0,0,0,””,””} which is passed as int,int,int,char[], and char[]
2. An overloaded constructor that takes the same parameters of the constructor in except Address for the address
3. Set and get functions for all data members. The setBloodgroup function should check the validity of the blood group before assigning it to bloodGroup by calling the function Is_BloodBroup_Valid described below.
4. Overloaded functions for setAddress one that takes an Address as parameter and the other one takes int,int,int,char [], and char[] for address
5. Is_BloodBroup_Valid // takes a string as parameter and return true if it is a valid group and false if not. The only possible blood groups are A+, A-, B+, B-, O+, O-, AB+, AB-.
6. InputDetails// asks the user to enter all the details of a donor and then assign the values to the data members by calling the appropriate set functions.
7. printDetails // Print the details (IdNumber,name, bloodGroup, home phone, mobile phome, and address) of the donor
8. Destructor function .
PART A
Write the class BloodDonor including the code of the member functions.
PART B
Write a main function which includes the following:
1. Creates an instance (object) named donor1 of type BloodDonor with id=56789, name is Ahmed, blood group is B+, home phone=“17123456”, mobile phone=”39999999”, address={1,1,1,”Manama”,”Bahrain”}.
2. Write a statement to change the mobile phone to “39888888”.
3. Write a statement to print the mobile phone.
4. Write a statement to print the details of donor.
5. Creates another object named donor2 of type BloodDonor.
6. Ask the user to enter the details of the donor2 and store them in the object.
7. Print the details of donor2
I had only done part A but I have lots of midterms at those days so I do not have time to finish this program
plezzzz I wander if any body help