Lab 03 Art Generator Objective: Write a program that generates every monochrome image of a given size! Requirements: • The user enters 2 non-zero, positive, whole numbers (x and y) o These are to be...

its a file


Lab 03 Art Generator Objective: Write a program that generates every monochrome image of a given size! Requirements: • The user enters 2 non-zero, positive, whole numbers (x and y) o These are to be used as dimensions for a 2D array • Make sure to check for valid inputs, so no negative numbers or 0. o If the user enters a 0 or negative value, then end the program • Each item in your array will be one of two characters, a space (“ “) or a block (“█”) (you can find the block character here and copy and paste it into your string/character: https://theasciicode.com.ar/extended-ascii-code/block-graphic- character-ascii-code-219.html) • Print out a random combination of those characters until the user decides to quit Example Dialog: Welcome to the 2D art generator! We will now define the size of your canvas. Please input your x: 2 Please input your y: 2 Art generation starting... Random Art Piece #1: █ █ Generate another? Yes Random Art Piece #2: █ █ Generate another? Yes Random Art Piece #3: █ ██ Generate another? No https://theasciicode.com.ar/extended-ascii-code/block-graphic-character-ascii-code-219.html https://theasciicode.com.ar/extended-ascii-code/block-graphic-character-ascii-code-219.html Program exit... Solution Tests: 1. Is your name written as a comment in all source files? 2. Does the solution compile (no syntax errors)? 3. Enter the value 2 and 2. Does the art match the size of the art above? 4. Enter the value 3 and 4. Does this generate art with the size 3x4? 5. Enter the value -1. Does the program stop immediately? Lab Report Questions: 1. Create a flow chart for your proposed solution 2. Explain the difference between a single and multi-dimensional array 3. Explain why for loops are best used for arrays over while loops. Finally: Upload the .java file to the CSCE Dropbox
Sep 28, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here