Question Details

Answered: - ITK 275 - Java as a 2nd Language Chapter 9 Programming


Direction -?
Kindly find attached Java Program 9.

Thanks



ITK 275 ? Java as a 2nd Language

 

Chapter 9 Programming Assignment

 

All of the java classes should be placed in a package named

 

edu.iltu.itk275.assignment9.<your ulid>. The classes should be submitted as an

 

attachment to this assignment. They may be submitted individually or placed into a

 

single archive (.zip) file.

 


 

Part I:

 

Write an application that converts dates from numerical month / day / year format to

 

normal ?month day year? format (for example, 12/25/2000 corresponds to December 25,

 

2000). You will define three exception classes; MonthException, DayException, and

 

YearException. If the user enters anything other than a legal month number (integers

 

from 1 to 12) the application will throw and catch a MonthException and ask the user to

 

reenter the month. Similarly, if the user enters anything other than a valid day number

 

(integers from 1 to either 28, 29, 30 or 31, depending on the month and year), then the

 

application will throw and catch a DayException and ask the user to re-enter the day. If

 

the user enters a year that is not in the range 1000 to 3000 (inclusive), then the

 

application will throw and catch a YearException and ask the user to re-enter the year.

 


 

Part II:

 

Write a class LapTimer that can be used to time the laps in a race. The class should

 

minimally have the following attributes:

 

?

 

?

 

?

 

?

 

?

 

?

 

?

 


 

running - a boolean indication of whether the timer is running

 

startTime - the time when the timer started

 

lapStart - the timer?s value when the current lap started

 

lapTime - the elapsed time for the last lap

 

totalTime - the total time from the start of the race through the last completed lap

 

lapsCompleted - the number of laps completed so far

 

lapsInRace - the number of laps in the race

 


 

The class should minimally have the following methods:

 

? LapTimer(n) - a constructor for a race having n laps

 

? start - starts the timer. Throws an unchecked exception if the race has already started

 

? markLap - marks the end of the current lap and the start of a new lap. Throws an

 

unchecked exception if the race is finished.

 

? getLapTime - returns the time of the last lap. Throws an unchecked exception if the

 

first lap has not yet been completed.

 

? getTotalTime - returns the total time from the start of the race through the last

 

completed lap. Throws an unchecked exception if the first lap has not yet been

 

completed.

 

? getLapsRemaining - returns the number of laps yet to be completed, including the

 

current one.

 


 

ITK 275 ? Java as a 2nd Language

 

Chapter 9 Programming Assignment

 

Express all time in seconds. To get the current time in milliseconds from some baseline

 

date, invoke the method Calendar.getInstance()getTimeInMillis(); This method returns a

 

primitive type of long. By taking the difference between the returned values of two

 

invocations at two different times, you will know the elapsed time in milliseconds

 

between the invocations.

 


 

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Sep 18, 2020

PRICE: $15

Solution~0001185443.zip (25.37 KB)

Buy this answer for only: $15

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy from our tutoring website www.aceyourhomework.com (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Sep 18, 2020

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN YOUR SET DEADLINE.

Order Now