ET2560Programming Project
This project focuses on an integration and demonstration of the knowledge and skills in this course with regard to the process of creating an algorithm to solve a problemand implementing that algorithm in the form of a working C language program. The project is due by Week 10, but there is lab time allocated for working on the project during weeks 6 through 9. The project is a significant portion (20%) of your course grade:
Project program15%
Project testing2.5%
Project documentation2.5%
Purpose
This project is a great opportunity to express your unique problem solving skills as well as your use of structured logic. The project program requires, at a minimum, the use of decision structures, loops, properly named and typed variables, functions, arrays, and strings. The user interface is to have a menu of choices for input, and the output is to be well-formatted. The use of file I/O may be incorporated into the project, but is not required.
Project Logistics
You are required to write an original program for this project. Everyone is going to be developing an application menu program that has three defined application options to implement. Each student can choose, propose, and implement a fourth menu application option for extra credit. You may get ideas by reviewing the end-of-chapter programming projects in the textbook, or from your other courses or interests that you’d like to work with.
Project Requirements
An application menu program with the three application options described next is required. As mentioned above, a fourth application defined by you is optional. This application menu program builds on the Week 4 Lab Task 2 basic menu system program that you completed. The program prompts the user to choose the number of the application to run:
1 for the calculator application
2 for the sort a list of integers (smallest to largest) application
3 for the pluralize a noun application
4 for your chosen application (optional)
The user can run each application chosen as long as desired, and then gets to select another application to run. The user is instructed to enter 0 (zero) to exit the application menu program.
The calculator application is described in detail as programming project 10on page 371 of your textbook. Instead of writing a function scan_data() that requires output parameters, I’d recommend reading in the operator and right operand from the calculator control function and validating both were read in, using another function to validate the operator is supported. For the function do_next_op(), it’s fine to have three input parameters and returns the result. You’ll also want to skip the rest of the data line before reading in any next operator and right operand. See Figure 5.14 on page 275 of your textbook for one way to do this.
The sort application uses an algorithm known as the bubble sort. This technique is described in programming project 13 on page 450 of your textbook. More details are provide next.
A bubble sort makes passes through a list, looking at pairs of adjacent elements to swap if not in the desired order. When a complete pass of the list is made where no swaps occur, the elements are in order. In the example that follows, elements swapped during a pass are bolded and underlined. You should limit the number of integers to sort at a time in your program.
Pass 1 / 31 / 41 / 59 / 26 / 5331 / 41 / 26 / 59 / 53
31 / 41 / 26 / 53 / 59
Pass 2 / 31 / 41 / 26 / 53 / 59
31 / 26 / 41 / 53 / 59
Pass 3 / 31 / 26 / 41 / 53 / 59
26 / 31 / 41 / 53 / 59
Pass 4 / 26 / 31 / 41 / 53 / 59
The pluralize noun application is described in programming project 5 on pages 514 and 515 of your textbook. The rules and some nouns to try are included.The definition of a noun for this application is a word in all lower case letters with at least two letters. You shouldset, and notify users of, the maximum length of the nouns to pluralize in your program. Outside of warning the user that entering a noun not meeting the definition can produce unexpected results, you do not need to validate the nouns from the user. Not all words are correctly pluralized by this application and you are not required to fix this!
Deliverables
The project programdue by week 10 should be submitted in a Microsoft Word document that includes a working C code file, incorporating all of the required aspects of the project. The program should adhere to good commenting, naming, and coding standards, and should exhibit efficient use of C programming language features.
The project testingdue by week 10should be submitted in a Microsoft Word document that includes:
- a list of test cases that thoroughly exercise your program
- console screen captures of program execution runs for all test cases
The project documentationdue by week 10should be submitted in a Microsoft Word document that includes:
- pseudo-code algorithmsor flowcharts for the application menu as well as each of the applications that are available from the menu – your design for each application shouldinclude appropriate functions,each of which are documented by pseudo-code or a flowchart
- a section providing instructions for how to use the program
- a discussion of difficulties encountered and lessons learned
1