Description: Implement and test a C++ struct that represents an error record. An error record contains teh following information:
Error code (ASCII text)
Timestamp (TimeType)
Priority (integer between 0 and 3 inclusive)
Hi, first off my name is Adrian and I'm a college student who needs to take this level of CS for my major. Unfortunately it's been 2 years since I've even opened up any IDE and programmed.
Here are the directions:
The struct must implement the following operator overloads:
1.) Overload functions for all relational operators ( ==, !=, <, <=, > , >=). The relational operators should evaluate each member of the error record in teh following order:
Priority: One error record is logically less than another if the first has a smaller priority.
Timestamp: given two error records with the same priority, one error record is logically less than another if the first has an earlier timestamp.
Error Code: Given two error records with the same priority and timestamp, one error record is logically less than another if the first has an error code that is alphabetically less than the second.
2.) Overload function for the insertion operator (<<).
3.) The struct will be a simple C-style struct. It will not define any member functions.
This is my header file ( ErrorType.h):
http://rafb.net/paste/results/wpaqTR86.html
This is my cpp (ErrorType.cpp):
http://rafb.net/paste/results/VN48Nm14.html
This is the professor's test file that tests my .cpp and .h
http://rafb.net/paste/results/GhVnl388.html
This is the .in file (error.in)
http://www.themindofadrian.com/Error.in
Here is a .zip of all the files for easy download and compile:
http://www.themindofadrian.com/program1a.zip
Ok, I hope I'm going the right way so far. I feel as though the directions weren't given very clearly. I and others asked in class and walked away thinking we knew what to do only to feel lost after getting past TimeType.
A.) I don't know if my logic is right or I did the operator overloading right. I just copied from my notes and based it off examples.
B.) What am I to do with Errortype? I need an example of what I should be doing inside those boolean functions.
C.) Maybe a little bit easier explanation of what I'm suppose to do.
Thank you,
Adrian
If there is ANYTHING else I can give so that it might be more helpful for you to help me, please ask.
My
aim = limitx3m
yahoo = limitmaker
It might say I'm away, but I'm not.