


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
• Need to raise business issues that need to be resolved. • Analyze the problem carefully and design a solution using the same approach as designing a management program. • Show how to compile and run the borrowed program • Judging from problem solving, design to execution, is written by a C# programmer. • Can come up with solutions in the future to improve our programs better
Typology: Assignments
1 / 34
This page cannot be seen from the preview
Don't miss anything!



























Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 1: Programming Submission date 22 /8/2021 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Lê Thị Phương Anh Student ID Class GCH0907 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 Anh Grading grid P1 M1 D
Grade: Assessor Signature: Date: Lecturer Signature:
I. Introduction When participating in the interview, apply for an internship position for a software development company. For admission, it is necessary to demonstrate basic programming and problem-solving skills. To do this, I need to write a report on the use of algorithms to solve problems that must be prepared by giving examples, how algorithms are used to solve problems, and steps to be taken to create them, giving a working program solution. It is necessary to create a program. And problem solving involves basic procedural programming instructions - sequence instructions (input, output, and assignment statements), loops, conditional statements. To complete the best program, to be Grey through the language setting C Sharp " C# (pronounced as 'C Sharp') is a new computer-programming language by Microsoft Corporation, USA. C# is a fully object - oriented language like Java and is the first component- oriented language. It has been designed to support the key feature of .NET Framework, the new development platform of Microsoft for building component - based software solutions. " (Balagurusamy 2007, p.1). Figure 1: C Sharp Programming Language
Development Process. ISO/IEC 12207 is a universal standard for program life-cycle forms. It points to be the standard that characterizes all the errands required for creating and keeping up program. Figure 2 : Software Development Life Cycle Tutorialspoint (2021) research indicates that SDLC could be a prepare taken after for a program extend, inside a computer program organization. It comprises of a point by point arrange depicting how to create, keep up, supplant and modify or improve particular program We all know “SDLC is a methodology for designing, building, and maintaining information and industrial systems. So far, there exist many SDLC models, such as the Waterfall model, Spiral model, Big Bang model or Agile model” (Alshamrani & Bahattab, 2015). Here is an introduction to the most important and popular model followed in the industry II.1 Waterfall model Alshamrani & Bahattab (2015) considered that The Waterfall Model is the oldest and the foremost well know. SDLC model. The goes downward highlight of this model is its sequential steps. It goes descending through the stages of necessities examination, plan, coding, testing, and support. In addition, it guarantees the plan imperfections before the development of a product. Stages that build this show are not covering stages, which suggests that each phase must be completed before the next phase can begin and there is no overlapping in the phases.
Image 3 : Waterfall model is broken down into multiple phases The following steps give a brief description about the waterfall process: ➢ Stage 1: Requirement Analysis ➢ Stage 2: Design ➢ Stage 3: Development ➢ Stage 4: Testing ➢ Stage 5: Deployment ➢ Stage 6: Maintenance Next, we find out the advantages and disadvantages of this model: ❖ Advantages of the Waterfall model
The four steps give a brief description about the Spiral model phases: ➢ Stage 1 Planning ➢ Stage 2 Risk Analysis ➢ Stage 3 Development/Engineering ➢ Stage 4 Evaluation Phase This Spiral model also has its advantages and disadvantages Advantages of the Spiral model:
programming language. In my program, the variables to declare the object's information are name, ID card, date of birth, gender, room code and room rate. Thus, declaring variables to store data and reuse. Figure 5 : Example of variable III. 1. 2 Data types Along with the variable is the data type. In simple terms, a data type is a collection of groups of data with the same characteristics, storage and handling operations on that data field. It is a signal to the compiler to know the size of a variable (int is 4 bytes) and its capacity (int can only hold integers). At the same time, just like variables, they are an integral part of a program. So, there must be a data type to recognize the size and capacity of a variable and for the purpose of data classification. If there is no data type, it is very difficult to process because we do not know whether this variable is a string or an integer or a real number. Figure 6 : Example of data types A data type indicates size and type of variable values. It is critical to utilize the proper information sort for the corresponding variable; to dodge blunders, to save time and memory, also help your code more viable and discernable. The foremost common information sorts are:
III. 1. 3 Structure types In C#, struct is the value type data type that speaks to data structures. It can contain a parameterized constructor, static constructor, constants, properties, ...Struct is a structured data type that makes it convenient for programmers to manage data and program. This is a parameter data type used to encapsulate different but related data fields. Figure 8 : Struct type And with this declaration we have a new data type named CustomerManagement. And can declare variable, use it like using other data types. If the type int can contain integers, type double can contain real numbers, the type Customer has just declared can contain 5 subfields of information: name, age, card ID, gender, check-in time and room code. III. 2 Conditional statements Conditional statements in C# programming are used to make choices based on conditions. If you place several conditions on a block of statements, the flow of execution may change based on the result evaluated by the condition. This preparation is called decision making in 'C#'. In 'C#' programming there are two common constructs:
Figure 9: Example about if statement The if-else statement is an extension of If. For if-else, execute the command line inside the if statement if the condition is true, and vice versa, execute the line of code in the else explanation, in case the if condition is false Figure 10: Example about if else statement The if - else if - else statement allows the execution of a block of code between different choices. The conditions will execute from the top is starting from the if loop, then the else if and finally the else. Using this statement will make our code that requires typing simpler and easier to use as well
Figure 13 : Example about while loop The for loop repeats a block of statements until the specified condition returns false. And in case, when we know the exact number of times you want to loop through a block of code, the employee determines how many guests he wants to enter, say 20 students, we use the for loop as an alternative to the while loop because it defines the number of loops. It also makes the code simpler Figure 14: Example about for loop
III.4 Function Because executing a piece of code many times, instead of having to copy and copy that code many times leading to the program being duplicated many times, in c# there is a function that allows us to execute certain code many times without having to copy the code, but just call the function name. In simple terms, a function is a block of code used to execute the statements specified in that block of code. A function consists of the following components:
III. 5 .2 Flowchart
Figure 16: Main menu This is the main flowchart of the program so that it can help people somewhat visualize our program