What horizontal row the chip is sitting in

Assignment Help Computer Engineering
Reference no: EM131917219

Assignment: Structured Programming Using Procedural Languages

Project

For your second project, you are going to write a simple program. You are going to design game that has a "chip" that will move on the game's "board". Like the DotCom object we built in our Week Six Lab, the game will not have any graphical elements. Instead, the program will communicate to the user via the monitor what actions need to be done (i.e., the board must be imagined by the user). After each action of the chip on the board, the program will respond if it was successful or not.

The size of the board in this game is 64 square locations. So, each side of the board has 8 rows of spaces we can place the chip. A visualization of the board and a chip:

Now, the only thing this chip is going to do is move around the board. The chip has rules about its movement and you will have to develop the algorithms to move the chip as described:

1. The chip will start by being "placed" on one location on the board (like above).

a. When being placed on the board, the new chip will need to know:

i. The number of total squares in the board.

ii. What horizontal row the chip is sitting in.

iii. What vertical row the chip is sitting in.

2. The chip may move in any direction on the board: horizontally, vertically, or diagonally.

a. When the chip moves in a vertical or horizontal direction, it moves 2 spaces in that direction.

b. When the chip moves in a diagonal direction, it moves 1 space in that direction.

3. The chip may not move off the board. If an attempt to move off the board occurs, the chip will move as far as it can and then stop at the board's edge.

4. Each time the chip moves, a message will be display to the screen (i.e.; System.out). There are two types of messages that will be displayed; if the move worked or if it bumped into an edge.

a. When a move is successful, the message "Good Move" will be displayed to the user.

b. When a move is not successful, the message will tell the user what edge of the board they bumped into.

i. "Hit left edge"

ii. "Hit right edge"

iii. "Hit top edge"

iv. "Hit bottom edge"

c. In addition to being displayed to the screen, the same message will also be returned to the method's caller (i.e., via a String object).

5. The chip will answer what row it is on for the horizonal or vertical direction when asked.

As you did in Project one, you are going to have to create a tester program to test out all the different algorithms you created in you class. But this time, you do not need to submit that program. I am only going to be assessing your "Chip" class for this project. Make sure you test out all the functionality that you design. I have my own tester program that is going to call your class. It will test out all the functionality requested when I am grading.

Just to reiterate what I have said, there are going to be many ways to solve this problem. That is fine and expected. We all see things within our environment differently, and that characteristic is more of a benefit in a team of programmers, than a negative.

Do not wait to start this assignment. This might seem simple on the surface, but there is a lot of conditional decisions to make it work as described. Spend time to map it out before doing to much coding of the process.

What to turn in:

1. A digital copy of your Java source code (submitted via Sakai as an attachment). For this first assignment, please submit the source code for the class you created. You can attach the file you created to Sakai. You also can place it in a zip file if you wish. Please do not submit your source code pasted in a Word document. Text files only (.java or .txt).

Attachment:- Project.rar

Reference no: EM131917219

Questions Cloud

Write a one-page email in which you list the key factors : Assume the role of a mid-level manager of a small company. The CEO, Rachael Barker, wants your views on a new computer network she is considering.
Explains the purpose of the report : An introduction to the report that explains the purpose of the report, the significance of the topic, and a preview of the main points to be discussed
What could regulation achieve based on bitcoin short history : A paper published anonymously in 2008 outlined a method for creating a digital currency that could be exchanged on a peer-to-peer basis.
What is the present value of the float : The applicable daily interest rate is 0 percent. What is the present value of the float? Assume each month has 30 days.
What horizontal row the chip is sitting in : What horizontal row the chip is sitting in. The chip may move in any direction on the board: horizontally, vertically, or diagonally.
What control do you have over use of personal information : Review the materials on privacy issues in this chapter and then log on to the website for an Internet vendor that you, or someone you know, has used.
Discuss disparities related to ethnic and cultural groups : Discuss disparities related to ethnic and cultural groups relative to low birth weight infants and preterm births - Identify at least one support service
Prepare a thorough company swot analysis : Prepare a thorough company SWOT analysis with brief explanations and don't forget to include the current financial situation.
Economy probability of state of economy portfolio return : State of Economy Probability of State of Economy Portfolio Return. Calculate the expected return.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd