Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Java Program)In this assignment inspired by the Oracle Academy, youll find a way to draw basic shapes programmatically in customizable sizes. For example (you may

(Java Program)In this assignment inspired by the Oracle Academy, youll find a way to draw basic shapes programmatically in customizable sizes.

For example (you may use * or # for your shapes)

5x4 Rectangle

5x5 isosceles right triangle

Given the assignment2 code on Canvas that contains the main() with several test cases: complete the following two methods:

createRectangle(): This method accepts two arguments for width and height which should be used to print a rectangle

createTriangle(): This method accepts one argument for the size of a leg, which should be used to print an isosceles right triangle

You must not hardcode the shapes or any of the dimensions, but you may use loops, branching, etc.

Do not use Arrays: they are not a part of this assignment.

1. Include comments (as in example code on Canvas and in textbook) and follow standard formatting (as shown in class and in the book);

2. Compile and run without errors;

3. Produce the output per instructions;

4. Use the Java concepts and structures per the instructions, e.g. methods, loops, etc.; overcomplicated logic or code that could be written in a simpler/more straightforward/more efficient/etc. way will likely result in points off.

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_2

Step: 3

blur-text-image_3

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

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

Describe three other types of visual aids.

Answered: 1 week ago

Question

Prepare an ID card of the continent Antarctica?

Answered: 1 week ago

Question

9. System creates a large, diverse talent pool.

Answered: 1 week ago