Programming Fundamentals: Algorithms, Problem-Solving, and Software Development, Thesis of Information Technology

A comprehensive overview of programming fundamentals, including the definition and characteristics of algorithms, different ways to demonstrate algorithms (flowcharts and pseudocode), and the steps involved in the software development life cycle. It covers topics such as analyzing problems, designing algorithms, coding, debugging, testing, and documentation. Detailed examples and illustrations to help the reader understand the concepts. It is a valuable resource for students studying computer science, programming, or related fields, as it lays a strong foundation for understanding the core principles of programming and problem-solving.

Typology: Thesis

2020/2021

Uploaded on 10/22/2023

booooooo87
booooooo87 🇻🇳

1 document

1 / 46

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BTEC FPT INTERNATIONAL COLLEGE
INFORMATION TECHNOLOGY
ASSIGNMENT 1
UNIT: PROGRAMMING
STUDENT : BUI THANH NI NA
CLASS : IT05102
STUDENT ID : BD00016
SUPERVISOR : NGUYEN HOANG ANH VU
Da Nang, June 2022
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e

Partial preview of the text

Download Programming Fundamentals: Algorithms, Problem-Solving, and Software Development and more Thesis Information Technology in PDF only on Docsity!

BTEC FPT INTERNATIONAL COLLEGE

INFORMATION TECHNOLOGY

ASSIGNMENT 1

UNIT: PROGRAMMING

STUDENT : BUI THANH NI NA

CLASS : IT

STUDENT ID : BD

SUPERVISOR : NGUYEN HOANG ANH VU

Da Nang, June 2022

Performed by Bui Thanh Ni Na

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 4 HND Diploma in Computing Unit number and title Unit: Programming Submission date 15 /06/ Date received (1st submission)

Re-submission date Date received (2nd submission) Student name Bui Thanh Ni Na Student ID BD Class IT Assessor name Nguyen Hoang Anh Vu 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: Bui Thanh Ni Na Grading grid P1 M1 D

Performed by Bui Thanh Ni Na

ACKNOWLEDGMENTS

First of all, I would like to send a special and big thank you to my family for their encouragement, enthusiasm, and invaluable assistance. Without all of this, I might not be able to complete this task correctly. Second, I would like to thank and appreciate Mr. NGUYEN HOANG ANH VU, who enthusiastically guided me to achieve the learning results as well as his support in the process of implementing this task. Besides, I also received a lot of help when talking with my classmates at BTEC FPT International College. Therefore, many thanks to them. Finally, I would also like to acknowledge the extremely important role played by the BTEC staff, which allowed me to use the facilities and materials needed to complete the assignment.

Performed by Bui Thanh Ni Na

ASSURANCE

I certify that this assignment is my own work, based on my personal study and that I have acknowledged all material and sources used in its preparation, whether they be books, articles, reports, lecture notes, and any other kind of document, electronic or personal communication. I also certify that this assignment has not previously been submitted for assessment in any other unit, except where specific permission has been granted from all unit coordinators involved, or at any other time in this unit, and that I have not copied in part or whole or otherwise plagiarized the work of other persons. Declaration of the learner I certify that the work submitted for this assignment is my own and that research sources are fully acknowledged. Student signature: Date: Bui Thanh Ni Na

Performed by Bui Thanh Ni Na

  • Figure 1 .1: Algorithms………………………………………………………………………………………………………………………………………….. LIST OF TABLES AND FIGURES
  • Figure 1.2: Buy ingredients
  • Figure 1.3: Necessary ingredients
  • Figure 1.4: Strawberry ……………………………………………………………………………………………………………………………
  • Figure 1.5: Strawberries have been crushed …………………………………………………………………………………………..
  • Figure 1.6: Mix strawberries, yogurt, honey …………………………………………………………………………………………..
  • Figure 1.7: Frozen strawberry ice cream ………………………………………………………………………………………………..
  • Figure 1 .8: Strawberry yogurt ice cream ……………………………………………………………………………………………….
  • Figure 1.9: Achievement strawberry yogurt ice cream…………………………………………………………………………..
  • Figure 1.10: Flowchart symbols………………...…………………………………………………………………………………………..
  • Figure 1.11: Determine which number is the biggest …………………………………………………………………………….
  • Figure 1.12: Program to check if the number is even or odd …………………………………………………………………
  • Figure 1.13: Calculate Area and Perimeter of Rectangle……………………………………………………………………….
  • Figure 1. 1 4: Calculate sales taxes …………………………………………………………………………………………………………
  • Figure 1.15: Flowchart solves simple equation……………………………………………………………………………………..
  • Figure 1.16: Source code solve simple equation ………………………………………………………………………………….
  • Figure 1.17: Output solve simple equation.…………………………………………………………………………………………..
  • Figure 1.18: The Software development cycle ………………………………………………………………………………………
  • Figure 1 .19: Analyzing the Problem ……………………………………………………………………………………………………..
  • Figure 1.20: Flowchart ………………………………………………………………………………………………………………………….
  • Figure 1.21: Coding or Writing the Program ………………………………………………………………………………………………
  • Figure 1.22: Debugging …………………………………………………………………………………………………………………………
  • Figure 1.23: Testing ………………………………………………………………………………………………………………………………
  • Figure 1.24: Programming ……………………………………………………………………………………………………………………..
  • Figure 1.25: The software development cycle ………………………………………………………………………………………
  • Figure 1. 26 : Design and Prototyping ……………………………………………………………………………………………………
  • Figure 1. 27 : Source code solve the student's academic rating ……………………………………………………………..
  • Figure 1. 28 : Try a random point ………………………………………………………………………………………………………….
  • Figure 1. 29 : Try a point from 7 to almost 8………………………………………………………………………………………….
  • Figure 1. 30 : Try a point from 5 to almost 6…………………………………………………………………………………………..
  • Figure 1. 31 : Invalid score…………………………………………………………………………………………………………………… Performed by Bui Thanh Ni Na
  • Figure 1. 32 : Functional diagram of the book management menu………………………………………………………
  • Figure 1.33: Flowchart M1………………………………………………………………………………………………………………..
  • Figure 1.3 4 : Code M1………………………………………………………………………………………………………………………….
  • Figure 1.3 5 : Error…………………………………………………………………………………………………………………………………
  • Figure 1.3 6 : Fix ……………………………………………………………………………………………………………………………………
  • Figure 1.3 7 : Run the program………………………………………………………………………………………………………………
  • Figure 1. 38 : Run the program for the first time ……………………………………………………………………………………
  • Figure 1.3 9 : Run the program for the second time………………………………………………………………………………..

