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 mmx technology, What is MMX Technology MMX Technology: MMX (M...

What is MMX Technology MMX Technology: MMX (Multimedia extensions) technology adds 57 new instructions to instruction set of Pentium - 4 microprocessors. MMX technology also

What is the purpose of linq providers in linq, LINQ Providers are a set of ...

LINQ Providers are a set of classes that takes a LINQ query and dynamically produces a method that implements an equivalent query against an exact data source.

Explain the differences between macros and subroutines, Explain the differe...

Explain the differences between macros and subroutines. Macros Vs Subroutines (i) Macros are pre-processor directives which are processed before the source program is pass

What is mmu, What is MMU? MMU is the Memory Management Unit. It is a sp...

What is MMU? MMU is the Memory Management Unit. It is a special memory control circuit used for executing the mapping of the virtual address space onto the physical memory.

Power and energy, Ask questiPower and EnergyQuestion 4Consider a processor ...

Ask questiPower and EnergyQuestion 4Consider a processor that runs at 2.5 GHz and 1 Volt. When running a given CPU-bound program,the processor consumes 100 W, of which 20 W is leak

How and what data is collected - weather simulation, How and what data is c...

How and what data is collected - Weather simulation -  Sensors measure pressure, relative humidity, temperature and wind speed and wind direction -  Sensors are placed in w

What is high level formatting, Q. What is High level formatting? In any...

Q. What is High level formatting? In any disk system the space at some time in use would become discarded and therefore will be free for other application. Operating system ass

Solve the assignment of finite automata, Solve the assignment of NFA-- Fini...

Solve the assignment of NFA-- Finite Automata and Formal Language Project Description: I have an assignment on Finite Automata and Formal Languages ( Nondeterministic Fini

What do you mean by embedded system, It is a mixture of hardware and softwa...

It is a mixture of hardware and software to perform needed task

Describe set-associative mapping, Q. Describe Set-Associative Mapping? ...

Q. Describe Set-Associative Mapping? A third type of cache organization known as set-associative mapping is an improvement on direct mapping organization in that every word of

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