SOLELY FOLLOW QUESTIONS AND TEMPLATES. MAKE CODE ACCORDING TO THE TEMPLATE PROVIDE AT THE END OF THE QUESTION. MATCH INPUT AND OUTPUT AS IT IS. ------------Start------------------------ Write a program to get the details of n donors like Name, age, height weight, gender, and blood group and display all the donor details.   Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement.   The class Donor has the following public attributes.  Data Type   Variable Name string name int age float height float weight string gender string bloodGroup   Include the following member function in Donor class Member Function Description void display(Donor obj[], int n) This method must display the donor details.   In the main method, get the details of n number of donors and display all the donor details.   Input and Output Format: Refer to the sample input and output for formatting specifications.   [All text in bold corresponds to input and the rest corresponds to output] Sample Input and Output 1: Enter the number of donors: 2 Enter the donor details1 Enter the name : Aarav Enter the age : 24 Enter the height : 156.9 Enter the weight : 45.9 Enter the gender : male Enter the Blood Group : B+ Enter the donor details2 Enter the name : Taj Enter the age : 34 Enter the height : 134.5 Enter the weight : 56.7 Enter the gender : male Enter the Blood Group : AB+ Donor details in the hospital database : Donor1 Name :Aarav Age :24 height :156.9 weight :45.9 Gender :male Blood Group :B+ Donor2 Name :Taj Age :34 height :134.5 weight :56.7 Gender :male Blood Group :AB+ Sample Input and Output 2: Enter the number of donors: 1 Enter the donor details1 Enter the name : Vasili Enter the age : 24 Enter the height : 145.6 Enter the weight : 34.5 Enter the gender : female Enter the Blood Group : B+ Donor details in the hospital database : Donor1 Name :Vasili Age :24 height :145.6 weight :34.5 Gender :female Blood Group :B+   --------------End------------- IN ATTACH IMAGE TEMPLATE IS PROVIDED FOR THE " MAIN.CPP AND DONOR.CPP  ". KINDLY CHECK BEFORE MAKING CODE

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

SOLELY FOLLOW QUESTIONS AND TEMPLATES. MAKE CODE ACCORDING TO THE TEMPLATE PROVIDE AT THE END OF THE QUESTION. MATCH INPUT AND OUTPUT AS IT IS.

------------Start------------------------

Write a program to get the details of n donors like Name, age, height weight, gender, and blood group and display all the donor details.
 
Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement.
 
The class Donor has the following public attributes. 
Data Type   Variable Name
string name
int age
float height
float weight
string gender
string bloodGroup
 

Include the following member function in Donor class

Member Function Description
void display(Donor obj[], int n) This method must display the donor details.
 
In the main method, get the details of n number of donors and display all the donor details.
 
Input and Output Format:
Refer to the sample input and output for formatting specifications.

 

[All text in bold corresponds to input and the rest corresponds to output]

Sample Input and Output 1:

Enter the number of donors:
2
Enter the donor details1
Enter the name :
Aarav
Enter the age :
24
Enter the height :
156.9
Enter the weight :
45.9
Enter the gender :
male
Enter the Blood Group :
B+
Enter the donor details2
Enter the name :
Taj
Enter the age :
34
Enter the height :
134.5
Enter the weight :
56.7
Enter the gender :
male
Enter the Blood Group :
AB+
Donor details in the hospital database :
Donor1
Name :Aarav
Age :24
height :156.9
weight :45.9
Gender :male
Blood Group :B+
Donor2
Name :Taj
Age :34
height :134.5
weight :56.7
Gender :male
Blood Group :AB+

Sample Input and Output 2:

Enter the number of donors:
1
Enter the donor details1
Enter the name :
Vasili
Enter the age :
24
Enter the height :
145.6
Enter the weight :
34.5
Enter the gender :
female
Enter the Blood Group :
B+
Donor details in the hospital database :
Donor1
Name :Vasili
Age :24
height :145.6
weight :34.5
Gender :female
Blood Group :B+

 

--------------End-------------

IN ATTACH IMAGE TEMPLATE IS PROVIDED FOR THE " MAIN.CPP AND DONOR.CPP  ". KINDLY CHECK BEFORE MAKING CODE

 

Main.cpp/
#include <iostream>
2
#include<string>
#include<stdio.h>
#include "Donor.cpp"
using namespace std;
int main()
77 {
4
5
8
int n;
cout<<" Enter the number of donors:\n";
cin>>n;
//Fill the code
9
10
11
12 }
13
Transcribed Image Text:Main.cpp/ #include <iostream> 2 #include<string> #include<stdio.h> #include "Donor.cpp" using namespace std; int main() 77 { 4 5 8 int n; cout<<" Enter the number of donors:\n"; cin>>n; //Fill the code 9 10 11 12 } 13
Donor.cpp/
1
#include <iostream>
2 #include<stdio.h>
#include<string>
4 using namespace std;
3
5
class Donor
67
{
public:
string name;
int age;
7
8.
9
float height, weight;
string gender, bloodGroup;
10
11
12
void display(Donor obj[], int n)
{
cout<<"Donor details in the hospital database :"<<endl;
//Fill your code
}
};
13
14
15
16
17
18
19
Transcribed Image Text:Donor.cpp/ 1 #include <iostream> 2 #include<stdio.h> #include<string> 4 using namespace std; 3 5 class Donor 67 { public: string name; int age; 7 8. 9 float height, weight; string gender, bloodGroup; 10 11 12 void display(Donor obj[], int n) { cout<<"Donor details in the hospital database :"<<endl; //Fill your code } }; 13 14 15 16 17 18 19
Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Introduction to Template
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education