Unit 1 - Assignment 1
Unit 1 - Assignment 1
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.
Student’s signature
Grading grid
P1 M1 D1
Summative Feedback: Resubmission Feedback:
Submission Format:
Format: The submission is in the form of an individual written report and a presentation. This should
be written in a concise, formal business style using single spacing and font size 12. You are
required to make use of headings, paragraphs and subsections as appropriate, and all work
must be supported with research and referenced using the Harvard referencing system. Please
also provide a bibliography using the Harvard referencing system.
Submission Students are compulsory to submit the assignment in due date and in a way requested by the
Tutors. The form of submission will be a soft copy in PDF posted on corresponding course of
http://cms.greenwich.edu.vn/
Note: The Assignment must be your own work, and not copied by or from another student or from
books etc. If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you
must reference your sources, using the Harvard style. Make sure that you know how to reference properly,
and that understand the guidelines on plagiarism. If you do not, you definitely get fail
Assignment Brief and Guidance:
Scenario: You have applied for a post as a trainee with a software development company and have
been invited for an interview. You have been asked to demonstrate your problem solving and basic
programming skills. To do this you have to prepare a report on using algorithms to solve problems.
You need to explain, using examples, how algorithms are used to solve simple business problems and
the steps needed to be followed to produce a working program solution. You should make clear your
assumption about your program. The problems to be solved will involve basic procedural programming
instructions - sequence instructions (input, output and assignment statements), loops, conditional
statements. Problems should be analysed and designed by the use of flowchart and demonstrated by
the use of modules (procedures) using a menu based program.
Tasks:
1. State your simple business problems to be solved.
2. Analyse the problem and design the solutions by the use of suitable methods.
3. Demonstrate the compilation and running of a menu-based program
4. Evaluate how the problem is solved from the designed algorithm to the execution program
written by a specific programming language.
You also need to do a presentation of your work (it should be summary of your report).
i Definition of an algorithm
- Algorithm is a fundamental concept of Mathematics and Computing.
- An algorithm is a set of actions in a specific order to solve a certain problem.
- An algorithm must be unambiguous so that the math solver can follow with that to solve the problem.
3. implementation phase
4. maintenance phase
3. Write Pseudocode: Pseudocode is not executed on computer but it is more convenient for developer
to developing algorithms. A good Pseudocode may be easily converted to progamming language.
print “Failed”
else
print “Passed”
4. Draw a flow chart: Like Pseudocode, a flow chart represents the order of an algorithm will be written.
6. Test and debug: Using an IDE (Integrated Development Environment) to run your code. It also helps to
check errors in your code.
Result:
D1 Examine the implementation of an algorithm in a suitable language. Evaluate the relationship
between the written algorithm and the code variant.
i The problem
A person invests $ 500 in a savings account yielding 5 % interest. Assuming that all interests is left
on deposit in the account, calculate and print the amount of money in the account at the end of each
year for 10 years. Use the following formula for determining these amounts:
a = p(1 + r)n
where
n = number of years,
ii Coding
Result
double amount;
double principal = 500;
double rate = .05;
initial value
final value
amount = principal *
Math.Pow(1 + rate, year)
Console.Write("{0,4:D}{1,21:f2}\n",
year, amount);
increment
References
Dale, N. (2016). Computer Science Illuminated 6th edition. Jones & Bartlett Learning.
Programiz.com. (2019). Design Flowchart In Programming (With Examples) - Programiz. [online] Available at:
https://www.programiz.com/article/flowchart-programming.
Howkteam (n.d.). Toán tử trong C# | How Kteam. [online] www.howkteam.vn. Available at:
https://www.howkteam.vn/course/khoa-hoc-lap-trinh-c-can-ban/toan-tu-trong-c-54 [Accessed 20 Oct.
2020].