• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help to complete assignment  RSS feed

 
Kris Patel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create main class ClockTestthat instantiate and invoke methods from the class Clock
5.Design a class called Clockthat includes the following elements:
6.Three attributesrelated to the hours, minutes and seconds
7.Accessormethods
8.one mutatormethod that modifies all variables
9.Methods to incrementeach attribute with 1
10.Overloadingmethods to increment the attributes with a value entered by the user
11.One default constructorthat sets the clock to 0 hours, 0 minutes and 0 seconds

12.An overloading constructorthat sets the clock to a given time (hr, min, sec)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37513
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kris,
This is just a copy of your homework assignment. You need to ask specifically what you need help with. Nobody is going to Do your Homework for you.

The first step is to write an empty class called Clock. Can you do that? Can you give it attributes? Etc. Post how far you get and what specifically you get stuck on.
 
Kris Patel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Done with this
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!