Download Programming Assignment 2 Btec and more Assignments C programming in PDF only on Docsity!
ASSIGNMENT 2
PROGRAMMING REPORT
Student performance: TRAN QUANG HUY
ID: GCD
Class: GCD
Teacher: HOANG HUU DUC
ASSIGNMENT 2 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 TRAN QUANG HUY Student ID GCD 18457 Class GCD0821 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 HUY Grading grid P2 P3 P4 P5 M2 M3 M4 D2 D3 D
Contents
- Part 1: Development Document
- I. Introduction
- II. Scope
- III. Overview
- IV. User Manual
- Part 2: IDE evaluation
- I. Introduction
- II. Implement basic algorithm in code using an IDE.............................................................
- III. Using IDE and without using IDE
- Part 3: Debugging Evaluation................................................................... - I. What is Debugging - II. Process - III. Facilities available in the IDE............................................................................................ - IV. Conclusion
- Part 4: Coding Standard
- I. Definition
- II. Some common aspects of coding standard:
- III. Coding standard is necessary in a team as well as for the individual:........................
- References
- Figure 1 - Scope of program (c4learn, n.d.) TABLE OF FIGURES
- Figure 2 - Flowchart of program
- Table 1 - List of keywords in C#. (howkteam, n.d.) TABLE OF TABLES
- Picture 1 - The interface of Patient managerment TABLE OF PICTURES
- Picture 2 - Add information into box in program
- Picture 3 - Select picture from computer
- Picture 4 - Get notice when press Add
- Picture 5 - Patient's information in program
- Picture 6 - Button First patient, last patient, next and previous
- Picture 7 - Edit patient's information
- Picture 8 - Edit patient's information
- Picture 9 - Update patient's information
- Picture 10 - Search patient's information
- Picture 11 - Get notice about Search function
- Picture 12 - Menu strips
- Picture 13 - Visual studio interface
- Picture 14 - Run program in visual studio
- Picture 15 - Using visual studio to code.........................................................................................................
- Picture 16 - Set a breakpoint in studio
- Picture 17 - Step Over in Visual Studio
- Picture 18 - Result of Step Over in Visual Studio
- Picture 19 - Step into in Visual Studio
- Picture 20 - Run to cursor in Visual Studio
- Picture 21 - Inspect variables
- Picture 22- The Autos
- Picture 23 - The Watch
- Picture 24 - Example of coding standard
- Picture 25 - Put space after commas
- Picture 26 - Comment in IDE
- Picture 27 - Make lines at the same level
III. Overview: Patient Management software is an application which is used to store some basic information of a patient: First name, last name, picture, address, telephone, sex, date of birth and patient record. An example: TRAN QUANG HUY, 145a Phan van truong, 012345678 9, Male, 16/12/1995. And this program also provides some functions such as: add the new patient, update patient information or delete a patient record, searching patient information. Figure 2 - Flowchart of program Firstly, user need to input patient information. After that, the program will check the information input is correct or not. If the input is wrong, user need to input patient again. If everything input is right, the program will add the information into database.
Picture 1 - The interface of Patient management
1. Button Add
- When user click Add, all information that user fill in form that recorded by application.
- If user want to add patient picture, user can click on the box image to Open picture into application, then choose the picture and click Open
- The inform show up to tell user if that Information input was done.
- Click “OK” to continue.
- After that, the form will renew with Patient Record increase 1.
- When the application receives the information about Patient the button “First Patient (|<<)” and “Last Patient (>>|)” show up. Picture 3 - Select picture from computer
Picture 4 - Get notice when press Add
3. Edit information that user fill in.
- When user click in any Patient Information that will make “Box Fill in information” and “button Add” disable.
- Double click in information to edit. Picture 8 - Edit patient's information Picture 7 - Edit patient's information
4. Update Patient information.
- After finish edit information then click “button Update” to tell application know that you have done, and the application will record new Patient information
- If user want to comeback add more patient information: press key: “Esc” on keyboard. Picture 9 - Update patient's information
I. Introduction Part 2: IDE evaluation IDE as known as Integrated Development Environment which is a software application provides a toolbox that include all the facilities required to computer programmers for software development. I find IDE make it easier for a programmer to build an application using its comprehension facilities. (wikipedia, n.d.) An IDE usually contains source editor, debugger, build automation. Most of modern IDE has intelligent code completion. This feature help speeds-up the process of coding by minimizing typos and other common mistakes, the process of development will be accelerated in result. This is how Source editor and Debugger looks like in Microsoft Visual Studio 2017 Picture 13 - Visual studio interface
Picture 14 - Run program in visual studio II. Implement basic algorithm in code using an IDE: For example, this is a program finds the largest number in a set of number which in C# program language using Visual Studio 2017 *** Algorithm:**
- Check if there are no number in the set so there is no largest number.
- Assume the first number in the set numbers is the largest.
- Compare the current largest number for next number in the set. If this number is larger than current highest number, then set this number to be the largest number.
- Keep doing step three until there is no number in the set, we can consider that current largest number is the largest number in the set.(lynda, n.d.)
III. Using IDE and without using IDE:
- Using IDE: Picture 15 - Using visual studio to code This is how Microsoft Visual Studio 2017 looks like With IDE, it provides for programmer some features and tools to develop a software. It helps to increasing their productivity, reducing time to debug and finding solution for problem. In details, IDEs good for:
- Quickly navigating to type without needing to worry about namespace, class, project, etc.
- Auto complete when you cannot remember the names of a function or methods (With key: Tab)
- Automatic code generation
- Refactoring
- Organize imports (automatically adding appropriate imports in Java, using directives in C#)
- Warning-as-you-type (Example: some errors don't even require a compile cycle)
- Hovering over something to see the tip
- Keeping a view of files, errors/warnings/console/unit tests and source code all on the screen at the same time in a useful way
- Ease of running unit tests from the same window
- Integrated debugging
- Integrated source control
But there are also some negative points when using IDE (in my opinion):
- We will be dependence on them
- IDEs are complicated tools. To maximize their benefits will require time and patience
- Will not fix bad code, practices, or design: IDE are like paintbrushes, it will help you to fix the code design automatically, so you are very dependent on it. In short, you need to create a masterpiece by your skill and decisions
- Without using IDE (Text Editor): Advantages:
- No more distractions
- After saving your code in the text editor and run it from command prompt. It will give you a true sense of programming and execution flow
- Without auto-completion feature, you will be learned and taught yourself what to write on next line of the code
- When you run the program, it may get the code syntax or logical error. Analyzing and fixing these bugs will improve you debugging skill Disadvantage:
- Not for beginners, if you want to write a website, it requires basic knowledge of HTML tags for a user.
- It may take more time to add style and specific formal