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

What is expansion swap, What is Expansion swap? At the time when any pr...

What is Expansion swap? At the time when any process needs more memory than it is currently allocated, the Kernel performs Expansion swap. To do this Kernel reserves enough spa

What is parallel sections construct, What is Parallel Sections Construct? ...

What is Parallel Sections Construct? The parallel sections construct is a shortcut for specifying a parallel construct comprising one sections construct however no other statem

Define multi programming, Define multi programming? Many operating syst...

Define multi programming? Many operating systems are designed to enable the cpu to process a number of independent programs concurrently. This concept is  known as multi progra

Differentiate b/w pre-emptive and non-pre-emptive scheduling, Differentiate...

Differentiate between pre-emptive and non-pre-emptive scheduling. Pre-emptive scheduling : in its approach, center processing unit can be taken away from a process if there is a

Explian service topologies, Explian Service Topologies Service Topolog...

Explian Service Topologies Service Topologies In a service-based architecture there increase dependencies between services resulting from cooperation

How can we use metropolitan area network, Q. How can we use Metropolitan Ar...

Q. How can we use Metropolitan Area Network? A MAN, essentially a bigger versions of a LAN is designed to extend over an entire city. It may be single network like a cable tele

What is monitoring-and-surveillance agents, Q. What is monitoring-and-surve...

Q. What is monitoring-and-surveillance agents? ANSWER: Monitoring-and-surveillance agents or predictive agents are intelligent agents that examine and report on equipment.

Average data transfer rate in floppy, Q. Average data transfer rate in flop...

Q. Average data transfer rate in floppy? A floppy is about 0.64 mm thick and is available in diameters 5.25 inch and 3.5 inch. Data are arranged in form of tracks and sectors.

Basic working of hard disk drive, Q. Basic working of Hard Disk Drive? ...

Q. Basic working of Hard Disk Drive? This is one of the components of today's personal computer having a capacity of order of quite a lot of Giga Bytes and above. A magnetic di

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