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
What are the advantages and disadvantages of a Smart Card?    Advantages of Smart Card: 1. It gives convenience & support for multiple currencies over borders. 2. Used

Q. Programming with parallel virtual machine? The general method for writing a program with PVM is like this:  A user writes one or more sequential programs in C++, C or FOR

Differentiate between linear addressing and matrix addressing modes with examples. Ans: Linear Addressing: Addressing is the procedure of selecting one of the cells in a

Normal 0 false false false EN-US X-NONE X-NONE

Locality of reference implies that the page reference being made by a process is Ans. Locality of reference means that the page reference being made through a process is proba

Write a function "plot2fnhand" that will receive 2 function handles as input arguments, and will show in two Figure Windows plots of these functions, with the function names in the

Q. Editor - Tools necessary for assembly language programming? The editor is a program which allows the user to enter and modify as well as store a group of instructions or tex

Bitwise-Inclusive-OR Operator: inclusive-OR-expression : exclusive-OR-expression inclusive-OR-expression | exclusive-OR-expression The  bitwise-inclusive-OR  operator

Q. Explain about Double Error Detection bit? Let's presume now that two bit errors take place in data. Data received: So on -matching we conclude P3-D3 pair doesn't

Multi-Threaded Processors In unit 2, we have gone through the use of distributed shared memory in parallel computer architecture. Although the use of distributed shared memory