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
Define setup time and hold time, what will occur when there is setup time and hold tine violation, how to overcome it? For Synchronous flip-flops, we have particular requiremen

FTP FTP (File Transfer Protocol) is the protocol used on the Internet for sending files and is usually used for uploading / downloading files (web pages) to and from servers. T

There are various approaches to the classification of Computer Networks. One such classification is based on distance approach. Networks can be classified into LAN, WAN and MAN net

What is the difference between field-group header and other field groups? The header field group is a particular field group for the sort criteria.  The system automatically p

To add scripts into your Web pages tag is used. The tag signifies the start of the script section, whereas marks the end. An example of this is d

Define pipelining Pipelining is an efficient way of organizing concurrent activity in a computer system. The processor implements the program by fetching and implementing instr

what is Ambiguity in single inheritance

What is Immediate addressing The  data  itself,  beside  the address,  is  given  as  the  operand or operands  of  the instruction.

Example of Unification: Let now here, assume instead that we had these two sentences as:  knows(john,X) → hates(john, X)  knows(jack, mary)  Thus here the predicate n

When we initialize the form at that time if we require to set any variable's value then we can set it by defining in constructor. Constructor's name always similar as class name an