Question: I am using IntelliJ In this assignment you are to write a Java class called Pyramid. The purpose of this class is to enable me


I am using IntelliJ
In this assignment you are to write a Java class called "Pyramid". The purpose of this class is to enable me to draw pyramid-shaped objects (when viewed sideways) on the console. There is a single method called "draw" which takes one integer parameter, base, which is actually half the width of the base. For example, if I declare a Pyramid object P and then call its draw method, with the parameter 5, I should see the following on the output: Pyramid P = new Pyramid(); P.draw(5) results in: * It's important that you design your class (especially the draw() method) well; no unnecessary code and no brute-force cut and paste to get the job done. I don't want any artificial limit on the base parameter; I should be able to call your method with a base value of 200 if I want to. If the base value passed to the draw method is negative or zero, your method should do nothing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
