Develop a menu-based shape-maker, using randomly generated sizes & characters: pyramid, inverted pyramid, diamond, and hourglass. Use functions to perform tasks, including separate functions for generating a random integer in a range and for generating a random character in a range. The four different shapes are made from a randomly generated printable character and a randomly generated maximum width between 4 and 12. Beneath the shape, print a descriptive caption stating the symbol and the maximum width.
Develop a menu-based shape-maker, using randomly generated sizes & characters: pyramid, inverted pyramid, diamond, and hourglass. Use functions to perform tasks, including separate functions for generating a random integer in a range and for generating a random character in a range.
The four different shapes are made from a randomly generated printable character and a randomly generated maximum width between 4 and 12. Beneath the shape, print a descriptive caption stating the symbol and the maximum width.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images
In java how can I define the random integer and random character functions in a separate class in a separate source code file and call these functions from the shape maker