Download 1618 asm1-programming and more Assignments Computer Science 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 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 D
Summative Feedback: Resubmission Feedback:
Grade: Assessor Signature: Date: Lecturer Signature:
- A. INTRODUCTION:
- I. C# LANGUAGE:
- II. ALGORITHM:
- B. SDLC:
- I. DEFINITION:
- II. V-SHAPE:
- III.SCRUM:
- C. ANALYSE THE PROBLEM AND DESIGN THE SOLUTIONS (P1):
- I. ANALYSE THE PROBLEM:
- DATA TYPES, DATA STRUCTURES NEEDED IN THE PROBLEM:
- CONDITIONAL STATEMENTS NEEDED IN THE PROBLEM:
- LOOP STATEMENT NEEDED IN THE PROBLEM:
- II. FLOWCHART:
- CREATE STRUCT:
- MAIN:
- INPUT FUNCTION:
- OUTPUT FUNCTION:
- SEARCH FUNCTION:
- D. IMPLEMENTATION (P1):
- I. INTRODUCE HOW THE PROBLEM IS SOLVED:
- II. SOURCE CODE AND EXPLAIN:
- MAIN:
- INPUT FUNCTION:
- OUTPUT FUNCTION:
- SEARCH FUNCTION:
- III. FINAL RESULT AND EXPLAIN:
- LOGIN:
- INPUT FUNTION:
- OUTPUT FUNCTION:
- SEARCH FUNCTION:
- E. TEST CASE (P1):
- F. CONCLUSION:
- Figure 1: Algorithm......................................................................................................................................................................... List of figures:
- Figure 2: Phases of SDLC.
- Figure 3: V-Shape
- Figure 4: Scrum model
- Figure 5: Scrum framework
- Figure 6: Data types, data structures
- Figure 7: If statement
- Figure 8: Switch statement
- Figure 9: For statement
- Figure 10: Do while statement
- Figure 11: Create struct flowchart
- Figure 12: Main flowchart.............................................................................................................................................................
- Figure 13: Input flowchart.............................................................................................................................................................
- Figure 14: Output flowchart
- Figure 15: Output flowchart
- Figure 16: Struct............................................................................................................................................................................
- Figure 17: Main
- Figure 18: Input function...............................................................................................................................................................
- Figure 19: Output function
- Figure 20: Search function
- Figure 21: Login (incorrect)
- Figure 22: Login (correct)
- Figure 23: Input student
- Figure 24: Display students
- Figure 25: Search student
- Figure 26: Test case
A. INTRODUCTION:
I was invited to interview to be a trainee at a software development company. I need to write a report that shows the capability to utilize algorithms to solve essential programming problems. This report will have definitions and how to utilize algorithms to take care of fundamental business problems. The problem to be tended to will include essential procedural programming guidelines. Problems are dissected and planned by utilizing functions and a menu-based program. This report plans to show a concise portrayal of the algorithm and attempt to fabricate an application to solve simple business problems. I will use algorithm to take care of the problem: student management. Problem: A teacher has difficulty managing a large number of students in her class. Documentary management of student information can lead to loss of documents and possible theft of student information by outsiders. Solution: I will create a program to manage student information in C# with procedural programming. The program will have the function of logging in, adding student information, printing out student information, finding students and exit program.
I. C# LANGUAGE:
C# is a programming language created by Microsoft. It was presented in 2002 with adaption 1. Microsoft’s .NET Framework. From that point toward, C# has gone through a few corrections, comparing with each .NET update. Today, it is perhaps the most well-known programming dialects for making Windows projects and web applications (Christensson, 2014). C# is a subsidiary of the C programming language and is like C++. It utilizes similar essential administrators as C++, is object-arranged, case sensitive, and has almost identical syntax. However, there are a few contrasts among C# and C++ (Christensson, 2014). In particular, C# is planned explicitly for Microsoft’s .NET Framework. This permits designers to exploit every one of the elements offered by the .NET API. However, it additionally implies C# applications can just sudden spike in demand for stages that help .NET runtimes, like windows, windows server, and windows phone. For programs written in C# to run on different stages, the code should be incorporated utilizing a transformation instrument like Microsoft .NET native (Christensson, 2014).
II. ALGORITHM:
An algorithm is a process or set of decides that are continued in estimations or other problem-solving operations. Algorithms are viewed as the foundation of data programming. It incorporates rules, mandates, or techniques for finishing the underlying state given. At the point when the necessities are careful arranged, the algorithm will show exact outcomes (Lynch, 2021).
B. SDLC:
I. DEFINITION:
According to Jevtic (Jevtic, 2019), SDLC is an orderly cycle for building programming that guarantees the quality and accuracy of the product assembled. SDLC measure means to deliver top notch programming that meets client assumptions. The framework improvement ought to be finished in the pre- characterized time span and cost. SDLC comprises of a definite arrangement which discloses how to plan, construct, and keep up with explicit programming. Each period of the SDLC life Cycle has its own interaction and expectations that feed into the following stage. SDLC represents Programming Advancement Life Cycle and is likewise alluded to as the Application Improvement life-cycle. The entire SDLC process divided into the following SDLC steps:
- Requirement collection and analysis: The necessity is the primary stage in the SDLC interaction. It is led by the senior colleagues with contributions from every one of the partners and space specialists in the business. Anticipating the quality confirmation necessities and recognition of the dangers implied is additionally done at this stage. This stage gives a clearer image of the extent of the whole task and the expected issues, openings, and orders which set off the undertaking. Prerequisites Social occasion stage need groups to get definite and exact necessities. This assists organizations with concluding the essential course of events to complete crafted by that framework.
- Feasibility study : This process conducted with the help of 'Software Requirement Specification' document also known as 'SRS' document. It includes everything which should be designed and developed during the project life cycle.
- Design : In this third stage, the framework and programming configuration reports are ready according to the prerequisite detail archive. This characterizes in general framework engineering. This plan stage fills in as contribution for the following period of the model. Figure 2 : Phases of SDLC.
- Coding: When the design stage is finished, the following stage is coding. In this stage, engineers start construct the whole framework by composing code utilizing the picked programming language. In the coding stage, undertakings are separated into units or modules and allotted to the different engineers. It is the longest period of the Product Advancement Life Cycle measure. In this stage, Designer needs to follow certain predefined coding rules. They likewise need to utilize programming devices like compiler, translators, debugger to create and execute the code. 5. Testing: When the product is finished, and it is conveyed in the testing climate. The testing group begins testing the usefulness of the whole framework. This is done to confirm that the whole application works as indicated by the client necessity. During this stage, QA and testing group may discover a few bugs/absconds which they convey to designers. The improvement group fixes the mess with and send back to QA for a re-test. This interaction proceeds until the product is sans bug, stable, and working as indicated by the business needs of that framework.
- Deployment: When the product testing stage is finished and no bugs or mistakes left in the framework then the last arrangement measure begins. In view of the criticism given by the venture chief, the last programming is delivered and checked for arrangement issues assuming any.
- Maintenance: When the framework is sent, and clients begin utilizing the created framework, following 3 exercises happen - Bug fixing - bugs are accounted for due to certain situations which are not tried by any stretch of the imagination - Update - Overhauling the application to the more up to date forms of the Product - Upgrade - Adding some new highlights into the current programming The principle focal point of this SDLC stage is to guarantee that requirements keep on being met and that the framework keeps on proceeding according to the detail referenced in the main stage.
II. V-SHAPE:
In this kind of SDLC model testing and the turn of events, the stage is arranged in equal. Along these lines, there are check periods of SDLC as an afterthought and the approval stage on the opposite side. V- Model joins by Coding stage. Before going to how does it work, there are two declaration we must define first:
- Validation: is the confirmation that an item, administration, or system addresses the issues of the client and other identified partners. It frequently includes acknowledgment and appropriateness with outside clients.
Advantages:
- Easy and simple to perform.
- Testing exercises are arranged prior to coding. This saves a ton of time and furthermore helps in fostering an awesome comprehension of the task at the starting state.
- Each stage has explicit expectations.
- Works for little tasks.
- Functions admirably for where necessities are without any problem. Disadvantages:
- The greatest weakness of V-model is that it's very unbending and the most un-adaptable.
- It isn't proposed for momentary activities as it requires reviews at each stage.
- If any progressions happen mid-way, not just the necessities reports yet in addition the test documentation should be refreshed. All in all, V-model is a model easily to use, necessities must be exceptionally clear before the venture begins, since it is normally costly to return and make changes. There are some of the most suitable scenarios to use the V-model:
- Requirements are distinct, obviously reported and fixed.
- Technology isn't dynamic and is surely known by the designer group.
- The project is short.
- There are no equivocal or unclear requirements.
- Item definition is stable. Example: Military projects, Space shuttle, etc.
III.SCRUM:
Scrum is a one the agile practices, it is a incremental methodology and iterative in nature used to deal with the complex work implies develop the complex software products with the much of the time changing business necessities (Hema and Thota, 2020). There are 3 roles in Scrum:
- Scrum master: keeps up scrum processes.
- Owner of the product: customer or stockholder.
- Scrum team: 7 people.
The entire product is partitioned into little augmentations which are shippable expectations that can be checked at each sprint's end. Scrum events:
- Sprint: controls the hauling instrument that limits inflow over-burden.
- Sprint planning: permits self-evaluation of each task that starts clarity and development with respects DoD (Definition of Done).
- Daily Scrum meeting: upgrades the coordination among team to show and communicate their thoughts
- Sprint review: Incorporates scrum team alongside different stockholders. Which takes the feedback from the scrum team and furthermore assessment has been taken here.
- Sprint retrospective: supplies an opportunity to examine at deterrents for the second and to get supplements for the coming sprint. Figure 4 : Scrum model
use: enter information, print out a list of students, and search for students by name; and there will be a program exit function. Provisional student information will include name and age.
1. DATA TYPES, DATA STRUCTURES NEEDED IN THE PROBLEM:
Data types, data structures Variables How it used in the program Int age, atmp, n, i, l Age, attempt, n, i, l are natural numbers we will enter String name, user, pass, search Name, user, password, search (name entered to search) is a string of characters, so we will be use string types Struct Student Contains a variable in which there are many elements with different data types values. In the program, student has the attributes name and age. Array Student[] Contains many variables with the same data type under the same name, here are many students include in the program. Function Input, Output, Search Contain codes, functions will be executed when calling the functions out. In my program, example, I use function input to executed codes to input student information. Figure 6 : Data types, data structures
2. CONDITIONAL STATEMENTS NEEDED IN THE PROBLEM:
If: Check if the command continues running or being blocked with condition. In my program I will use it to check condition if user and pass you enter is true, the code will run. If not, code won’t be executed. Figure 7 : If statement
Switch : used to select the function available in the program and function will run code in it. In my program has 4 function to choose, and if the number you enter is not match with the function, it will go back to the main menu.
3. LOOP STATEMENT NEEDED IN THE PROBLEM:
For: store, export, and checking value in array. Example, in my program will display “=” with n times. In my program, I will use it to store student information into array or display all student in the array. Do while: run the code then check the condition. If not match condition, the code will stop. In my program, I will use it to check the password and username, if atempt is more than 3, you won’t be able to enter username, password and exit program. Figure 8 : Switch statement Figure 9 : For statement Figure 10 : Do while statement
Figure 12 : Main flowchart
3. INPUT FUNCTION:
Figure 13 : Input flowchart
5. SEARCH FUNCTION:
Figure 15 : Output flowchart
D. IMPLEMENTATION (P1):
I. INTRODUCE HOW THE PROBLEM IS SOLVED:
The problem has been solved with the program with login function, student information input function, student list printing, student search function and program exit.
II. SOURCE CODE AND EXPLAIN:
1. MAIN:
I create struct Student with the attributes name, age. Attributes are in public so all part of program can use these attributes. Figure 16 : Struct