Additional Practice
本页目录· 2 条
Code challenge
You are required to write a Java program that will display the time. Keep in mind that to facilitate OOP type design, you must write your code so they are reusable. Thus for this program, you must appropriate the following design:
You are required to follow the above guidelines when designing your program. For now, you do not need to do validations to check if the time is correct. The objective is to ensure you understand a multiple object creation, working with multiple classes, and invoking methods using objects.
Hint: You do not need conditional statements right now—this is something we will learn in upcoming lessons. The program can be done without these. Also remember the modulus (%) operator, it might be useful here.