1. Trang chủ
  2. » Công Nghệ Thông Tin

Assignment 1 programming c sharp

10 2 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 303,12 KB

Nội dung

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.

ASSIGNMENT FRONT SHEET Qualification BTEC Level 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 Student ID Class 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 Grading grid P1 M1 D1  Summative Feedback: Grade: Lecturer Signature: Assessor Signature:  Resubmission Feedback: Date: Task 1: 1.1 Overview about Algorithm: - Algorithm is methods, ways that people ask themselves to follow such procedures, it will produce optimal results - This method can come from many different sources, it can be a scientist they invented, it can also be a certain group of people or years of experience, when we apply it correctly then I will have better results than something I myself - Example: To solve an equation ax+b = Need steps: Step 1: Start Step 2: Declare variables a, b, x Step 3: Enter a,b Step 4: Check a: +If a =0 +Check b: +If b=0: print the equation with infinitely many solutions +If b != 0: print the equation with no solution +If a != 0: print out the equation with one solution x=-b/a Step 5: End - Example: Use flow chart to solve the problem ax + b = 0: 1.2 Represent a small and simple problem: -Problem: Sort students' grades in ascending order + The reason it’s needed : It makes it easier for teachers to control students' grades + The way the algorithm solves the problem: Use Insertion Sort Step 1: Start Step 2: Declare variables student score and temp Step 3: Enter student score Step 4: Store the first variable to “temp” Step 5: Store the second variable to the First variable Step 6: Store the “temp” variable to the 2nd variable Step 7: Keep storing the next variable until the array runs out Step 8: Score again in new array and repeat these until the arrangement is correct Step 9: End Task 2: 2.1 Analyse the problem: -The requirement is to arrange student scores in ascending order The purpose is to help teachers control student grades more easily This request is quite simple and clear The way to deal with this request is quite easy The language used to solve this problem is c# and made with the visual studio community 2022 application Student scores will be stored in a 1-dimensional array Use overriding sort to sort student scores in ascending order 2.2 Flow chart: Task 3: 3.1 Introduce how the problem is solved: - Algorithm will sort student scores in ascending order The first element in the array is assumed to be sorted Take the second element and store it separately in temp Compare temp with the first element If the first element is greater than temp, then temp is placed in front of the first element Take the third element and compare it with the elements on the left of it Placed it just behind the element smaller than it Keep doing that and run out of arrays After running the array, it will repeat that way again This process will end when there are no numbers before the number less than the number after 3.2 Source code and screen shots of the final result: 3.3 Explain briefly what is Software Development Life Cycle: - Software Development Life Cycle is is a way to measure and improve the development process It allows a fine-grain analysis of each step of the process This, in turn, helps companies maximize efficiency at each stage As computing power increases, it places a higher demand on software and developers Companies must reduce costs, deliver software faster, and meet or exceed their customers’ needs Software Development Life Cycle helps achieve these goals by identifying inefficiencies and higher costs and fixing them to run smoothly 3.4 Explain how the source code is compiled: - A compiler takes the program code (source code) and converts the source code to a machine language module (called an object file) Another specialized program, called a linker, combines this object file with other previously compiled object files (in particular run-time modules) to create an executable file Task 4: 4.1 Include Test cases: 4.2 Evaluate how the problem is solved from the designed algorithm to the execution program writtenby a specific programming language: - Request is made in c# language This process is quite simple just need to two main tasks is to create a variable to store the number of students and create an array to store the number of students' scores This project has met the requirement of arranging student scores I am quite satisfied with this project However it is still too simple Subfunctions can be used to make this project neater References: *Task 1: 1.1 : https://topdev.vn/blog/thuat-toan-la-gi-lap-trinh-vien-co-can-biet-thuat-toan-khong/ -on 26/9/2022 1.2 : https://www.programiz.com/dsa/insertion-sort -on 26/9/2022 *Task 2: 2.1: https://viblo.asia/p/cong-viec-phan-tich-yeu-cau-trong-mot-du-an-phan-mem-5WQvzgxxRk3E -on 27/9/2022 *Task 3: 3.1 : https://www.programiz.com/dsa/insertion-sort -on 27/9/2022 3.2 : https://codelearn.io/learning/csharp-fundamentals/50201 -on 27/9/2022 3.3 : https://phoenixnap.com/blog/software-development-life- cycle#:~:text=Software %20Development%20Life%20Cycle%20is,%2C%20Test%2C%20Deploy%2C%2 0Maintain -on 28/9/2022 3.4: http://www2.hawaii.edu/~takebaya/ics111/process_of_programming/process_of_programming.html#:~:te xt=A%20compiler%20takes%20the%20program,to%20create%20an%20executable%20file -on 28/9/2022 *Task 4: 4.2: https://blog.railwaymen.org/evaluate-success-project -on 30/9/2022 ... (source code) and converts the source code to a machine language module (called an object file) Another specialized program, called a linker, combines this object file with other previously compiled... %20Development%20Life%20Cycle%20is,% 2C% 20Test% 2C% 20Deploy% 2C% 2 0Maintain -on 28/9/2022 3.4: http://www2.hawaii.edu/~takebaya/ics 111 /process_of _programming/ process_of _programming. html#:~:te xt=A%20compiler%20takes%20the%20program,to%20create%20an%20executable%20file... efficiency at each stage As computing power increases, it places a higher demand on software and developers Companies must reduce costs, deliver software faster, and meet or exceed their customers’

Ngày đăng: 28/02/2023, 21:52

w