Question: Write the code in java Egyptian Pyramid ( 2 5 points ) . Let's build a pyramid with the help of a 2 - dimensional

Write the code in java Egyptian Pyramid (25 points). Let's build a pyramid with the help of a 2-dimensional (2D) array.
Long ago, some advanced civilizations such as the Egyptians modeled their architecture to be of pyramid form: 3-Dimensional polyhedra with some polygon base and triangle-shaped flat sides meeting to a point at the top. For the sake of this assignment, we will be considering 2-D pyramids, which take the form triangles. You will be tasked with understanding and implementing 2D array(s) to create a 2-Dimensional pyramid of your own.
Overview
Oh no! During Professor Centeno's 2D Arrays lecture, a mysterious portal opened up right into the projected picture of the Egyptian pyramids, sucking all th CS111 students into another time dimension. It looks like the students are trapped in 2580 B.C. After some conversing (let's assume due to advanced language translation technology that students happened to bring), they discover that the Egyptians need assistance in building their pyramids. Since Profess Centeno did not time travel with the CS111 students, it's now up to them to help these Egyptians out.
The students need to code a program that reads two command line arguments from the terminal representing:
the overall size of their figure
the number of bricks provided-to build a pyramid.
Programming
The students are expected to use a 2D array to construct the pyramid. The pyramid is constructed using the characters 'x'(bricks) and '='(no brick).
Bricks, denoted by the symbol 'x', are to be placed beginning at the bottom left and continue until either 1) there are no more bricks or 2) the pyramid is complete.
The surrounding area is to be filled with the symbol '='.
Once the 2D array (pyramid) is constructed print:
the 2D array starting at row and column zero 0,0.
the number of bricks remaining, in the format listed below.
Note: Keep in mind that the output is expected be PRINTED into the terminal. IN JAVA
Write the code in java Egyptian Pyramid ( 2 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!