$30
CSCE 240 Homework 5
You must submit a zipped, and only zipped, archive of your homework directory,
hw5. The directory shall contain, at a minimum, the files hw5/src/grade.cc,
hw5/inc/grade.h, hw5/src/rational.cc and hw5/inc/rational.h. Name the
archive submission file hw5.zip
I will use my own makefile to compile and link to your hw5/src/grade.cc,
hw5/inc/grade.h, hw5/src/rational.cc and hw5/inc/rational.h files. You must
submit, at least, these four files.
Introduction
In this assignment, you will update your Grade class to inherit from a Rational class of your creation. The
Rational object will provide an abstraction of a subset of your Grade class’ functionality. The Grade class
will extend Rational, override some methods, and provide operators for others.
Read the provided header file documentation for instructions on how the methods should work.
Points
Correctness
1. Rational::Rational: 0.8 points
2. Rational::ToDouble: 0.8 points
3. Rational::ToString: 0.8 points
4. Rational::Equals: 0.8 points
5. Rational::DividedBy: 0.8 points
6. Rational::Plus: 0.8 points
7. Grade::Grade: 0.8 points
8. Grade::ToDouble: 0.8 points
9. Grade::ToString: 0.8 points
10. Grade::operator==: 0.8 points
Total: 8.0 Points Possible
Base Submission compilation of each test (ten tests above): 0.1
points each hw5/src/grade.cc style: 0.25 points hw5/inc/grade.h style: 0.25 points hw5/src/rational.cc style: 0.25 points hw5/inc/rational.h style: 0.25 points
Total: 2.0 Points Possible
CSCE 240 Homework 5 Page 2 of 2
Testing
I have provided you basic test apps which you can use to ensure that your code is, at least partially, correct.
I would suggest a more rigorous testing scheme to ensure that your methods handle missing data.
Late assignments will lose 5% per day late, with no assignment begin accepted after 3 days (at 15% reduction in points on Monday April 11th 2022).
The End.