Question: public class Assignment1 { private final int HEIGHT = 11; public enum Patterns{ bottomLeftTriangle, bottomRightTriangle, topLeftTriangle, topRightTriangle, centerTriangle, }; // Write details of your algorithm

public class Assignment1 {

private final int HEIGHT = 11;

public enum Patterns{

bottomLeftTriangle,

bottomRightTriangle,

topLeftTriangle,

topRightTriangle,

centerTriangle,

};

// Write details of your algorithm

void printCenter(char ch){

}

// Write details of your algorithm

void printBottomLeft(char ch){

}

// Write details of your algorithm

void printTopLeft(char ch){

}

// Write details of your algorithm

void printBottomRight(char ch){

}

// Write details of your algorithm

void printTopRight(char ch){

Java Program

The goal of this programming assignment is to practice implementing a class in Java, using access modifiers, and developing your algorithms for a problem.

Description

- Develop a class in Java which produces the following outputs according to the input parameters

public class Assignment1 { private final int HEIGHT = 11; public enum

- Your program is going to draw 5 different triangles, (1) left-bottom right triangle, (2) right-bottom right triangle, (3) left-top right triangle, (4) right-top right triangle, (5) isosceles triangle with fixed height

- You are going to use the framework ( Assignment1.javaPatterns{ bottomLeftTriangle, bottomRightTriangle, topLeftTriangle, topRightTriangle, centerTriangle, }; // Write details of youralgorithm void printCenter(char ch){ } // Write details of your algorithm void)

- Implement the 5 print functions

- Update access modifiers of these 5 print functions

- For the isosceles triangle, since you know the height, first you need to compute the base, and then, start drawing.

printBottomLeft(char ch){ } // Write details of your algorithm void printTopLeft(char ch){

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 Databases Questions!