Question
Using C++ Implement the three member functions specified in student.h. It needs to work on both unix and windows and be able to gcc. STUDENT.H
Using C++ Implement the three member functions specified in student.h. It needs to work on both unix and windows and be able to gcc.
STUDENT.H
#ifndef STUDENT_H
#define STUDENT_H
#include
using namespace std;
class Student
{
public:
Student(const char initId[], double gpa);
bool isLessThanByID(const Student& aStudent) const;
bool qualifyForHonor(double minGpaForHonor) const;
void print()const;
private:
const static int MAX_CHAR = 100;
char id[MAX_CHAR];
double gpa;
};
#endif
STUDENT.CPP
#include "student.h"
//implement the required 3 functions here
void Student::print() const
{
cout
}
APP.CPP
#include "student.h"
int main()
{
Student s1("G10", 3.9);
Student s2("G20", 3.5);
s1.print();
s2.print();
//write code to test Student::isLessThanByID
//write code to test Student::qualifyForHonor
return 0;
}
member functions specifi Implement the three implementation in student.cpp: ed in student.h. You need to fill in the . Student(const char initId[], double gpa) the above function will initialize a newly created student object with the passed in value . bool isLessThanByID(const Student& aStudent) the above function will compare the current student object with the passed in one by id. bool qualifyForHonor (double minGpaForHonor) the above function will return true if the student's gpa is higher than "minGpaForHonor") app.cpp is used to test your code. You need to fill in the blank to test the above functions you create for Student classStep 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