Docsity

BTEC HND Computing Assignment: Algorithms and Business Problems, Exercises of C programming

Toggle sidebar
bg1
ASSIGNMENT 1 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Unit 1: Programming
Submission date
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
Lý Phước Sang
Student ID
GCS210360
Class
GCS1002
Assessor name
Student’s signature
Sang
Grading grid
P1
M1
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download BTEC HND Computing Assignment: Algorithms and Business Problems and more Exercises C programming in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 1: Programming

Submission date Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Lý Phước Sang Student ID GCS

Class GCS1002 Assessor name

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 Sang

Grading grid

P1 M1 D

Summative Feedback:Resubmission Feedback:

Grade: Assessor Signature: Date:

Lecturer Signature:

I. Introduction

In this report, I’ll discuss about the definition of algorithm along with its characteristics and apply it to

solving business problems. Furthermore, the report also demonstrates the importance of critical thinking

skills and interpretation skills, which are important for employment and develop self-learning spirit.

II. Algorithms

1. Algorithm definition

Algorithms are a set of mathematical instructions or steps to achieve a specific goal, especially

when given to a computer, which will calculate a solution to a problem or create step-by-step

instructions for others to follow.

For instance, If I want to fly from Saigon to England, I should follow the 3 steps below for a smooth

travel.

Step 1: Buy tickets

Step 2: Go to the airport by taxi

Step 3: Fly to England

These steps, however, are just a metaphor explanation of the algorithm definitions to give a general idea

of how algorithms work. For computers, algorithms are the guidelines inside computers that help it take

information and commands from users and then perform calculations to display the results to the

screens.

Figures 1: Algorithm definition (Source: How Do Social Media Algorithms Work [Detailed Guide 2021] - HubPages_)

2. Algorithm characteristics and example

  • An algorithm must have a well-ordered step, and each step has a clear order with a defined purpose.
  • An algorithm should be able to do computational operations efficiently and each algorithm operation

must reliably finish its job.

  • In order for the computer to understand an algorithm, a transparent statement is required in the

algorithm, and it must be arranged in the correct order so each operation must be unambiguous.

  • When a group of individuals work on their computer to create an algorithm, it must generate the same

outcome.

For example: Let write a sorting algorithm, I will write a Bubble Sort method. If the elements next to it

are in the wrong order, it will swap it place until all the elements are in the correct order the user wants.

  • Finally, we will give the array 7 random numbers and write a code to print the sorted array numbers. Figures 4: Second part of Bubble Sort code

III. Business problems

1. Problem

Product tracking is necessary for managers to keep track of products so that they can either keep track of

products that don't sell well and remove them or resupply products that are in high demand. The

product management system was born to manage a large number of items while also eliminating the

time-consuming manual process.

2. Analyze the problem

  • Identify key features of a program that need to be implemented like add, remove, search or edit the product information.
  • Product management: Allows users to add, remove, search and edit the product information.

3.Flowchart

  • Main menu Figures 5: Menu flowchart
  • Remove product Figures 7: Remove product flowchart

IV. Demonstrate Application

1. Source code breakdown

In this section, I’ll break down each section of the program and go over each part briefly.

First of all, I’m creating a constructor for data and print function to view product information.

Figures 8: Constructor and print info Next, I’ll create a new class and write all the necessary functions that will be used in the main class. The first one will be the add product function that accepts the user info and saves it in the ProductList.

And lastly the search function that showw all the product info that matches user input in ProductList. Figures 11: Search product by name function After finished all the necessary functions, I will create a final class for the main function and create a menu function inside it with the switch-case condition statement.

Figures 12: Menu function Figures 13: Switch-case statement

Figures 15: Software Development Life Cycle (Source: Overview: the Software Development Life Cycle (SDLC) (sotatek.com)) Phase 1: Planning

  • The first phase is to establish the application's scope and goal. This also include estimating labor and material costs, putting together a schedule with specific deadlines, and forming project teams and leadership structures. Phase 2: Design
  • This phase is part of the planning process, and it involves determining what the application is supposed to do and what its requirements are. Phase 3: Implementation
  • This is where the software is really written. A small project may be written by a single writer, while a huge project may be divided into numerous teams and worked on.

Phase 4: Test

  • Before making an application available to users, it's important to test it. So that developers could fix all the bugs and glitches. This process can be automated Phase 5: Deployment
  • This phase is when the application is made public to users so that they can download to try out the software. Phase 6: Maintenance
  • The development cycle is almost finished at this point. Users may find bugs that weren’t found during testing, so these errors need to be dealt with, which might spawn new development cycles.

4. The way source code is compiled

Computers don’t understand human languages, they only understand sequences of numbers that represent operational codes. So, a compiler takes the source code and converts it into a machine language module, usually called an object file , then a linker combines this object file with the in particular run-time modules to create an executable file Figures 16: Compiled language (Source: www2.hawaii.edu/~takebaya/ics111/process_of_programming/process_of_programming.html)

REFERENCE:

  1. Algorithm in Programming | Significance Of Algorithm in Programming: Algorithm in Programming | Significance Of Algorithm in Programming (educba.com)
  2. Geekforgeek.org: C# | Arrays - GeeksforGeeks
  3. Phoenixnap.com: What is SDLC? Phases of Software Development & Models (phoenixnap.com)
  4. Www2.hawaii.edu: www2.hawaii.edu/~takebaya/ics111/process_of_programming/process_of_programming.html#:~:text=A compiler takes the program,to create an executable file.