Array user interface, Computer Engineering

Assignment Help:

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.


Related Discussions:- Array user interface

Microprocessors Instruction sets, Write a program to mask bits D3D2D1D0 and...

Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of the AX register.

Prediction algorithms , The following branch prediction algorithms are sugg...

The following branch prediction algorithms are suggested: 1) Guess that the branch will be taken if the previous one was taken; predict not taken otherwise. 2) Guess that the

Example of shared programming using library routines, Q. Example of shared ...

Q. Example of shared programming using library routines? Think about subsequent set of statements  Process A                                  Process B                  :

Describe thead, Q. Describe THEAD, TBODY and TFOOT tag? THEAD, TBODY, ...

Q. Describe THEAD, TBODY and TFOOT tag? THEAD, TBODY, TFOOT , , and form groups of rows. specifies that a group of rows are heade

Operating system, explain network operating system and design issues?

explain network operating system and design issues?

Rubbers, engineering plastics ,rubbers ,composites

engineering plastics ,rubbers ,composites

Explain segment registers in bus interface unit, Q. Explain Segment Registe...

Q. Explain Segment Registers in bus interface unit? These are very significant registers of CPU. Why? We will answer this later. In 8086 microprocessor memory is a byte organiz

EME, How can i made Carnot engine

How can i made Carnot engine

Finite automata, applications of context free grammar

applications of context free grammar

Describe the micro programmed control unit in detail, Describe the micro pr...

Describe the micro programmed control unit in detail. A micro programmed control unit is built around a storage unit is known as a control store where all the control signals a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd