Docsity

Assignment 1 Programing - 1618, Assignments of Computer Programming

Toggle sidebar
bg1
Page 1 of 39
ASSIGNMENT 1 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Unit 1: Programming
Submission date
08/12/2022
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
Tran Duc Long
Student ID
GCH210562
Class
GCH1106
Assessor name
Pham Danh Tuyen
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
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

Partial preview of the text

Download Assignment 1 Programing - 1618 and more Assignments Computer 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 08 /12/2022 Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Tran Duc Long Student ID GCH

Class GCH1106 Assessor name Pham Danh Tuyen

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 D

Table of Contents

  • A. Introduction:
  • B. Task 1 - State your simple business problems to be solved (P1)
    • 1.1. What is the algorithm?
      • a. Dentition:.
      • b. Characteristics of algorithms:
    • 1.2. Represent a small and simple problem
  • C. Task 2 - Analyse the problem and design the solutions by the use of suitable methods (P1)
    • 2.1 Analyse the problem:
    • 2.2 Flowchart:
    • 2.3 A use case diagram for actions required:
  • D. Task 3 - Demonstrate the compilation and running of a program (P1 – M1)
    • 3.1. Introduce how the problem is solved
    • 3.2. Source code and a screenshot of the result final
      • Source code and explain
      • Screen shots of the final result:................................................................................................................
    • 3.3. Explain briefly what is Software Development Life Cycle.....................................................................................
    • 3.4. Explain how the source code is compiled
  • written by a specific programming language (D1) E. Task 4 - Evaluate how the problem is solved from the designed algorithm to the execution program
    • 4.1 Test plan:
      • a) Test input:
      • b) Test method........................................................................................................................................
      • c) Test algorithm
      • d) Overall evaluation of testing part
    • written by a specific programming language 4.2 Evaluate how the problem is solved from the designed algorithm to the execution program
  • F. Conclusion:
  • Reference
  • Figure 1: The sort algorithm Table of picture
  • Figure 2:Characteristics of algorithm
  • Figure 3:Algorithm is clear from input to output
  • Figure 4:Finiteness of algorithm
  • Figure 5:Using available resources to handle problems
  • Figure 6:Independent of algorithm
  • Figure 7:Sorting grade of student problem
  • Figure 8:How the bubble sort algorithm works
  • Figure 9: Variables in my program
  • Figure 10: Statements in my program
  • Figure 11: Flowchart system of my program...............................................................................................................
  • Figure 12:Find student’s information by name
  • Figure 13: pseudocode bubble sort
  • Figure 14: flowchart bubble sort
  • Figure 15: use case my program..................................................................................................................................
  • Figure 16:How my program solves problem
  • Figure 17: Software Development Life Cycle
  • Figure 18: Example about how c# compiler works
  • Picture 1: Class Student Table of source code
  • Picture 2: Method read Password
  • Picture 3:Method to create a student
  • Picture 4:Method to show list student........................................................................................................................
  • Picture 5:Method to find student by name.................................................................................................................
  • Picture 6:Method to sort Gpa (Bubble sort)
  • Picture 7: Method Main()
  • Picture 8: Import static using static System.Console
  • Picture 9: show userlogin on console
  • Picture 10: Enter student
  • Picture 11:Show menu
  • Picture 12:Sort gpa on console....................................................................................................................................
  • Picture 13:find student's information by name on console
  • Picture 14:Show list student on console
  • Picture 15: Exit program

Figure 1 : The sort algorithm

b. Characteristics of algorithms:

Figure 2 :Characteristics of algorithm

+ Unambiguous: The algorithm should be explicit and understandable. Each of its processes

(or stages), as well as its inputs and outputs, should be self-evident and lead to a single

meaning.

Figure 3 :Algorithm is clear from input to output

+ Finiteness: Algorithms must terminate after a predetermined number of steps.

Figure 6 :Independent of algorithm

1.2. Represent a small and simple problem

  • To understand algorithms in programming more clearly, I will depict a modest and easy

business challenge, which is sorting students by grades in ascending order. This is the

challenge that most teachers have while classifying students.

Figure 7 :Sorting grade of student problem

I will use the bubble sort algorithm to solve this problem because it is easier than other

sorting techniques. The idea behind this technique is to sort a list of student grades by

repeatedly exchanging two consecutive values if they are in the wrong order (the latter

grade is less than the prior grade) until the sequence grades are entirely sorted by

ascending order.

Figure 8 :How the bubble sort algorithm works

C. Task 2 - Analyse the problem and design the

solutions by the use of suitable methods (P1)

2.1 Analyse the problem:

  • Scenario:

A simple program that assists teachers in creating a list of students complete with id, full

name, address, gpa, and major. This program allows instructors to access the information

of students with the highest and lowest scores by sorting a list of students by scores from

low to high. Teachers may also search student information by name.

  • Analyze the situation:

+ Create a userLogin to increase the security of the application.

+ Create a list Of students.

Figure 9 : Variables in my program

Statement:

Figure 10 : Statements in my program

2.2 Flowchart:

My program:

Find student’s information by name:

Figure 12 :Find student’s information by name

Bubble Sort:

I have a pseudocode that looks like this:

Figure 13 : pseudocode bubble sort

Flowchart:

2.3 A use case diagram for actions required: Figure 15 : use case my program

D. Task 3 - Demonstrate the compilation and running of

a program (P1 – M1)

3.1. Introduce how the problem is solved

In my program, I apply object-oriented programing to divide this problem into small tasks that

include: 2 Class and 5 functions ReadPassword(), CreateStudent(), FindByName(), SortByGpa(),

and, ShowStudents(). In addition, I have used algorithm that were designed in task 2 to build

function SortByGpa(). These functions CreateStudent() and ShowStudents will support functions

FindByName() and SortByGpa(), EditGpa() in reading and displaying results.

In detail, my program will read unsorted list of students that included fullname, address, gpa, and

major from the keyboard, and then I display a menu. In menu have 4 options equivalent to 4

different functions sort, search, display, and exit program on the console screen. The user can

input choices with associated functionalities.

Figure 16 :How my program solves problem