Đã Trao

Lập trình C# Job by valencia88

Basically i have an assignment i need doing before tomorrow 7pm GMT (11/05/2012). The assignment needs to be written in 'C' and is regarding functions, prototypes and interface. I don't know how much such an assignment would cost to do so i'm flexible with the price to an extent, i have a rough figure of what such a project is worth based on other projects so i know realistic figures. Here is the basic details of the assignment, however this assignment builds on a previous one so more details would have to be given if accepted i.e first assignment code, details regarding code (other programs used, etc. Please let me know as soon as possible whether this could be arranged :) The major point is that it would have to be completed before the time specified. Thank you for your time.

Details of assignment:

Using Functions

This task builds on Task 1. The code written for the various tasks will be extended and turned into functions. These will be called either in response to user input, or from a file containing a list of commands

Function Prototypes

typedef struct

{

int red;

int green;

int blue;

} pixel;

int FloodImage(pixel flood_colour);

/* Fills entire array with pixels of the given colour */

/* always returns 0 */

int DrawLine(int start_x, int start_y, int finish_x, int finish_y,

pixel line_colour);

/* draws a straight line between points (x_start, y_start) and */

/* (x_finish, y_finish) in colour line_colour */

/* return codes as follows */

/* Return Value */

/* All coordinates within image 0 */

/* start point outside image 1 */

/* finish point outside image 2 */

/* both points outside image 3 */

/* all line points outside image 4 */

int RefreshImage( );

/* writes new copy of image file to disk */

/* File name should be [url removed, login to view] where xxxx is current */

/* generation, starting from 0000 and incremented each time */

/* CheckPointImage() is called */

int CheckpointImage( );

/* writes new copy of image file to disk and increments */

/* generation number so that next RefreshImage() call does not */

/* overwrite but writes a new file */

/* returns new generation number */

11ELA010: Coursework Assignment 2

Simon Pomeroy Page 2 of 3 01/03/2012

Task : Functions and commands

Modify your task 1 code to implement the functions prototyped above. Provide a user interface able to accept the following commands. Initially, assume a working image 256 pixels wide and 128 pixels high. Subsequently, explore the use of dynamic memory allocation using pointers, asking the user to determine the size of the image.

// indicates that text to the end of a line is comment

FL r g b //sets every pixel in the image

//to the colour r g b

LI x1 y1 x2 y2 r g b //draws line in colour r g b

RE //Performs image file refresh

CH //Checkpoints image

FI [url removed, login to view]

// opens file [url removed, login to view] from the current directory and

// executes commands from the file. ‘FI’ may not

// appear as one of these commands

EX //terminates the program

Use as many techniques as you can – including structures, pointers, dynamic storage etc. Less sophisticated methods will attract lower marks

File Structure

The above prototypes will be made available on the LEARN server as prototypes.h. This should be used unmodified, and #include ”prototypes.h” statements used at the beginning of each C source file to make the prototypes accessible.

A partial solution for coursework 1 will also be provided as coursework1.c. which may be used as the basis for this task if necessary.

The functions should be implemented as a separate C source file in your project, called functions.c.

The code to read commands and call functions, including main(), should be in a file called ela010task2.c

11ELA010: Coursework Assignment 2

Simon Pomeroy Page 3 of 3 01/03/2012

Deliverables

Files :

- Source files functions.c, ela010task2.c

- Executable file ela010task2.exe.

- The function prototype file prototypes.h.

- A command file named [url removed, login to view] to demonstrate the functionality of your program.

A written report, in Microsoft Word format, maximum length 5 pages containing:

Table of contents covering both the report and the files submitted

A couple of pages of explanation / description of how you developed the programs.

Discussion of how you went about checking correct functionality, with example screen dumps.

Suggestions for further improvements to the code

Kỹ năng: Lập trình C#

Xem thêm: working prototypes, used structures, structures pointers, red point, prototype directory, prototype builds, project details example, price table user interface, may 2, make prototypes, make prototype, microsoft word line, microsoft project price, may li, may g, blue pixels, task number project, task allocation, need fl, may, image fi, end project, description project, custom r, coursework

Về Bên Thuê:
( 0 nhận xét ) United Kingdom

Mã Dự Án: #1623000

1 freelancer đang chào giá trung bình $50 cho công việc này

sikandermandal

Hired by the Employer

$50 USD trong 1 ngày
(3 Đánh Giá)
3.4