In addition, open source code is a very large movement among computer programmers. "Open source code" has come to mean programmer access to working programs that include source code and allow distribution in source code as well as compiled form. According to the Open Source Initiative OSI, "The basic idea behind open source is very simple: When programmers can read, redistribute, and modify the source code for a piece of software, the software evolves. People improve it, people adapt it, people fix bugs. And this can happen at a speed that, if one is used to the slow pace of conventional software development, seems astonishing." In such cases, you can add functionality to existing classes in existing programs. You might be interested in visiting the open source initiative at http://www.opensource.org/ to find out more.
In the last assignment, you have used a class without changing it. Now, you will learn to add functionality to a C++ class.
Suppose you wanted to answer questions like, "In 90 days, what will the date be?" or "in 45 days from April 15, 2004," what will the date be? You will write code to address these questions in this assignment.
main() program that prompts a user to enter a date and
then an integer.
Date.
| NOTE: | The integer parameter can be positive or negative, you will be required to think about how to implement both cases. |
|---|
const-- it should NOT change the value
of the calling date or the integer parameter.
Date object. (This
means that your function will return an object of type Date.)
cin or cout
--it should only do the computation.
print() member function useful here.
main() or other functions. Note: The only explicit parameter
sent to the new member function you create should be the integer number of
days.
x is not a good name, but InputLetter is.
// Course: CSC 306 Introduction to Programming with C++
// Name: Your Name
// Assignment #14: <Put a brief sentence about your program here.>
/*
Purpose: <Put a more in-depth description of the program here.>
*/
When you are finished writing and testing your assignment, drop your source code into the CSC306_A14 dropbox on the Academic server.