Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will be turning in your lab online at the following link on the Grade-it website: https://gradeit-hs: 00.cs.washington.edu/wcc/e This assignment will give you practice with

image text in transcribed
image text in transcribed
You will be turning in your lab online at the following link on the Grade-it website: https://gradeit-hs: 00.cs.washington.edu/wcc/e This assignment will give you practice with for loops, static methods, print/println statements and a class constant. Th. assignment is worth 16 points instead of the normal 20 points. Part A: ASCII Art (2 points): The first part of your assignment is to write a program that produces any text art (sometimes called ASCII art) picture you like. Write a Java class called AsciiArt in a file called AsciiArt.java.. Your program can produce any text picture you like, with the following restrictions and details: The picture should be your own creation, not an ASCII image you found on the Internet or elsewhere. The number of lines of output should be between 3 and 200 with no more than 100 characters per line. The picture should not include hateful offensive, or otherwise inappropriate images. The code should use at least one for loop or static method, but should not contain infinite loops. The picture must not be identical to your solution for Part B or consist entirely of reused Part B code. . Your code should not use material beyond chapter 3 of the book. If your Part A program compiles and runs successfully and meets the above constraints, it will receive the full 2 points Part A will not be graded on style (internal correctness"). Part B: Rocket Ship (14 points) In the second part of the assignment, you are going to generate output that looks like a rocket ship (see expected output files below. The default figure that you should start with is the first file. Once you get your program printing that out properly, then you can think about how to scale the figure using class constants. You are to exactly reproduce this output. The various subfigures in the middle of this output have a height of 3. These subhigures have the property that their hesht determines their width, so there is only one size variable. You are to use a 6 7 8 9 0 W E R T Y U L O P D F G H J K L Part B: Rocket Ship (14 points): In the second part of the assignment, you are going to generate output that looks like a rocket ship (see expected output fles below). The default figure that you should start with is the first file. Once you get your program printing that out properly, then you can think about how to scale the figure using class constants. You are to exactly reproduce this output. The various subfigures in the middle of this output have a height of 3. These subfigures have the property that their height determines their width, so there is only one size variable. You are to use a class constant to make it possible to change a single number in one place in the program to have it produce a corresponding figure of a different size. This assignment is meant to give you practice with the constructs from chapters 1 and 2. This will require you to create nested for loops with print and printin statements that use the class constant. You may use constructs from chapter 3 although you are not required to do so and you will receive no extra credit for doing so. You may not use any programming constructs that are not in chapters 1 through 3 of the textbook. You should continue to use static methods to structure your solution. You should try to avoid significant redundancy and you should structure your program in such a way that the methods match the structure of the output itself. You are required to properly indent your code and will lose points if you make indentation mistakes. You should localize variables whenever possible. You should once again include a comment at the beginning of your class file with basic information and a description of what the program does. You should also include a comment on each individual method describing what it does. Name your file DrawRocket.java and turn in your program electronically through the Grade-it link above. On any given execution your program will produce just one version of this figure, but it should be possible to change the value of the program constant to have your program produce a figure of a different size. For example, with subfigures of height 5. the output should look like the output 5.txt file. 3 4 5 6 7 8 9 0 - ER TY uop D F G H J K L You will be turning in your lab online at the following link on the Grade-it website: https://gradeit-hs: 00.cs.washington.edu/wcc/e This assignment will give you practice with for loops, static methods, print/println statements and a class constant. Th. assignment is worth 16 points instead of the normal 20 points. Part A: ASCII Art (2 points): The first part of your assignment is to write a program that produces any text art (sometimes called ASCII art) picture you like. Write a Java class called AsciiArt in a file called AsciiArt.java.. Your program can produce any text picture you like, with the following restrictions and details: The picture should be your own creation, not an ASCII image you found on the Internet or elsewhere. The number of lines of output should be between 3 and 200 with no more than 100 characters per line. The picture should not include hateful offensive, or otherwise inappropriate images. The code should use at least one for loop or static method, but should not contain infinite loops. The picture must not be identical to your solution for Part B or consist entirely of reused Part B code. . Your code should not use material beyond chapter 3 of the book. If your Part A program compiles and runs successfully and meets the above constraints, it will receive the full 2 points Part A will not be graded on style (internal correctness"). Part B: Rocket Ship (14 points) In the second part of the assignment, you are going to generate output that looks like a rocket ship (see expected output files below. The default figure that you should start with is the first file. Once you get your program printing that out properly, then you can think about how to scale the figure using class constants. You are to exactly reproduce this output. The various subfigures in the middle of this output have a height of 3. These subhigures have the property that their hesht determines their width, so there is only one size variable. You are to use a 6 7 8 9 0 W E R T Y U L O P D F G H J K L Part B: Rocket Ship (14 points): In the second part of the assignment, you are going to generate output that looks like a rocket ship (see expected output fles below). The default figure that you should start with is the first file. Once you get your program printing that out properly, then you can think about how to scale the figure using class constants. You are to exactly reproduce this output. The various subfigures in the middle of this output have a height of 3. These subfigures have the property that their height determines their width, so there is only one size variable. You are to use a class constant to make it possible to change a single number in one place in the program to have it produce a corresponding figure of a different size. This assignment is meant to give you practice with the constructs from chapters 1 and 2. This will require you to create nested for loops with print and printin statements that use the class constant. You may use constructs from chapter 3 although you are not required to do so and you will receive no extra credit for doing so. You may not use any programming constructs that are not in chapters 1 through 3 of the textbook. You should continue to use static methods to structure your solution. You should try to avoid significant redundancy and you should structure your program in such a way that the methods match the structure of the output itself. You are required to properly indent your code and will lose points if you make indentation mistakes. You should localize variables whenever possible. You should once again include a comment at the beginning of your class file with basic information and a description of what the program does. You should also include a comment on each individual method describing what it does. Name your file DrawRocket.java and turn in your program electronically through the Grade-it link above. On any given execution your program will produce just one version of this figure, but it should be possible to change the value of the program constant to have your program produce a figure of a different size. For example, with subfigures of height 5. the output should look like the output 5.txt file. 3 4 5 6 7 8 9 0 - ER TY uop D F G H J K L

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

Rework Problem 13.5 using the REML method.

Answered: 1 week ago

Question

Define procedural justice. How does that relate to unions?

Answered: 1 week ago