challenges

icon picker
challenge 2

How about an app to organise your sleeping and waking?

Brief

Design and create a simple app that handles basic data about the time you sleep and wake up.
Here are some data ideas:
enter bed time
enter sleep hours
set alarm to wake up

These are only suggestions, you can come up with your own ideas but try to keep things simple for now.

Sketching your ideas

The program has to ask the user to enter a few values of different types (integer, real, String, boolean).
What simple results could you produce by doing some basic calculations or String work as you have seen in the tutorial tasks?
What will the output look like?
Keep the time values to hours only or minutes only (unless you are confident enough to handle both). Remember 7.25 hours is not the same as twenty-five past seven.

Coding

Create a new java repl project and get coding!
Build your code one thing at a time, test properly after each step before moving onto the next
Start with declaring your variables
Move on to getting the program to ask the user to enter data
Try displaying the data without any calculations yet
Now introduce some calculations
Finally display results

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.