APPLIED PROGRAMMING ASSIGNMENT 4 SOLUTION.ZIP

APPLIED PROGRAMMING ASSIGNMENT 4 SOLUTION

In this task, you are going to write a C++ class to handle very large numbers. The following prototype is given.
class LLONG
{
public:
LLONG();
LLONG(int);
LLONG(const LLONG &);
~LLONG();
void add(const LLONG &);
void subtract(const LLONG &);
void multiply(const LLONG &);
void divide(const LLONG &);
void mod(const LLONG &);
std::ostream & output (std::ostream &);
int compare(const LLONG &);
// return 0 for equal, 1 for , -1 for <
private:
... // your design here
... // you are not allowed to use string here
};
GUIDELINES
Do not alter the public part of the class. Design is important. You are not allowed to use the string class as the underlying storage of the large integers. Note that there will be no upper limit on the size of numbers provided that the computer has sufficient memory.
Do not hesitate to ask your lecturer or lab tutor if you are unsure of anything or encounter any difficulties. (Remember it is typically the software developer’s responsibility to clarify the requirements of the software with the client.)
Important: YOU MUST SUBMIT A MAKE FILE that compiles your code on Banshee.
To show all the warnings, you should compile with the -Wall option. Your code should compile without any warnings.
As usual, please start early. I am always happy to discuss with you about the idea.
SUBMISSION
Submit your program (and Makefile, if any) via the submit command.
submit –u userid –c CSCI124 –a ass4 filenames
Please make sure you receive the submission receipt after submitting your files.
Remember that you have to put the following information on the header of each source file you will be submitting in this assignment:
• Student name
• Student number
• Lab
Please also submit a hard copy of your code to one of your tutors or the lecturer anytime before wednesday in week 11 or (during the lecture or the consultation time of the lecturer) after you obtained your submission receipt.
An extension of time for the completion of the assignment may be granted in certain circumstances. A request for an extension must be made to the Subject Coordinator before the due date. Supporting documentation must accompany the request for extension. Late assignments without granted extension will be marked but the mark awarded will be reduced by 1 mark for each day late. Assignments more than 3 days late will not be accepted.
For late submission, please use the command:
submit –u userid –c CSCI124 –a ass4-late filenames
Powered by