| | |
helpppp
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 6
Reputation:
Solved Threads: 0
I am having a serious problem with a assignment i must do, this is the final assignment and the person that used to help me is not helping me anymore, i need to recieve a good grade on this assignment, and i dont know how i can because i dont know the material!! can someone please be willing to help me with this code..i am willing to pay thank you
>>dont know how i can because i dont know the material!!
I'd say you better start by reading the books and other material, and doing the exercises at the end of each chapter. You won't learn how to program is other prople do your work for you. Yes, we will help, but only after you post code to show you are making efforts.
I'd say you better start by reading the books and other material, and doing the exercises at the end of each chapter. You won't learn how to program is other prople do your work for you. Yes, we will help, but only after you post code to show you are making efforts.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: Jun 2008
Posts: 182
Reputation:
Solved Threads: 18
•
•
•
•
can someone please be willing to help me with this code..i am willing to pay thank you
well, if you're not lazy beyond hope of recovery...

Some people (me included) could feel offended by posts like yours - being offered money for what? homework?
Try to follow Ancient Dragon wisest advice.
Last edited by mrboolf; Nov 30th, 2008 at 6:38 pm.
•
•
Join Date: Nov 2008
Posts: 6
Reputation:
Solved Threads: 0
Thank you I will post the assignment, maybe someone will be able to solve it for me because I have no interest in this class but I had to take it for graduation.
Problem Statement
Combine the Time class of Figs. 10.8–10.9 and the Date class of Figs. 10.17–10.18 into one class called DateTime; and add the following modifications: (if anyone is interested in helping me i can send the figs. in a seperate file.)
1. Include a tick member function that increments the time stored in a DateTime object by one second. The DateTime object should always remain in a consistent state. Thus, if the current time of a DateTime object is 11:59:59 AM, calling the tick member function will increment the DateTime object by one second, and therefore changing the current time to 12:00:00 PM.
2. Perform error checking when initializing the values for data members year, month, and day as follows:
a. The initial value for data member year should be greater than 1900; otherwise, set year to 1900.
b. The initial value for data member month should be between 1 and 12; otherwise, set month to 1.
c. The initial value for data member day should be between 1 and the number of days in the current month; otherwise set day to 1. The number of days for the month of Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec are 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, respectively. Note however, if it is a leap year, the number of days in the month of Feb is 29 instead of 28. A leap year is either a year that is divisible by 400 or a year that is not divisible by 100 and is divisible by 4.
3. Provide a member function nextDay to increment the day by one. The DateTime object should always remain in a consistent state. For example, if the current date of a DateTime object is 12-31-2004, calling the member function nextDay will increment the day by one to 1-1-2005.
To test whether nor not your DateTime class is correct, you can run the following DateTimeTest.cpp program (see next page). This program makes use of the DateTime class that you must develop. When this program is executed, the first portion of your program output should look similar to the following:
Universal time: 23:59:57 12-31-2004
Standard time: 11:59:57 PM 12-31-2004
Universal time: 23:59:58 12-31-2004
Standard time: 11:59:58 PM 12-31-2004
Universal time: 23:59:59 12-31-2004
Standard time: 11:59:59 PM 12-31-2004
Universal time: 00:00:00 1-1-2005
Standard time: 12:00:00 AM 1-1-2005
Universal time: 00:00:01 1-1-2005
Standard time: 12:00:01 AM 1-1-2005
.
.
.
Problem Statement
Combine the Time class of Figs. 10.8–10.9 and the Date class of Figs. 10.17–10.18 into one class called DateTime; and add the following modifications: (if anyone is interested in helping me i can send the figs. in a seperate file.)
1. Include a tick member function that increments the time stored in a DateTime object by one second. The DateTime object should always remain in a consistent state. Thus, if the current time of a DateTime object is 11:59:59 AM, calling the tick member function will increment the DateTime object by one second, and therefore changing the current time to 12:00:00 PM.
2. Perform error checking when initializing the values for data members year, month, and day as follows:
a. The initial value for data member year should be greater than 1900; otherwise, set year to 1900.
b. The initial value for data member month should be between 1 and 12; otherwise, set month to 1.
c. The initial value for data member day should be between 1 and the number of days in the current month; otherwise set day to 1. The number of days for the month of Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec are 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, respectively. Note however, if it is a leap year, the number of days in the month of Feb is 29 instead of 28. A leap year is either a year that is divisible by 400 or a year that is not divisible by 100 and is divisible by 4.
3. Provide a member function nextDay to increment the day by one. The DateTime object should always remain in a consistent state. For example, if the current date of a DateTime object is 12-31-2004, calling the member function nextDay will increment the day by one to 1-1-2005.
To test whether nor not your DateTime class is correct, you can run the following DateTimeTest.cpp program (see next page). This program makes use of the DateTime class that you must develop. When this program is executed, the first portion of your program output should look similar to the following:
Universal time: 23:59:57 12-31-2004
Standard time: 11:59:57 PM 12-31-2004
Universal time: 23:59:58 12-31-2004
Standard time: 11:59:58 PM 12-31-2004
Universal time: 23:59:59 12-31-2004
Standard time: 11:59:59 PM 12-31-2004
Universal time: 00:00:00 1-1-2005
Standard time: 12:00:00 AM 1-1-2005
Universal time: 00:00:01 1-1-2005
Standard time: 12:00:01 AM 1-1-2005
.
.
.
C++ Syntax (Toggle Plain Text)
//DateTimeTest.cpp //This cpp file tests your DateTime class. #include <iostream> using std::cout; using std::endl; // include definitions of class DateTime #include "DateTime.h" int main() { const int MAXTICKS = 30; //instantiates object dt of class DateAndTime DateTime dt( 12, 31, 2004, 23, 59, 57 ); for ( int ticks = 1; ticks <= MAXTICKS; ticks++ ) { cout << "Universal time: "; dt.printUniversal(); // invokes function printUniversal cout << "Standard time: "; dt.printStandard(); // invokes function printStandard dt.tick(); // invokes function tick } // end for cout << endl; return 0; } // end main
Last edited by Ancient Dragon; Nov 30th, 2008 at 6:44 pm. Reason: add code tags
•
•
Join Date: Jun 2008
Posts: 182
Reputation:
Solved Threads: 18
Well you misunderstood me completely, I think.
I'll assume it's my fault, so I'll try to be clearer:
There's not a single person here that will do your homework for you. And I'd add "thank God for this!", although you might feel frustrated because of this.
Keep in mind that if you don't have interest in doing your homework and consequently in passing your class we have even less interest in doing your job for you.
Read the forum rules for more detailed explanations.
I'll assume it's my fault, so I'll try to be clearer:
There's not a single person here that will do your homework for you. And I'd add "thank God for this!", although you might feel frustrated because of this.
Keep in mind that if you don't have interest in doing your homework and consequently in passing your class we have even less interest in doing your job for you.
Read the forum rules for more detailed explanations.
Do we really give a shit? NO. There are many things in life we have to do but don't like to. Learn to deal with it and do the work you are given.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: Jun 2008
Posts: 182
Reputation:
Solved Threads: 18
I am here to learn. Sure I'd like to earn money with my work someday - but with a honest WORK. This is not a work, is helping some cheater who thinks he's better than the others, and I don't like to do this neither with nor without money.
You said take and you said well. Learn the difference between take and earn.
Have fun with your trying-to-go-on-without-effort future life.
Bye.
You said take and you said well. Learn the difference between take and earn.
Have fun with your trying-to-go-on-without-effort future life.
Bye.
![]() |
Similar Threads
- Audio Not Playing (Windows NT / 2000 / XP)
- helpppp! (Visual Basic 4 / 5 / 6)
- Startup Problem EMERGENCY! (Windows NT / 2000 / XP)
- Math/computerscience Log Problem- Helpppp (Computer Science)
Other Threads in the C++ Forum
- Previous Thread: Need Help writing a c++ simple program
- Next Thread: map<string,string> error
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamic email encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





