Wednesday
April 1, 2015

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 ...
c++ programming - Solve the following problem. Apply all the steps i.e ...
object oriented programming - Write a program that takes as input the ...
math - Four students, Rick, Robin, Ryu, and Roy are registered for the same ...
Algebra 2 - Dawn is writing a computer program to find the salaries of her ...
Computer Programming - I must write a program using Java that calculates the ...
programming - I have been stuck on this problem in my software design class and ...
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, ...
Programming - Here is the question that I need help to write the code for the ...

Members