Question
would love some help with this... I've been doing a lot of imperative langue with c and need a little refresh on OOP ***************patient.cpp below*************
would love some help with this... I've been doing a lot of imperative langue with c and need a little refresh on OOP
***************patient.cpp below*************
#include "patient.h"
#include
#include
using namespace std;
// Q1 Patient (2 points)
// Patient() constructor assigns the following default values to class data members
// name: abc
// age: 19
// DOByear: 2000
// ID: 0
Patient::Patient()
{
}
// Q2 (18 points)
// 2 points for each function
// Define all the class member functions.
// While defining member functions, note that these functions will be called using
// a 'Patient' object which will represent one patient.
// Eg- Patient p[10]; creates 10 Patient objects
// p[2].setAge(19); will set 3rd patient's age to 19
// setName assigns 'name_input' to class data member 'name'
void Patient::setName(string name_input)
{
}
// setAge assigns age_input to class data member 'age'
void Patient::setAge(int age_input)
{
}
// setDOByear assigns 'DOByear_input' to class data member 'DOByear'
void Patient::setDOByear(int DOByear_input)
{
}
// setID assigns 'ID_input' to class data member 'ID'
void Patient::setID(int ID_input)
{
}
// displayPatients displays the name, age, year of birth and ID of the paatient
// See expected output in question file.
void Patient::displayPatient()
{
}
// getName returns the class data member 'name'.
string Patient::getName()
{
// enter code here
return name;
}
// getAge returns the class data member 'age'.
int Patient::getAge()
{
// enter code here
}
// getDOByear returns the class data member 'DOByear'.
int Patient::getDOByear()
{
// enter code here
}
// getID returns the class data member 'ID'.
int Patient::getID()
{
// enter code here
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started