A program to create a graphical display(repost) (376253)

Closed Posted Dec 10, 2005 Paid on delivery
Closed Paid on delivery

**Introduction**

A program (written in C++) is required that allows the user to create and edit a simple display comprising three types of moving objects. Each moving object consists of a coloured spot which can move along a path at a given speed. The path is to be one of the following: triangle, square or circular arc. The user will be able to set the required attributes for the path of each object, including the speed and the colour. The program will be a standard MS-DOS executable and the

user interface will be a text menu having the following options:

Q - Quit: The program should check whether the user wants to save the display to a file before ending.

A - Add an object: The user should be prompted for object type and details.

D - Delete an object: This is to be by position in the list.

C - Contents of the display: Provide a numbered list of all the objects and their details in the text window (in a suitable format).

P - Perform the display: Open the graphics window and display the objects, either one after another or all together (see 3 and 4 below). Wait for the user to press a key to close the graphics window and return to the menu.

S - Save to file: Ask the user for a filename and store the display information in that file in a suitable text format.

L - Load from file: Ask the user for a filename and load the information from disk into memory.

E - Edit: Allow the user to change the attributes of an object, apart from its type.

M - Move: Allow the user to change the position of an object in the list using current position and new position.

After completion of each choice other than Quit the menu will be displayed again.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows:

**1.** There will be base class display object DObj and a number of different display object classes derived from it: Triangle, Square and Arc. The display will be represented by a class Display containing a collection of pointers to DObj. Memory for the objects will be allocated/deallocated with new and delete.

**2.** The base class attributes will include the start point, colour and speed. The attributes for the derived classes will need to include:

(i) the other 2 vertices of the Triangle

(ii) the opposite vertex of the Square and a direction, which is +1 for anticlockwise and -1 for clockwise.

(iii) the end point of the Arc, and the radius, which is to be positive for an anticlockwise arc and negative for a clockwise one. [If the radius is 0, then a straight line should be used instead.]

**3.** The ‘perform’ function for each object will leave a trail as it moves. The ‘perform’ function of the Display class will perform the first object’s display, followed by the second, and so on.

**4.** The ‘performAll’ function will require the use of multi-threading to allow all the objects to perform simultaneously.

**5.** The Display class will use a linked list.

All these points must be completed and the program fully functional.

The coder should also include code notes, explaining the functions of each part of the coding

## Platform

the program must be standard MS-DOS executable, and win32 console application

C Programming Engineering MySQL PHP Software Architecture Software Testing

Project ID: #3148564

About the project

1 proposal Remote project Active Jan 1, 2006

1 freelancer is bidding on average $26 for this job

spookyvw

See private message.

$25.5 USD in 3 days
(0 Reviews)
0.0