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
A sorting method which uses the binary tree concept such that label of any node is larger than all  the labels in the sub trees, is called A Sorting method which uses the binar

6 bit magnitude comparator

Explain about CSMA/CD It is an access method used mainly with LANs configured in a bus topology. With CSMA/CD, any station (node) can transmit a message to any other  statio

Q. F(x,y,z) = ∑m (4,6,7,8)+ ∑d (2,5,11,12) Using K-Map. Q. State and prove any one of the DeMorgen's Laws. Show that these theorems can be extended up to any number of variabl

Draw an expression tree for the string. f + (x+y) *((a+b)/(c-d)). Indicate the register requirement for each node and list out the evaluation order for the expression tree. For

Why disable statements are not allowed in functions? If  disble  statement  is used  in function,it  invalids  function  and  its  return  value.  So  disable statements aren't

michelson-morley experiment-motivation and experimental setup

Define Terminal symbols? Terminal symbols: These are literal strings forming the input of a formal grammar and can't be broken down in slighter units without losing literal m

The salient features of hyper threading are: i)  Improved support for multi-threaded code, permitting multiple threads to run concurrently. ii) Response time and improved rea

The method for updating the main memory as soon as a word is removed from the Cache is known as  (A) Write-through                  (B) write-back   (C) protected write