Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 1083 : Print Text Patterns The Patterns Class Tasks Write a program that prints Project 1 written by YOURNAME and calls two methods: Print

CS 1083 : Print Text Patterns

The Patterns Class

Tasks

Write a program that prints

Project 1 written by YOURNAME 

and calls two methods:

Print a triangle pattern described below. This method should ask the user for the width of the pattern, and then print the corresponding pattern.

The user should also specify the number of rows and columns in the boxes. This method should ask the user to enter the number of boxes, number of rows, and number of columns and then print that many text boxes horizontally, each box with the specified numbers of rows and columns.

Here is an example of what your output should look like (user input is in bold and underlined):

Enter width of pattern: 9 
 
 /|\ 
 //|\\ 
 ///|\\\ 
////|\\\\ 
 
Enter number of boxes: 3 
Enter number of rows: 4 
Enter number of columns: 7 
 
+-----+ +-----+ +-----+ 
| | | | | | 
| | | | | | 
+-----+ +-----+ +-----+ 

Details

Rubric

[6 Points] If your program has a method that correctly prints the triangle pattern.

[1 Points] For prompting the user for the width and inputting the value from the user.

[5 Points] For for-loops that correctly print the pattern (the correct number of lines and the correct number and location of spaces, slashes, vertical bars, and backslashes on each line).

[10 Points] If your program has a method that correctly prints a sequence of text boxes horizontally.

[3 Points] For prompting the user for the number of boxes, rows, and columns and inputting the values from the user.

[3 Points] For for-loops that correctly print the top (and bottom) lines of the boxes (the correct number and location of dashes, the correct number and location of pluses, spaces between the boxes).

[4 Points] For for-loops that correctly print the middle lines of the boxes (the correct number of lines, the correct number and location of vertical bars, the correct number and location of spaces inside and outside the boxes). .

[4 points]

If the main method of your program prints "Project 1 written by [...]" and calls the two other methods.

If your submission was a zip file named project1.zip containing a folder named project1, which contains the other files.

If your Java program was in a file named Patterns.java.

If the output of your Java program was in a file named PatternsOutput.txt.

If your program contains a comment that describes what the program does and contains a descriptive comment for each method.

If your program is indented properly.

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

Step: 3

blur-text-image

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions