Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Summary The purpose of this assignment is to construct two separate Java programs that produce three distinct levels or boards similar to those found in
Summary
The purpose of this assignment is to construct two separate Java programs that produce three distinct
levels or boards similar to those found in the Super Mario Brothers brand of games. These Java
programs will rely on method calls to reduce redundancy in your software. Additionally, you will get to
know the website tools and submission procedure to use for future homework.
Work Items
In lab, you should have already installed the Java JDK and the BlueJ IDE on your home computer.
If you have not yet done so please do so as you will need both in order to do this homework.
If you dont want to use BlueJ, you dont have to; feel free to use any programming
environment you wish. But Ill be using BlueJ much of the time in lecture.
Draw a flow chart of your second program On Page # That is to say, create a flow chart of
only the contents of the runProgramTwo method as named below in item d You can treat
methods called in the runProgramTwo method as black boxes ie you dont have to draw
flow charts for those submethods Submit the image file of a scan of this flow chart:
a The chart may be handwritten and can be more than one page. Please make it legible.
b Your image file can be PDF JPG TIF, or PNG
c Please submit only one image file via Canvas. Do not email your instructor your work.
d Name your file LastFirstHWMethods.pdf or whatever is the extension for the graphic
format youre using where you put in your own last name and first name for Last and
First You must name your file this way.
Write the two programs described below. Submit the single Java file iejava text file that
contains your two programs:
a Please submit only a single Java file via Canvas below I describe how you put two
programs into one file Do not email your instructor your work.
b Name your Java file LastNameFirstInitialHWMethods.java, where you put in your
own last name and first name for Last and First You must name your file this way.
c Note that by requiring you name your Java file LastFirstHWMethods.java, it means
that the public class that is in that file has to be named LastFirstHWMethods again
substituting your own name as appropriate Note, in general you wouldnt put your
name in the class name and thus filename but in this course, it will simplify things for
the grader.
d Each of your programs should be called by a method. Those methods should be written
in the same class as your program. Your Java file should have a main method that calls
these two methods. You probably will have a main method that looks like this:
Homework: Methods CSS: Computer Programming I
CSS University of Washington, Bothell
public static void mainString args
runProgramOne;
runProgramTwo;
Context
Lets consider how we might represent a level from the game Super Mario Bros using just the symbols
on a keyboard. Specifically, look at the level design for the first board, and lets see if we can recreate
some of the patterns we observe below.
We could model the ground with a minus sign, equal sign, or an underscore:
Next we could add some boxes to our level some of the coin and powerup boxes seen
between the bricks in the beginning of the level along with bricks denoted by the sign:
To make our task simpler here, were going to rotate our perspective degrees so that we view
the board topdown instead of lefttoright Just think of this as an exercise in changing your
culturally adopted reading style. Some cultures read lefttoright as you are doing now, and
some read toptobottom; can you think of any languages that are represented differently than
this? Either way lets
R
o
t
a
t
e
Homework: Methods CSS: Computer Programming I
CSS University of Washington, Bothell
Introduction
Your task is to write a program that outputs two distinct levels or boards from a Mario game. Your level
will be constructed from multiple smaller segments that you will string together by calling the correct
functions from your main function remember the terms method and function for our purposes,
are interchangeable Here is an example Mario level note that some parts of the board are duplicates
use methods for all segments to avoid duplicate code:
segment
segment
segment
Note that by changing our perspective, the character now represents the ground while the hyphen
represents vertical towers or other vertical structures that are not the ground The text that kind of
hovers in the air, egsegment are comment lines that indicate the portion to the left can be
thought of as a unit or chunk o
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started