Microsoft Word - ProjectTwo.docx ENGGEN 131, Semester Two, XXXXXXXXXXC Programming Project ENGGEN 131 – Semester Two – 2019 C Programming Project The Warehouse Deadline: 11:59pm, Sunday 27th October...

My assignment is to write C functions for a bunch of tasks. i have done 2/10 fully. We are not aloud any more extensions than what is already included in the .h file


Microsoft Word - ProjectTwo.docx ENGGEN 131, Semester Two, 2019 - 1 - C Programming Project ENGGEN 131 – Semester Two – 2019 C Programming Project The Warehouse Deadline: 11:59pm, Sunday 27th October Worth: 12% of your final grade ENGGEN 131, Semester Two, 2019 - 2 - C Programming Project A note before we begin… Welcome to the C Programming project for ENGGEN131 2019! This project is organized around a series of tasks. For each task there is a problem description, and you must implement one function to solve that problem. You may, of course, define other functions which these required functions call upon (i.e. these are called helper functions). Do your very best, but don’t worry if you cannot complete every task. You will get credit for each task that you do solve (and you may get partial credit for tasks solved partially). IMPORTANT - Read carefully This project is an assessment for the ENGGEN131 course. It is an individual project. You do not need to complete all of the tasks, but the tasks you do complete should be an accurate reflection of your capability. You may discuss ideas in general with other students, but writing code must be done by yourself. No exceptions. You must not give any other student a copy of your code in any form – and you must not receive code from any other student in any form. There are absolutely NO EXCEPTIONS to this rule. Please follow this advice while working on the project – the penalties for plagiarism (which include your name being recorded on the misconduct register for the duration of your degree, and/or a period of suspension from Engineering) are simply not worth the risk. Acceptable Unacceptable  Describing problems you are having to someone else, either in person or on Piazza, without revealing any code you have written  Asking for advice on how to solve a problem, where the advice received is general in nature and does not include any code  Discussing with a friend, away from a computer, ideas or general approaches for the algorithms that you plan to implement (but not working on the code together)  Drawing diagrams that are illustrative of the approach you are planning to take to solve a particular problem (but not writing source code with someone else)  Working at a computer with another student  Writing code on paper or at a computer, and sharing that code in any way with anyone else  Giving or receiving any amount of code from anyone else in any form  Code sharing = NO The rules are simple - write the code yourself! OK, now, on with the project… ENGGEN 131, Semester Two, 2019 - 3 - C Programming Project Understanding the project files There are three files that you will be working with: project.c, project.h and test_project.c. The most important of these three files is the source file project.c. This is the ONLY file that you will submit for marking. Please note the following:  project.c is a source file that ONLY CONTAINS FUNCTION DEFINITIONS  there is no main() function defined in project.c (and you must not add one)  a separate program, test_project.c, contains a main() function and you can use this to help you test the function definitions that you have written in project.c The diagram below illustrates the relationship between the three files. The blue shaded regions in the above diagram indicate where you should write code when you are working on the project. There are three simple rules to keep in mind:  You MUST NOT write any code in project.h (the header file)  You MUST write implementations for the functions defined in project.c (and this is the file you will submit for marking)  You SHOULD write additional test code in test_project.c to help you thoroughly test the code you write in project.c ENGGEN 131, Semester Two, 2019 - 4 - C Programming Project Getting started To begin, download the file called CProjectResources.zip from Canvas. There are three files in this archive: project.c This is the source file that you will ultimately submit for marking. In this source file you will find the functions that you should complete. Initially each function contains an incorrect implementation which you should correct. You may add other functions to this source file as you need. You must not place a main() function in this source file. This is the only file that you will submit for marking. project.h This is the header file that contains the prototype declarations for the functions you have to write. You must not edit this header file in any way. Both source files (project.c and test_project.c) include this header file, and the automated marking program will use the provided definitions in project.h. Modifying this header file in any way will cause an error. test_project.c This is the source file that contains the main() function. This file has been provided to you to help you test the functions that you write in project.c. In this file, you should create some example inputs and then call the functions that you have defined inside the project.c source file. Some simple examples have been included in this file to show you how this can be done. You might like to start by looking at the project.c source file. In this source file you will find a series of function definitions, however initially they are all implemented incorrectly. The prototype declarations are as follows (and these declarations are defined in the project.h header file): int TimeWorked(int minuteA, int secondA, int minuteB, int secondB); int WarehouseAddress(int maximum); void Advertise(char *words); int WinningBid(int *values, int length); void BoxDesign(char *design, int width, int height); void WorkerRoute(int warehouse[10][10]); int MakeMove(int warehouse[10][10], char move); You need to modify and correct the definitions of these functions in project.c. You will submit the file project.c for marking. ENGGEN 131, Semester Two, 2019 - 5 - C Programming Project Run the test program You should run the program provided to you in test_project.c. To do this, start by placing the three files (project.c, project.h and test_project.c) into an empty folder. You will need to compile both source files. For example, from the Visual Studio Developer Command Prompt, you could type: cl /W4 project.c test_project.c Or, simply: cl /W4 *.c You should see no warning messages generated when the code compiles. If you run the program, you should see the following output: ENGGEN131 2019 - C Project... _____ _ _ _ _ |_ _| | | | | | | | | | | |__ ___ | | | | __ _ _ __ ___| |__ ___ _ _ ___ ___ | | | '_ \ / _ \ | |/\| |/ _` | '__/ _ \ '_ \ / _ \| | | / __|/ _ \ | | | | | | __/ \ /\ / (_| | | | __/ | | | (_) | |_| \__ \ __/ \_/ |_| |_|\___| \/ \/ \__,_|_| \___|_| |_|\___/ \__,_|___/\___| Enter the number of the task that you would like to test: 1 - 6 = this will execute the code in MyTestFunction() 7 - 10 = this will play the Warehouse game Now, simply enter the number of the task that you are working on that you would like to test. If you enter a number between 1 and 6, then the function MyTestFunction() which is at the top of the test_project.c source file will be called. As it is provided to you, this function includes some very simple tests for the first 6 tasks. These tests match the example code in this handout. You can compare the output generated by your functions with the expected output as listed in this handout. Please note, these are just a starting point for you - passing these provided tests does not mean that your solutions are entirely correct! You should design and add additional tests of your own. If you enter a number between 7 and 10 then the Warehouse game will be launched. You can play this game to test the functionality of your MakeMove() function (which is the function that you will be working on for Tasks 7 – 10. Depending on which task you enter (between 7 and 10), the configuration of the Warehouse game will vary (i.e. the locations of the workers, boxes and targets). Feel free to edit these warehouse configurations yourself – you will find the 2D arrays near the bottom of the test_project.c source file (they are called warehouse7, warehouse8, warehouse9 and warehouse10). ENGGEN 131, Semester Two, 2019 - 6 - C Programming Project
Oct 23, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here