Saturday
November 29, 2014

Homework Help: object oriented programming

Posted by sara on Monday, April 18, 2011 at 10:02am.

We want to define a class clockType, to implement the time of day in a program. The time is represented as a set of three integers: one to represent the hours, one to represent the minutes, and one to represent the seconds. We also want to perform the following operations on the time:
1. Set the time to secs = 0, mins = 0, and hrs = 0 implicitly when an object of type clockType is declared
2. Set the time to a specific value
3. Print the time
4. Increment the time by one second
5. Increment the time by one minute
6. Increment the time by one hour

1. Write the definition of the class clockType including the definition of the different methods.

2. Write a main program to test the various operations of the class clockType.

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

computer science - to write a report on Object-Oriented Systems. The report ...
Computer Programming - I must write a program using Java that calculates the ...
Programming - Design a program in pseudocode that calculates the amount of money...
math - Three students, Chris, Vlad, and Steve, are registered for the same class...
programming - I have been stuck on this problem in my software design class and ...
object oriented programming 1 - write a c++ program that calculates the area of ...
calculus - Suppose the following about a certain object: I. The object's ...
Programming - Here is the question that I need help to write the code for the ...
Programming - Design a program in pseudocode that calculates the amount of money...
programming - a) Define a Cat class. A Cat has name. Define two constructors, ...

Search
Members