Cse 1223 project 12 (simple clock)

Overview

You will be writing portions of a Java class that models a very simple clock.  You will also be provided with two different “front ends” that use this same class as a plug-in – a simple program that loops through the time for a full hour of time, displaying each passing second on your screen, and a slightly more complex program that displays the time in a window and allows you to update it with a click of a button.  If you have coded your clock class correctly, these two programs provided will just work when you run them.

Don't use plagiarized sources. Get Your Custom Essay on
Cse 1223 project 12 (simple clock)
From as low as $8/Page
Order Essay

Objectives

  • Practice with programming fundamentals
    • Variables – Declaration and Assignment
    • Primitive types
    • Branching: if-else if-else syntax, nested if-else syntax
    • Nested while loops
    • Methods – simple functions and procedures
    • Object-oriented programming
  • Works towards the following Course Goals:
    • Competency with using basic coding features of a high-level imperative programming language
    • Competency with writing computer programs to implement given simple algorithms
    • Familiarity with designing simple text-oriented user interfaces

Project 12 Description

This lab is structured differently than previous labs.  For this lab you are provided with three Java files – Project12.java and ClockView.java hold code that you do not need to touch.  You will only be writing code in the file SimpleClock.java.  Create a new project named “Project 12” and import all three of these source code files into your project workspace.  All three of these files must be in the same Project folder, and must all be in the same default namespace in your Eclipse workspace.

 

Open the SimpleClock.java file.  In this file is a partial implementation of the SimpleClock class.  You must fill in the code for the constructor, as well as for the methods set, tick and time, following the instructions provided for each of these methods in the comments for these methods.

When you think that you have them working, run the Project12.java program.  You should see output like the following:

Clock starts at time: 12:00:00 AM
Clock has been set to time: 11:59:00 PM
TICK: 11:59:01 PM
TICK: 11:59:02 PM
TICK: 11:59:03 PM
TICK: 11:59:04 PM
TICK: 11:59:05 PM
TICK: 11:59:06 PM
TICK: 11:59:07 PM

… Many lines of output like the above …

TICK: 12:58:58 AM
TICK: 12:58:59 AM
TICK: 12:59:00 AM
Clock finally reads: 12:59:00 AM

Once you have that working, try running ClockView.java.  It should pop up a window with a midnight time showing and two buttons – Tick and Reset.  The Tick button should increment the clock by one second, the reset button should set it back to midnight.  Play with this interface to make sure it works as expected.

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
Confirm Eligibility