Array user interface, Computer Engineering

You were offered bonus marks for separating the user interface code from the main logic of your program. This design choice makes it very easy to replace the user interface without having to change the main program logic.

Make a copy of the class BasicUI, called ArrayUI. Within ArrayUI, make sure all references to BasicUI are renamed to ArrayUI.

In this task, you will modify the updateScreen() method of class ArrayUI to print out two lines in the following format:

....%.

_#__PX

This line gives a spatial view of where the all of the objects are. For example, the player, represented by "P" is at position 4 and is holding stone "%". The treasure chest "X" is at position 5. The stone "#" is still on the ground at position 1. This task must be implemented using two arrays of chars in class ArrayUI. The first array, called sky will hold the array of characters representing {‘.','.','.','.','%','.'} and the second array, called ground, will hold the array of characters representing {‘_','#','_','_','P','X'}. Of course, the actual characters found in the array will change as the game progresses.

Posted Date: 3/25/2013 5:52:23 AM | Location : United States







Related Discussions:- Array user interface, Assignment Help, Ask Question on Array user interface, Get Answer, Expert's Help, Array user interface Discussions

Write discussion on Array user interface
Your posts are moderated
Related Questions
Compare the basic COCOMO model with the detailed COCOMO model. COCOMO having of a hierarchy of three increasingly detailed and accurate forms. -  Basic COCOMO - is a stati

Define Memory read and write operation The transfer of information from a memory word to outside environment is known as read operation. The transfer of new information to be k

Rule in a single direction - equivalences rules: Hence there the power to replace  sub expressions always allows use to prove theorems with equivalences: as given in the above

Design issues:  To complete the maximum processor utilization in a multithreaded architecture, the following design issues have to be addressed: Context Switching time: S

Program Level This is normally the liability of OS (operating system) that runs processes simultaneously. Different programs are generally independent of each other. So paralle

Determine the layout of the specified cache for a CPU that can address 1G x 32  of memory.  show the layout of the bits per cache location and the total number of locations.  a)

Ferroelectric RAM is a random-access memory same in construction to DRAM but uses a ferroelectric layer rather of a dielectric layer to achieve non-volatility. FeRAM is one of a gr

Instruction Stream and Data Stream The term 'stream' indicates to a series or flow of either instructions or data operated on by computer. In the entire cycle of instruction ex

Subtraction of 01100-00011 using 2's complement method Ans. Firstly 1's complement of 00011 is 11100 and 2's complement is 11100 + 1 = 11101. Thus If a last carry is

Logical Representations: If all human beings spoke the same language, there would be a much more less misunderstanding in the world. The problem regarding with software engine