Skip to content

Annnamarie/Project-1---Clocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project 1 - Clocks

This project is to develop a clock. A user is able to add in seconds, minutes, and hours. It will also display both the 12-hour clock and the 24-hour clock. The menu will have options for the user to choose from which is to add hour, add minute, add second, and to exit the program. It will also include input validation.

I did particulary well overall. I was able to create a clock class with methods such as addHour(), addMinute(), addSecond(), get12HourFormat(), and get12HourFormat(). I was also able to incorporate input validation so that it input exceeds the 60 seconds, 60 minutes, and 24 hours then it will provide an error message and ask for user input again.

The input validation was only accounted for integers. The code could be enhanced with input validation for strings and characters as well to avoid issues.

I had a tough time with converting to a 12 format hour. It kept giving me errors and would not covert correctly. I was able to overcome this by having a new variable named adjustedHours. Once this was implemented, the program worked perfectly as I intended.

Skills such as input validation, loops, object oriented concepts such as inheritance, and documentation are transferrable to other projects and coursework.

Following industry standards such as white spaces, naming conventions, documentation, and utilizing classes and methods helps the program maintainable, readable, and adaptable.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published