Performed Student: Bui Thanh Ni Na (^) 1

INTRODUCTION

Programming plays an extremely important role in life. Coming to this report, we will learn about algorithms, problems related to algorithms and basic programming. It will help us understand more deeply what is an algorithm, how is an algorithm defined? What is the process of building an algorithm, and how does the algorithm work? Let's find out in this assignment!

  • This report includes the following: Chapter 1: Algorithms, issues related to algorithms, and basic programming.
    1. Define basic algorithms to carry out an operation and outline the process of programming an application. 1.1 Provide a definition of what an algorithm is and outline the process in building an Application. 1.2 Ways to demonstrate algorithms 1.3 Characteristics of Algorithms 1.4 Steps in program development
    2. Determine the steps taken from writing code to execute.

Performed Student: Bui Thanh Ni Na (^) 2 CHAPTER 1: ALGORITHMS, ISSUES RELATED TO ALGORITHMS, AND BASICPROGRAMMING I. Define basic algorithms to carry out an operation and outline the process of programming an application.

1. Provide a definition of what an algorithm is and outline the process in building an application. (P1) 1.1 Define Algorithm: In mathematics and computer science, an algorithm is a finite series of well-defined tight commands, it is often used to solve a class of specific problems or to perform a calculation. Algorithms are used as specifications to perform calculations and process data. By using artificial intelligence, algorithms can perform automatic inferences and use math and logic tests to redirect code execution through different routes. Figure 1.1: AlgorithmsExamples of algorithms in real life: Steps to make strawberry ice cream: + Step 1: Go to the supermarket to buy yogurt, strawberries, honey Figure 1.2: Buy ingredients

Performed Student: Bui Thanh Ni Na (^) 4

  • Step 5: Put yogurt and honey in a bowl. Mix well Figure 1.6: Mix strawberries, yogurt, honey
  • Step 6 : Pour the mixture into the ice cream mold. Put the mold in the fridge Figure 1.7: Frozen strawberry ice cream
  • Step 7 : Strawberry yogurt ice cream Figure 1.8: Strawberry yogurt ice cream

Performed Student: Bui Thanh Ni Na (^) 5

  • Step 8 : Finish and enjoy the finished product Figure 1.9: Achievement strawberry yogurt ice cream 1.2 Ways to demonstrate algorithms:
  • There are two ways of expressing the algorithmFlowchart symbols:
  • A flowchart is a graphical representation of the various steps involved in an algorithm. It makes the flow of the program understandable.
  • A flowchart uses different symbols to indicate different activities.

Performed Student: Bui Thanh Ni Na 7 ❖ More information:

  • The oval indicates the starting or end point of the process. ❖ Examples of flow charts in schematic form: Example 1 : Draw a flowchart to find the greatest number among the 2 numbers. Algorithm: 1. Start 2. Input 2 variables from the user 3. Now check the condition If a > b, go to step 4, else go to step 5. 4. Print a is greater, go to step 6 5. Print b is greater 6. Stop Figure 1.11: Determine which number is the biggest

Performed Student: Bui Thanh Ni Na 8 Example 2 : Write a program to check whether the number is even or odd. Algorithm: 1. Start

  1. Input Number n
  2. If (n%2==0)
  3. Display number is even
  4. Else display number is odd
  5. Stop Figure 1.12: Program to check if the number is even or oddPseudocode:
  • Pseudocode is a simple language description of the steps in an algorithm or another system. Pseudocode typically uses the structural conventions of a regular programming language but is intended for human reading rather than machine reading. ❖ Examples Using Pseudocode algorithm:

Performed Student: Bui Thanh Ni Na 10

  • Effectiveness: The output of the problem must not contradict or contradict the requirements of the problem.
  • Generality: The algorithm can be applied to solve any problem of the same type as the solved problem.
  • Nimble: Good algorithms bring high efficiency, helping programs operate efficiently with fast processing speed, saving resources.
  • To create a good algorithm we need:

➢ Determine the input of the algorithm.

➢ Determine starting point

➢ Find the end of the algorithm

➢ List the steps to solve.

➢ Determine how to complete each step.

➢ Algorithm review

Example: Write a program to solve simple equationsInput: Enter a, b, enter data type

  • If a and b are both 0, the equation has an endless number of solutions.
  • If a = 0 and b isn’t 0 => the equation has no solution
  • If a is not 0 => the equation has a unique solution (-b/a)  Output: The result is the largest number
  • Flowchart:

Performed Student: Bui Thanh Ni Na 11 Figure 1.1 5 : Flowchart solves simple equation