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

ASM 1 C# programming 1619 FPT Greenwich (Distinction Super Sale)

22 11 0

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

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Điểm của bài asm còn tùy thuộc vào người chấm. Chỉ cần paraphase bài này là có thể pass. 1 trong nhưng tool paraphase mình recommend là quillbot.The submission is in the form of 1 document.● You must use the Times font with 12pt size, turn on page numbering; set line spacing to 1.3 andmargins to be as follows: left = 1.25cm, right = 1cm, top = 1cm, bottom = 1cm. Citation andreferences must follow the Harvard referencing style. ASSIGNMENT FRONT SHEET Qualification BTEC Level HND Diploma in Computing Unit number and title Unit 2: Networking Infrastructure Submission date Date Received 1st submission Resubmission 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 P2 P3 P4 M1 M2 D1 ❒ Summative Feedback: Grade: Lecturer Signature: ❒ Resubmission Feedback: Assessor Signature: Date: Table of Contents I Network Network definiton Ξ First of all, network also known as computer networking, which can be understand as a group of computers utilizing a principles of general communication protocols over digital connections for the intention of sharing resources located upon or accommodated by network nodes ... https:www.dnsstuff.comdatabreach 10 1 Dobran, B., 2 019 Information Security Risk Management: Build a Strong Program Online Available at: https:phoenixnap.combloginformation security riskmanagement garg, r., 20 21 Threats... List and give examples with dates 12 Propose a method to assess and treat IT security risks (M1) 18 TASK DESCRIBE AT LEAST ORGANIZATIONAL SECURITY PROCEDURES (P2) .20 Definition... Dan Swinhoe, 20 21 The 15 biggest data breaches of the 21st century, s.l.: s.n Ohri, A., 20 21 What Is DMZ Network Online Available at: https:www.jigsawacademy.comblogscyber security whatisdmz

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 Nguyen Huy Hoang Student ID GCH200739 Class GCH0908 Assessor name Lai Manh Dung 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 Hoang`  Summative Feedback: Grade: Lecturer Signature:  Resubmission Feedback: Assessor Signature: Date: Table of Contents Table of Contents .2 STATE THE PROBLEM AND ALGORITHM OVERVIEW I STATE THE PROBLEM ¥ Ԓ Problem: ALGORITHM OVERVIEW ¥ Ԓ Definition of Algorithm: Ԓ Charateristics of an Algorithm: Ԓ The vital roles of algorithm: II Analysis and design a solution for this problem .5 III DEMONSTRATION THE COMPILATION(HOW SOURCE CODE IS COMPLIED) AND EVALUATION THIS SOLUTION ¥ Variables and data types: ¥ Input the total number of members: ¥ Menu based program: Ԓ Menu: 10 Ԓ EXTRA EXPLANATION ABOUT MENU BUILDING(REASON WHY “SWITCH_CASE” BE USED INSTEAD OF “IF-ELSE”) 12 FUNCTIONS AND SELECTIONS IN THIS PROGRAM: 13 ¥ ENTER ALL INFORMATION: 13 PRINTING ALL INFORMATION 15 FINDING THE HIGHEST TRAINING ACHIEVEMENT(Apply Comparing Algorithm) 16 CALCULATE THE CALORIES CONSUMED 18 ¥ Explanation How Source Code is complied: 19 ¥ Software Development Life Cycle 20 Ԓ Definition of Software Development Life Cycle: 20 References 21 I STATE THE PROBLEM AND ALGORITHM OVERVIEW ¥ STATE THE PROBLEM Ԓ Problem: A boy who loves cycling need to store and manage the personal information and daily training stat of the members in his cycling club He told me to help him make an small app that can regulate information includes: name, age, email, phone number, training parameter through the training process of each member in the club and print out on screen contemporarily, from which to find out who has the highest practical achievement to award weekly as well as calculate the calories consumed of each one  After considering and overviewing this problem, this one be found as a problem not too complicated to solve  These requirements and ways to operate of the app that the boy gives can be solved through Searching algorithm and Comparing algorithm Programs and algorithms of this problem could also can be built via C# language  For a deeper understanding, the next section will be an overview of the algorithm ¥ ALGORITHM OVERVIEW 1: ALgorithm image illustration Ԓ Definition of Algorithm:   Informally, algorithm is any well defined computational procedure that gets some value, or set of datas, as input and fabricates some value, or set of datas, as output Consequently, each algorithm is a sequence of computational steps that alter and adjust the input into the output properly and appropriately An algorithm also may be defined as a tool for solving a well-determined computational problem The statement of the problem specifies in general allocations the desired input/output relationship The algorithm describes a specific computational procedure for achieving that input/output relation ship (Warner Ave, 25 Nov, 2020.) Ԓ Charateristics of an Algorithm:        Well-Defined Inputs: Each algorithm all needs input values from a specified set Well-Defined Outputs: From any set of input values an algorithm makes up output values from a specific set The output values also are the solution to the problem Definiteness: The steps of each algorithm have to be described precisely and appropriately Correctness: Producing the accurate output values for each set of input values by each algorithm is necessary Finiteness: Algorithm ought to make up the desired output after a finite (but maybe big) number of steps for every inputs in the set It ought to not finish in an infinite loops or the same Effectiveness: This has to be feasible to operate each step of an algorithm accurately and in a finite amount of time The algorithm also should be simple, generic and actual, such that it could be executed on will the available methods It must not contain few high-tech technologies, or anything Generality: The procedure need to be applicable of the desired form, not just for a particular set of input values It's also important to be clear and unambiguous (Thomas H Cormen, 2015) Ԓ The vital roles of algorithm:   It is quite difficult to imagine when using internet or computer without intelligent and effective algorithms With the support of these algorithms, various sites on the Internet and computer are able to adjust and manipulate a tons of data An algorithm also help people to manipulate data in diverse ways, such as sorting, inserting data, searching particular data processing, calculating and other relative computer and mathematical operations Ԓ Example of algorithm: Sorting a sequence of numbers input by Sorting algorithm  To sort a sequence of numbers into increasing order This problem aries frequently in practice and provides fertile ground for introducing many standard design techniques and analysis tools Here is how it define the sorting problem Given the input sequence(51, 4, 5, 31, 9), a sorting algorithm returns as ouput the sequence (4, 5, 9, 31, 51) Such an input sequence is called an illustration of the sorting algorithm 2: Example to illustrate the Sorting algorithm II Analysis and design a solution for this problem ¥ Analyze the problem Ԓ To solve this proplem, I need to review and consider its requirements and data input and output The above problem mainly revolves around managing stats of boys his cycling club The inputs inculde: Information(Name, Age, Mobile, Email) and specific training data(Distance: Km) of each member has cycled during a week The output must consist printing out these input informations to the screen to observing training process and assessing, finding out the member who achive the highest parameter(the longest distance) and calculate the calories consumed(specifically 1km/70calories) Summarize:  Input: Information(Name, Age, Mobile, Email) and specific training data(Distance: Km)  Output: Printing these input informations, finding the highest achievement, the calories consumed Ԓ Solving this problem will be operated by building an app based on C# Language and the app will be complied by VISUAL STUDIO IDE and to help understand how this app executing, these is the use-case which describe it 3: Use-case the app interact to user Ԓ Two significant algorithms which are the most suitable for solving this problem are Searching algorithm and Comparing algorithm, especially Comparing algorithm play a huge role in that Particularly, in the main function of this problem which is finding out the highest parameter, Comparing algorithm will be utilizied through structures of C# language implicitly carry out the program to compare each data input (distance cycling) of each member and find the highest result And then, the only thing searching a need to is search this result to print if the boy select its choice Ԓ To make an app for this problem, building and compliating it in VISUAL STUDIO 2019 IDE is considered as a good high-tech IDE to build and apply the high-level language C# to make solution for this problem III DEMONSTRATION THE COMPILATION(HOW SOURCE CODE IS COMPLIED) AND EVALUATION THIS SOLUTION It comes to the central main task of this problem and it is the compilation and running of this program which has been built as an app to solve this problem All paths of the app also have been build and complie in VISUAL STUDIO 2019 IDE with high-level language C# ¥ Variables and data types: 4: Variables and data types in this program Ԓ Before it comes to the explanation of how the program be complied and run in this app, these variables and datatypes include Integer total(represent for the total number of members) and choice(represent for the number of selection), Boolean isTotal(this type to make the condition to be sure that the input of total always is integer), array type string name(to be used for storing name of members), array type integer age(declare to be used for storing age of members), array type string email(for storing email of members), array type long mobile(to be used for store phone number of members) and the last one is array integer type distance(to be used for store training achievement of members) ¥ Input the total number of members: 5:Input total number of member screenshot Ԓ First of all, the program should receive the total of member number in his club variables have been declared to get the total They are integer and boolean datatypes, Int total is Where total Number of Students is Located and Bool isTotal to make an condition that if total is beyond bound, user must enter again with valid input.‘dowhile’ loop is used to make sure that the value input of the boy is valid If input is wrong, the program will display “Invalid Input!!!” with the red color The ‘do-while’ loop will rerun constantly until the boy enter the appropriate valid, the ‘do-while’ will end to continue other tasks ¥ Menu based program: Ԓ Firstly, there is the list of selection in app’s menu: 6: List menu This list has all selections which also meet the boy need It simply has been built with Console.WriteLine Ԓ Before it comes to the menu based program, there is the Input choice program 7: Input choice It has been built as same as the input total program, declare boolean isChoice to make an condition that if choice is beyond bound, user must enter again with valid input.‘do-while’ loop is used to make sure that the value choice of the boy is valid If choice is wrong, the program will display “Invalid Input!!!” with the red color The ‘do-while’ loop ScreenShot will rerun constantly until the boy enter the appropriate valid, the ‘do-while’ will end to continue other tasks Ԓ Menu: Based on these above analysis of this problem, creating a menu based program is necessary It not only help this app have multi choices, but it also make the program more flexible The boy can select the option that he wantand skip options he don’t use yet When an option is done, the program could go back to the main menu so he can choose another option There also be an option to quit program 8: Menu This program is built based on “Switch-case” statement and “for” loop To explain it clearly and concisely, there is the flow-chart below which will present all mechanism Flow-chart of how switch-case executing Ԓ EXTRA EXPLANATION ABOUT MENU BUILDING(REASON WHY “SWITCH_CASE” BE USED INSTEAD OF “IF-ELSE”)  Based on the knowledge I have learned plus references from different sources, I would like to present my personal view and reasons for using “switch-case” statment instead of using "if-else" statment to build main menu for the program: o Firstly, I think creating menu by "switch-case" statement is more dynamic and efficient than by "if-else" Instead of having to type the condition over and over again to gain access to the program, "switch-case" simply enters the case and the case label, it also help program look much clearly o According to some theory I have consulted from different sources about C# language, when compiler of this app's program gets start compiling a "switch-case" statement, it will inspect each of the case constants and create a “jump table” that it will use for selecting the path of execution depending on the value of "choice" variable(especially 1-5) in menu Therefore, if the boy(user) need to select among a large group of values, a switch statement will run much faster than the equivalent coded using a sequence of “if-else” The program could operate this because it knows that the case constants are all the same type and simply have to be compared for equality with the "switch-case" expression, while in case of “if-else” expressions, the compiler of this program may not be able to perform o Not only that, I saw "switch-case" are better for fixed data conditions such as -> 5(selections in menu) A "switch-case" statement may be able to prove to be faster than "if-else" statement provided number of cases are good To solve this problem of the boy, i has made the program app with selection Therefore, I prefer using "switch-case" because the number of cases are quite much "if-else" also takes more times to get into the condition Adding and removing labels in this app is also easier with a "switch-case" o From these reason, I find “switch-case” statement more suitable to build menu than “If-else” in C# language ¥ FUNCTIONS AND SELECTIONS IN THIS PROGRAM: ENTER ALL INFORMATION: Ԓ First selection in the program is the getting information, which has a role that accept, check the infor of each member and store these information into storage of program 9: ENTER INFORMATION Ԓ “for” loop is utilized and located to cover almost all algorithms and other structures inside It plays a role as a the machine that makes the statements run from the initial value to the limit value, incrementing and repeating the whole function The terminatin condition of ‘for’ loop is set that the index must be less than ‘total’variables and loop increment to get enough infor Distance input has been located in “do-while” and “if” statement to make the complitaing program checks and makes sure that the input in the range(0-500km) Ԓ To explain it clearly and concise, I have drawn a simple flow-chart to describe it, and it’s below: 10: FLOW_CHART DESCRIBES ENTERING ALL INFORMATION After explaining this selection, there is the screen shot when the program running: ScreenShot PRINTING ALL INFORMATION Ԓ To be easier when using and calling this function, I have built the printing all information as a method 11: PRINTING METHOD Ԓ This method has been built quite simple, it just have “for” loop to operate and perform priting all information which be entered in the first selection Ԓ There is the screen shot when program running: SCREENSHOT FINDING THE HIGHEST TRAINING ACHIEVEMENT(Apply Comparing Algorithm) Ԓ This is one of main selections in menu that meets requirements of the boy in problem As well as the printing information, this one also has been built as a method finding highest distance training parameter has been designed as a program base on comparing algorithm that compares each parameter with a virtual variable assigned to 12: FINDING THE HIGHEST TRAINING Ԓ To explain how Comparing Algorithm is applied and the fuction executing more clear, there are the list of structures, functions, :  “for” loop is used in this function It is utilized and located to cover ‘if-else’ structure It plays a role as a the machine that makes the statements “if-else” run from the initial value to the limit value, incrementing and repeating the whole function Particularly, It be initialized counter with index “i” variable that be set up be equal to and it just be executed once at the beginning The terminal condition of ‘for’ loop is set less than or equal to ‘total’variables( the variables that be entered in first function) If the condition be met, statements inside the loop is executed If not, the program will exit the loop Last but not least there is the loop variant It is the increment value: i++ It also is evaluated at the end of every iteration for assure that the loop will be run incrementally according to the value of the 'total' variable  variables have been declared what are integer Sbd(which represent for the index of member who has the highest training stat) and Max(which assign to distance[0] used to make an agurment to compare by if and operator “

Ngày đăng: 09/06/2023, 11:42

w