Question
(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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started