Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please type code dont write on pen/pencil. Test/run before sending. USE CONSTANTS PROVIDED BELOW. Please make it catch the following errors: Size is not a

Please type code dont write on pen/pencil. Test/run before sending. USE CONSTANTS PROVIDED BELOW.
Please make it catch the following errors:
Size is not a valid number
Multiple numbers entered for size
Size is an odd number within bounds
Size is out of bounds
Size is both odd and out of bounds
Upwards triangle character is more than one character
Upwards triangle character is out of bounds
Downwards triangle character is more than one character
Downwards triangle character is out of bounds
Downwards and Upwards triangle characters are the same
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Program 2: RadioactivePinwheel Write a Java application (RadioactivePinwheel.java) that displays the following radioactive pinwheel design to the terminal using nested loops. The user will be required to enter the size of the pinwheel and can optionally specify the characters to use to draw the pinwheel. Like ShortLongWords from PA2, this is a standalone application with no graphical elements (you do not need objectdraw or Acme.MainFrame for this program) Example: *0000000 **00000*** **000*** size number of rows upward triangle downward triangle 00000***00000 000****000 0***0 size: 8 upward triangle char: downward triangle char: o Requirements for this Program You may only print one character at a time. Do not use a string with the pattern. You are not allowed to use a String or StringBuilder or StringBuffer or any data structure to build each line to be output. You must calculate how many times to loop printing a single upward triangle character at a time, how many times to loop printing a single downward triangle character at a time, and how many times to loop printing a single space character at a time You must create at least one helper method. Try to modularize your design so you don't have all of your code in one giant main) method. Think about how you could split up the different parts of the program (hint-the way the writeup splits up the different parts of the program is a good place to start that train of thought)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago