SuperTutor

(15)

$15/per page/Negotiable

About SuperTutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,Engineering,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 327 Weeks Ago, 6 Days Ago
Questions Answered: 12843
Tutorials Posted: 12834

Education

  • MBA, Ph.D in Management
    Harvard university
    Feb-1997 - Aug-2003

Experience

  • Professor
    Strayer University
    Jan-2007 - Present

Category > Programming Posted 18 May 2017 My Price 9.00

ICT104 Assignment 1

Design, write in Java, test and document a program to calculate the number of minutes between one time and another. Here are some examples:

 

TIME DIFFERENCE

 

Enter first time ( hh: mm a/pm): 12:56pm Enter second time ( hh: mm a/pm): 1:03pm

 

The difference is 7 minutes

 

Do you wish to continue (Y/N)? Y

 

TIME DIFFERENCE

 

Enter first time ( hh: mm a/pm): 1:03pm Enter second time ( hh: mm a/pm): 12:56pm

 

The difference is 1433 minutes

 

ICT104 Assignment 1 4 Do you wish to continue (Y/N)? Y

 

TIME DIFFERENCE

 

Enter first time ( hh: mm a/pm): 1:03pm Enter second time ( hh: mm a/pm): 12:65pm

 

ERROR: the second time is not valid

 

Do you wish to continue (Y/N)? Y

 

TIME DIFFERENCE

 

Enter first time ( hh: mm a/pm): 8:30 am Enter second time ( hh: mm a/pm): 5:30 pm

 

The difference is 540 minutes

 

Do you wish to continue (Y/N)?

N

The times are to be entered (on one line) in the 12 hour format with hours (1-2 digits), colon, minutes (2 digits) and then the string “am” or “pm”. You may also allow spaces. 

The program should be well-structured and should have a reasonable set of methods in addition to the main method. It should use a good coding style, proper indentation, meaningful identifiers and appropriate comments throughout. 

The program should also include a method (eg, StudentInfo( )) to output your student details (name, student number, mode of enrolment (i.e., internal or external), tutor name, tutorial attendance day and time) at the start of program results. 

Devise suitable test data to test all sections of program code. The test data together with test results should be submitted as part of your external documentation.

Hint:

1. You may consider using the following methods from the Java String class: indexOf(int char) indexOf(int char, int fromIndex) indexOf(String str) indexOf(String str, int fromIndex) to work out the index position of a character or a substring within a string;

2. and then use substring(int beginIndex, int endIndex) substring(int beginIndex) to extract the different parts of a string;

3. and then use wrapper Integer class method Integer.parseInt(String str) to convert the string such as “12” into its numerical representation (see pages 447-452 of Savitch 7th Edition or Topic 4 Lecture notes).

Answers

(15)
Status NEW Posted 18 May 2017 06:05 AM My Price 9.00

-----------

Attachments

file 1495089026-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)