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
i want to make final year project in wireless.please help me to decide the topic???????

a. Explain Intermediate Representation? What are the desirable properties of Intermediate Representation? b. Explain Grammar of a language. Identify the dissimilar classes of gr

Learning Weights in Perceptrons - Artificial neural network In detail we will look at the learning method for weights in multi-layer networks next chapter. The following descri

To work with Internet as well as to utilize its facilities we use certain tools. For illustration, Telnet is a tool, which is utilized for logging on remote computers on the Intern

Subtraction of 0011.1001 - 0001.1110 using 2's complement method Ans. Firstly 1's complement of 0001.1110 is 1110.0001 and 2's complement is 1110.0010. If a last carry

Some of the uses of append query are as follows ? You will save time by appending data to an existing table rather than manual update. ? Appending files based on particular

Q. Define Optimistic Synchronization? Optimistic Synchronization: This method too updates atom by requester process however sole access is granted after atomic operation by abo

Using defparam Parameter values can be changed in any module instance in the design with keyword defparam. Hierarchical name of the module instance can be used to override para

Which Command permits for vertical alignment of fields one below the other. UNDER Command is used ofr vertical alignment.

Explain typical packet switching network configuration. Packet Switching: In packet switching the nodes handle greatly smaller data length than are determined in message swit