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
Q. What is Domain explain? Domain can be an apartment complex, a town or even a country. Sub-domains can correspond to organizations like expertsmind. United States comes under

Explain how a node can be inserted into an AVL tree. We can insert a node into an AVL tree through the insertion algorithm for binary search trees in which we compare the key o

Solve the assignment of NFA-- Finite Automata and Formal Language Project Description: I have an assignment on Finite Automata and Formal Languages ( Nondeterministic Fini

In Java System.out is an object of type? In Java System.out is an object of form Print Stream.

'On many systems, you can describe a function matherr which will be known as when there are certain floating-point errors, like errors in the math routines in .

Q. Define Print Resolution of printers? Print Resolution is the detail which a printer can give considered by how many dots a printer can put in each inch of paper.  So the uni

Categorize the CPU scheduling algorithms? The various CPU scheduling algorithms are categorized as given below:

Q. What is Message Passing Libraries? In this part we will consider about message passing libraries. Traditionally a range of message passing libraries have been available ever

What are the different between hypertext hypermedia? Hypertext is fundamentally the same like regular text; this can be stored, read or searched and edited along with a signifi

Or-Introduction : Thus if we know about one thing is true, and also we know that a sentence when there thing is in a disjunction is true. Here if we consider example, like we