Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using JAVA Summary Build an interactive software application, a simulation, or a game. Program Description Write a program that demonstrates the skills weve learned throughout

Using JAVA

Summary Build an interactive software application, a simulation, or a game.

Program Description Write a program that demonstrates the skills weve learned throughout this quarter. This type of project offers only a few guidelines, allowing you to invest as much time and polish as you want, as long as you meet the program requirements described below. You can write a simple game (e.g., tic-tac-toe, Battleship), a simulation (e.g., a zero-dimensional energy balance model of the climate), or an application (e.g., a mortgage calculator). Your main requirement is that you demonstrate six of the following features in your software program and that you comment and document your code well:

1. FunctionalDecomposition: Usemethods(a.k.a., functions)tobreakupalargeprograminto meaningful chunks, using input to and output from those functions where appropriate. 2. Looping with Repetition Control Structures: Use two of the following structures: for, while, do/while, foreach. 3. Nested Loops: Use a loop within a loop in your program. Note that this is automatically accomplished when using Multi-Dimensional Arrays. 4. Branching with Selection Control Structures: Use multiple (i.e., more than one) if/else and/or switch statements in your code. (You dont need to use both kinds of statements. if/else means any kind of if/else statement.) 5. File I/O: Read from or write to a le in your software. Examples of this include be reading in a preset pattern for the computer opponents answers in a game of rock/paper/scissors, or writing a le that logs each move the player makes, effectively recording a history of the game. 6. Using Multiple Classes: Build and use more than one class in your project. Note that a classthatonlyhasamainmethodanddoesnothaveanyinstancevariablesormethodsdoes not count as a class in this feature. Thus, if you have a driver class that only has a main method and you want credit for this feature, you need at least two other classes in addition to the driver class. 7. One-dimensional arrays: Make use of a one-dimensional array in your software. If it is a partially-lled array, keep track of its current number of live elements with an int. 8. ClassDesignusingAccessModiers: Makeallclass-wideinstancevariablesprivateinyour class, and provide getters and setters to get and set the data accordingly. 9. Multi-Dimensional Arrays: Make use of an array with a dimensionality greater than one. 10. Recursion: Include a recursively designed function in your software, complete with (a) the recursive step and (b) the base step. (We did not cover this in the course, but if you know how to use it and want to, Im willing to count it as a gradable feature for this assignment.) 11. VariableTracingandTesting: Includeamethod(s)thatcanbeusedtoprovideoutputfortracingvariablesforthepurposeoftestingwhetheryourcodeisworking. Themethod(s)should be called test-something, e.g., testStatistics. Somewhere in your program, there should be a call to that method(s). In the code you submit, that call should be commented out, but I should be able to nd it.

A few thoughts: Dont be intimidated by the requirements above. Reuse, reuse, reuse! Think about how you can you accomplish multiple goals simultaneously. For example, doesnt reading input from a le accomplish both File I/O and Looping with Repetition Control Structures? If you dont know where to start, take an example that looks interesting to you and start by adding to it. NB: The requirement to comment and document your code well is in addition to the six features youve chosen.

Finally, list which six of the above features you used in your program. Make sure you number these features from one to six; the order doesnt matter (This list will be turned in on a separate .txt file).

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago