ASM1 Programming PhanLamQuocViet

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

BTEC FPT INTERNATIONAL COLLEGE

INFORMATION TECHNOLOGY
ASSIGNMENT 1
UNIT: PROGRAMMING

STUDENT : PHAN LAM QUOC VIET


CLASS : IT1602
STUDENT ID : BDAF200035
SUPERVISOR : NGUYEN HOANG ANH VU

Da Nang, June 2021

Performed by Phan Lam Quoc Viet


ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 4 HND Diploma in Business

Unit number and title Unit: Programming

Date received (1st


Submission date
submission)

Date received (2nd


Re-submission date
submission)

Student name Phan Lam Quoc Viet Student ID BDAF200035

Class IT1602 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:

Quoc Viet

Grading grid

P1 M1 D1

Performed by Phan Lam Quoc Viet


❒Summative Feedbacks: ❒Resubmission Feedbacks:

Grade: Assessor Signature: Date:


Internal Verifier’s Comments:

Signature & Date:

Performed by Phan Lam Quoc Viet


ACKNOWLEDGMENTS

First of all, I would like to thank my mentor Nguyen Hoang Anh Vu for his constant support in my
studies and research, for his patience, motivation, enthusiasm and rich knowledge. His guidance
has helped me throughout the time of studying and writing this thesis. Without your wonderful
help, I would not have been able to achieve this.

In addition to my mentor, I would like to thank my friends who have helped me improve my
knowledge of my subject. Not only that, they are always there to support me when I need it. And
besides, I would like to thank the school for creating all conditions for me to have adequate
facilities to help me complete my work.

Last but not least, I would like to thank my family: my parents Phan Dinh Quy and Lam Thi Tam,
who gave birth to me from the beginning and supported me spiritually. They are always behind to
care and help me have more motivation to complete the work well.

Performed by Phan Lam Quoc Viet


ASSURANCE

I declare that this is my work, based on my research, and that I have recognized all
materials and sources utilized in its production, including books, papers, reports,
lecture notes, and any other type of document, electronic or personal
communication. I further declare that I have not previously submitted this
assignment for assessment in any other unit, except where explicit permission has
been granted by all unit coordinators involved, or at any other time in this unit, and
that I have not duplicated or stolen ideas from the work of others in any way.

Declaration of the learner

I verify that the work I've submitted for this assignment is all my own, and that all research
sources have been properly credited.
Signature of the student: Date:
Quoc Viet

Performed by Phan Lam Quoc Viet


TABLE OF CONTENT

INSTRUCTOR/ SUPERVISOR/ ASSESSOR i

REVIEWERS ii

ACKNOWLEDGMENTS iii

ASSURANCE iv

TABLE OF CONTENT v

LIST OF TABLES AND FIGURES vi

LIST OF ACRONYM vii

INTRODUCTION 1

CHAPTER 1: ALGORITHMS, ISSUES RELATED TO ALGORITHMS AND BASIC PROGRAMMING 2

1 Define basic algorithms to carry out an operation and outline the process of
programming

an application 2

1.1 Provide a definition of what an algorithm is and outline the process in building an

application 4

1.1.1 Define Algorithms 4

1.1.2 The process in building an application 6

1.2 Determine the steps taken from writing code to execution 7

CONCLUSION 9

REFERENCES 10

Performed by Phan Lam Quoc Viet


LIST OF TABLES AND FIGURES

Figure 1-1: The Software development cycle………………………………………………………………………………… 2

Figure 1-2: rinsing the rice………………………………………………………………………………………………………………2

Figure 1-3: Using the proper water ratio…………………………………………………………………………………………2

Figure 1-4: Bringing the water to a boil…………………………………………………………………………………………..3

Figure 1-5: Maintaining a low


heat………………………………………………………………………………………………….3

Figure 1-6: Cooking should be done without looking or stirring………………………………………………………3

Figure 1-7: Cover the rice and set it aside to


rest…………………………………………………………………………….4

Figure 1-8: Toss the rice with a fork to fluff it


up……………………………………………………………………………..4

Figure 1-9: Algorithms…………………………………………………………………………………………………………………….4

Figure 1-10: Flowchart symbols………………………………………………………………………………………………………5

Figure 1-11: Program development


steps………………………………………………………………………………………..6

Figure 1-12: Analyzing the Problem…………………………………………………………………………………………………


6

Figure 1-13: Designing the


Algorithms…………………………………………………………………………………………….6

Figure 1-14: Compile a C# program…………………………………………………………………………………………………7

Figure 1-15: Module that is being


managed…………………………………………………………………………………….7

Figure 1-16: Combining newly created managed module……………………………………………………………….8

Figure 1-17: Loading the CLR………………………………………………………………………………………………………….8

Performed by Phan Lam Quoc Viet


Performed by Phan Lam Quoc Viet
LIST OF THE ACRONYM

Performed by Phan Lam Quoc Viet


INTRODUCTION

Performed Student: Phan Lam Quoc Viet 1


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. (LO1)
 A set of basic algorithm steps for carrying out a
task:
 Defining or analyzing the problem
 Design (Algorithm)
 Coding
 Documenting the program
 Compiling and running the program
 Debugging and testing
 Maintenance
 Examples of algorithms in real life: Figure 1-1: The Software development cycle
Steps to Cooking Rice:
 Step 1: Start by rinsing the rice.

Figure 1-2: rinsing the rice


 Step 2: Use the proper water ratio. In a big pot, combine 2 parts water and 1 part
rice. Use 1 part liquid to 2/3part rice for slightly firmer rice.
Figure 1-3: Using the proper water ratio

