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
Static RAM: No refreshing, 6 to 8 MOS transistors are needed to form one memory cell, Information stored as voltage level in a flip flop. Dynamic RAM: Refreshed periodically, 3

Q. Explain about Merge sort circuit? First split the given sequence of n numbers in two parts every part comprising of n/2 numbers. Afterwards recursively divide the sequence i

Q. Explain Programmer Visible Registers? These registers can be accessed employing machine language. In general we encounter four kinds of programmer visible registers.

Call by value and Call by reference Call by value means sending the values of the arguments- The value of each of the original arguments in the calling function is copied in

How authoring packages supports scripting language Many authoring packages support a scripting language to allow for even more sophisticated applications to be produced. Scrip

In8085 are of the following statements is not true.A) Co-processor is interfaced in max mode. B) Co-processor is interfaced in MIN mode C )Co-processor is interfaced in max/min mod

A script kept information on potential subjects for an experiment in a vector of structures known as "subjects".  The following show an example of what the contents may be: >> subj

What is the difference between a structure and a table? Structures are constructed the almost the similar way as tables, the only dissimilarity using that no database table is

What are the advantages of batch processing This has the advantage which jobs can be processed when computer resources are less busy (for example during the evening or at night

Question: Read the following case study and answer the questions based on it. The local airline company needs to develop a system for controlling air traffic at the airport