Write a program to produce shapes out of Unicode characters.The program displays a user menu which asks a user to select a shape:1 Square2 Diamond*****The program then asks the user to enter any character with which to fill the shape, such as *, or enter nothing for the programs default character set. This default entails filling the shape with the characters of the alphabet according to their sequential Unicode decimal value (see http://unicodelookup.com ). Therefore, the number of characters in each shape should at least accommodate the entire alphabet. For example, a square might look like:A B C D E FG H I J K LM N O P Q RS T U V W XY Z a b c de f g h i jYour program must draw these shapes iteratively that means using loops with integers to create and generate your letters. You do not get to use Swings pre-built shape methods. If you want output in applet form, you must adjust coordinates such as in g.drawString( , x, y) with each loop iteration. It is preferred that you submit the program in non-applet (command-line) form.
5/5 – (2 votes)
Reviews
There are no reviews yet.