Performed Student: Phan Lam Quoc Viet 2


 Step 3: Bring the water to a boil. Add a large pinch of salt after it has reached a boil.
Figure 1-4: Bringing the water to a boil
 Step 4: Maintain a low heat. Reduce the heat to low and maintain a moderate

simmer by covering the pot with a tight-fitting lid.


Figure 1-5: Maintaining a low heat

Performed Student: Phan Lam Quoc Viet 3


 Step 5: Cooking should be done without looking or stirring. Cook for about 18
minutes, or until the water has been absorbed. To prevent the steam from escaping,

wait until the conclusion of the cooking period to peek.


Figure 1-6: Cooking should be done without looking or stirring

 Step 6: Cover the rice and set it aside to rest. Remove the rice from the heat and let it
aside for 10 minutes, covered. The rice will steam during this time for extra fluffy

results.
Figure 1-7: Cover the rice and set it aside to rest
 Step 7: Toss the rice with a fork to fluff it up.

Performed Student: Phan Lam Quoc Viet 4


Figure 1-8: Toss the rice with a fork to fluff it up
1.1 Provide a definition of what an algorithm is and outline the process in
building an application. (P1)

1.1.1 Define Algorithms

- An algorithm is a method or technique that


is used to solve a problem. It works by having
your computer do a series of predefined
actions that define how to accomplish
something, and your computer will execute it
exactly the same way every time.
Figure 1-9: Algorithms

Performed Student: Phan Lam Quoc Viet 5


- Flowchart symbols: + is a diagrammatic representation of an algorithm

+ It uses a variety of symbols to describe the steps necessary to solve an issue.

Performed Student: Phan Lam Quoc Viet 6


Figure 1-10: Flowchart symbols

1.1.2 The process in building an application.

The following are the steps in the program


development process:
 Defining and Analyzing the Problem.
 Designing The Algorithm.
 Coding or Writing the Program.
 Execution of the test.
 Debugging.
 Final Documentation. Figure 1-11: Program development
steps
 Defining and Analyzing the Problem:
- We investigates the issue in this stage. we determine
the most effective method for resolving these issues.
Studying an issue is also important since it aids a programmer
in making decisions concerning the following:
Figure 1-12: Analyzing the Problem

 The data and statistics required for the program's development.


 The way the program will be put together.
 In addition, the language in which the program will work best.
 What is the desired output and in what format is it required, and so forth.
 Designing The Algorithm:
- An algorithm is a set of instructions that must be followed
before a programmer can begin working on his software. In addition, he
creates an algorithm to aid in visualizing various software alternatives.

 Coding or Writing the Program: Figure 1- 13:


Designing the Algorithms
- After developing the algorithm, the next step is to create the program in a high-level
language. Coding is the term for this procedure.

 Execution of the test:


- Test execution is the process of running a program to look for faults or defects. It aids a
programmer in verifying the program's logic. It also guarantees that the software is free of errors
and functional.

Performed Student: Phan Lam Quoc Viet 7


 Debugging:
- Debugging is the process of discovering, identifying, and fixing flaws in a software.

- It is accomplished by repeatedly executing the application.

 Final Documentation:
- The documentation for the software is created once it has been completed. The user
receives the final documentation. It instructs the user on how to get the most out of the
application.

- Another goal of documentation is to allow other programmers to make changes to the


code if necessary. Documentation should be done at every stage of the program's development.

1.2 Determine the steps taken from writing code to execution. (M1)

The steps for compiling a C# program are as follows:


 Creating a Managed Module from Source Code.
 Adding a new managed module to the assembly /
assemblies.
 The CLR is being loaded.
 CRL is in charge of putting the assembly together.
- Every.NET program is initially compiled using the proper
compiler, for example, if we develop a program in C#, it is
compiled using the C# compiler (i.e. csc.exe). Figure 1-14:
Compile a C# program
CLR is used by every program in the.NET framework to execute (communicate) in an
operating system (Common Language Runtime).
 Compiling Source Code into Managed
Module:
- The.NET framework has its own compiler for each
language. JavaScript has a Jscript compiler, for example,
and C# has a C# compiler.
- A Managed Module is created whenever source
code is generated by the proper compiler. Figure 1-15: Module that is being
managed

- If we write a console program and build it, we will get an.exe file. When we construct a
web application,.dll files are generated.

Performed Student: Phan Lam Quoc Viet 8


- The Managed Module is a Windows Portable Executable (PE) file that contains the
following components:
 PE Header
 CLR Header
 Metadata
 Combining newly created managed module into the assembly / assemblies:
- The terms "assembly" and ".dll" or ".exe" refer to the same thing. There are several
software files in a web application that are developed in various languages. This assembly

integrates and assembles into a single unit. It also includes pictures (sometimes known as resource
files) and a number of controlled modules.
Figure 1-16: Combining newly created managed module
 Loading the CLR:
- Each software is stored on a hard drive. Each file should be loaded into RAM from a hard
disk, converting magnetic address space to electric address space. This is achievable with the
Loader's assistance.

Figure 1-17: Loading the CLR


 Executing the assembly in & by CLR:

Performed Student: Phan Lam Quoc Viet 9


- The acronym CLR stands for Common Language Runtime. It's the brains behind the.NET
framework, and it's what allows a program to run on a computer.

- Garbage collection, code verification, memory management, code access security, and IL
to Native translation are some of the features provided by CLR.

- PE Header, CLR Header, Metadata, and Address Table values are all visible.

Performed Student: Phan Lam Quoc Viet 10


CONCLUSION
After completing this report, I have gained

Performed Student: Phan Lam Quoc Viet 11


REFERENCES

Performed Student: Phan Lam Quoc Viet 12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy