Building a Personal Check Program in Java

What is the task involving the creation of a personal check in Java?

The task is to build a Java program that mimics the creation of a personal check. The program core functionality resides in a class named CheckProducer and uses a method called generateCheck(), which accepts parameters like an integer for check number, a string for payee's name, and a double for the amount, and returns a string that looks like a check. Additional methods can be created as needed, for example, transforming the number amount into words.

What is the main functionality of the Java program for personal checks?

The main functionality of the Java program involves creating a class named CheckProducer with a method generateCheck(). This method formats the input data like check number, payee name, and check amount, and returns a string resembling a personal check.

This exercise asks you to design a Java program, which simulates creating a personal check based on user input. The core functionality of your program should reside in a class named CheckProducer. This class needs to have a public method called generateCheck(), which formats the data it receives in its parameters; an integer for the check number, a string for the payee name, and a double for the amount of the check, and then returns a string resembling a personal check.

You can also create additional methods in your CheckProducer class to simplify the logic as needed. The tricky part of this task might be converting the numeric amount into words. You could break down this task into simpler methods that handle each part: hundreds, tens, and ones. Once each part is transformed into words, you can then combine these parts into the complete monetary amount.

An important point to remember is that the check number logic only needs to support values up to hundreds of thousands, and it should support the standard number of digits (2) for cents. The main method of your application will accept user input for the check number, payee name, and the check amount, and print out the simulated check by calling the generateCheck() method of your CheckProducer class.

← Understanding key roles in the scrum process Investigating the physics of jumping in athletics →