logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Eusebio JayCriminology
(5/5)

539 Answers

Hire Me
expert
Neville StevensMarketing
(5/5)

966 Answers

Hire Me
expert
Connor EvanssEconomics
(5/5)

543 Answers

Hire Me
expert
Rory BremnerComputer science
(5/5)

569 Answers

Hire Me
C Programming

write a modular solution algorithm and C program that will accept an integer value in the range of 5-95 inclusive. Your solution should also ensure that input values are in multiples of 5.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Foundations of Programming

Assignment 1

OBJECTIVES:

  • Construct algorithms to solve problems using a combination of sequence, selection and iteration constructs.

  • Implement such algorithms in a common programming language, C.

  • Apply the methodology of top-down design to the construction of solutions and implement these solutions in a modular way.

  • This assignment also serves as preparation for Assignment 2 and so this assignment must be completed.

Assignment Sections:

Your assignment must contain the following components either in the documentation or as separate electronic files (.c and .exe), where indicated:

  1. All assumptions made about the problem and your solution (eg: data types, currency, language, etc.). There will virtually always be assumptions that you are implicitly making so think about this carefully. However, your assumptions cannot contradict the question requirements. Also be careful that you do not put in unnecessary assumptions (eg: things that are stated in the question). (3%)

  2. Structure chart for your solution. This demonstrates the design of your solution. The structure chart must show data flow (i.e. parameter passing and return values). (10%)

  3. Your algorithm written in a uniform fashion using a pseudo-code and adhering to the conventions required in the unit. Your algorithm also demonstrates the design of your solution and must be consistent with your structure chart. The algorithm should be presented at an appropriate level of detail sufficient to be easily implemented. Submit your high-level algorithm and the low-level decompositions of your solution, as appropriate to the question. Algorithms that look like the code was written first and then word processed to look like an algorithm would receive no marks. (15%)

  4. A set of test data in tabular form with expected results and desk check results from testing your algorithm. Each test data must be justified – reason for selecting that data. No marks will be awarded unless justification for each test data is provided. (15%)

  5. Source code file (.c) and program executable (.exe) must be submitted (separate to your documentation). The source code must be consistent with your algorithm (both high- and low-levels). The source code must build (compile and link) to create an executable that operates correctly. Make sure you use the code style required in the unit. No marks awarded if the source code does not build and run. (40%)

  6. Results obtained by applying your test data to your final program. That is, you must provide sample printouts of your program in operation (i.e. actual program output from applying the test values nominated in the test table in point 4 above). (10%)

  7. Self-assessment of how successful you were in achieving the requirements and a discussion of any problems you encountered. (7%)                             

The self-assessment must be submitted in two parts:                                                                    

  1. A self-assessment write up done here in the document template.

  2. You need to also submit a separate file named txt. This file will have, in point form, a summary of what works and what does not work in your program. A false claim here would mean that marks for this component would not be awarded. So make sure that you have tested your program thoroughly. The file evaluation.txt will also declare if you have checked each submitted file for viruses or malware. Name the tool and version number of the tool that you used to conduct the check.

Assignment Question:

You should read this question as if the change giver is an artificial intelligence-based bank teller who has to give amounts of money to customers by automatically working out the amounts.

You are asked to write a modular solution (algorithm and C program) that will accept an integer value in the range of 5-95 inclusive. Your solution should also ensure that input values are in multiples of 5. Based on valid input, your solution should calculate how many coins of each denomination should be returned, and display this to the user. Coin values are 50, 20, 10 and 5. The solution should aim to give as much of the higher valued coins as possible. For example, a poor solution for an input of 30 cents would give six 5 cent coins. A correct solution would give a 20 cent coin and a 10 cent coin. After each output, the user should be asked whether they wish to continue or exit/terminate the program. Your solution (algorithm and program) should be designed using a modular approach. This requires the submission of a structure chart, a high-level algorithm, and subsequent decompositions of each step (i.e. low-level algorithms).

Note that for this problem, the principles of code reuse and high cohesion are particularly important and a significant number of marks are allocated to these aspects of your design.

  • You should attempt to design your solution such that it consists of a relatively small number of modules, but still meets the modular design best practice requirements of this unit. In particular, strive to have one module that can be reused (called repeatedly) to solve the coin calculation problem. If you find that you have developed a large number of modules where each performs a similar task, or that you have a lot of instructions that are repeated in one module, then attempt to analyse your design to generalise the logic so that you have just one general version of the module.

 Assignment 1

Assumptions

All assumptions made other than those stated in the question that you make about the problem. There will virtually always be assumptions you are implicitly making so think about this very carefully. However, your assumptions cannot contradict the assignment question. Also be careful that you do not put in unnecessary assumptions. (3%)

  • First assumption

  • Second assumption

  1. Structure Chart

Structure chart for your program. Show parameter passing. (10%)

  1. Algorithm

Your algorithm written in a uniform fashion using a pseudo-code and adhering to the conventions required in the unit. Your algorithm should be presented at an appropriate level of detail sufficient to be easily implemented. Submit your high- level algorithm (where necessary) along with algorithms of your decompositions as appropriate to the question. 
Algorithms that look like the code was written first and then word processed to look like an algorithm would receive no marks.  (15%)

  1. Test Table

A set of test data in tabular form with expected results and desk check results from your algorithm. Each test data must be justified – reason for selecting that data. No marks will be awarded unless justification for each test data is provided. (15%)

Add rows to the following table as needed. Table can span more than one page. Each test id tests only one condition for the desk check. There should be no duplicated reasons listed in the second column.

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme