Programming Models and Debugging Techniques in Visual Studio, Assignments of Programming Paradigms

An overview of various programming models, including procedural programming, event-driven programming, and object-oriented programming, along with examples of each. It also delves into the debugging process in visual studio, covering topics such as the use of debuggers, breakpoints, and the various windows available for inspecting variables and stepping through code. The document emphasizes the importance of code readability, naming conventions, and security considerations when debugging. It serves as a comprehensive guide for developers and students interested in understanding the fundamentals of programming models and the debugging capabilities offered by visual studio.

Typology: Assignments

2021/2022

Uploaded on 09/25/2022

07-nguyen-ngoc-huyen
07-nguyen-ngoc-huyen 🇻🇳

2 documents

1 / 44

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 1 FRONT SHEET
Qualification BTEC Level 5 HND Diploma in Computing
Unit number and title Unit 1: Programming
Submission date 15 August, 2022 Date Received 1st submission 15 August, 2022
Re-submission Date Date Received 2nd submission
Student Name Nguyen Dinh Bin Student ID Bs00234
Class PBIT17104 Assessor name MS. Trâm
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 Bin
Grading grid
P2 P3 P4 P5 M2 M3 M4 D2 D3 D4
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c

Partial preview of the text

Download Programming Models and Debugging Techniques in Visual Studio and more Assignments Programming Paradigms 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 15 August, 2022 Date Received 1st submission 15 August, 2022 Re-submission Date Date Received 2nd submission Student Name Nguyen Dinh Bin Student ID Bs Class PBIT17104 Assessor name MS. Trâm 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 Bin Grading grid P2 P3 P4 P5 M2 M3 M4 D2 D3 D

❒ Summative Feedback: ❒ Resubmission Feedback: Grade: Assessor Signature: Date:

  • characteristics and the relationship between them. (P2) I. Give explanations of what procedural, object-oriented and event-driven paradigms are; their
      1. The definition of programming models
      • 1.1. Procedural programming and give examples
        • 1.1.1. Define:
        • 1.1.2. Examples:
      • 1.2. Event-driven programming and give examples
        • 1.2.1. Define:
        • 1.2.2. Example:
      • 1.3. Object-oriented programming and give examples
        • 1.3.1. Define:
        • 1.3.2. Example:
      1. Characteristics of the programming models
      • 2.1. State the characteristics and advantages, disadvantages of the 3 models.
        • 2.1.1. Procedural programming.
          • 2.1.1.1. Characteristics:
          • 2.1.1.2. Advantages:
          • 2.1.1.3. Disadvantages:
        • 2.1.2. Object-oriented programming.
          • 2.1.2.1. Characteristics:
          • 2.1.2.2. Advantages and Disadvantages of Object-oriented programming:
        • 2.1.3. Event-driven programming.
          • 2.1.3.1. Characteristics:
          • 2.1.3.2. Advantages:
          • 2.1.3.3. Disadvantages:
      1. Relationship between Procedural, Object-oriented, Event-driven.
  • II. Analyse the common features that a developer has access to in an IDE. (M2)
      1. Introduction to IDE
      1. Analysis of popular IDE features.
      • 2.1. Text editor:
      • 2.2. Debugger:
      • 2.3. Compiler:
      • 2.4. Code completion:
      • 2.5. Programming language support:
  • development process of the program. (P3) & (M3) III. Write a program that implements an algorithm using an IDE. Use the IDE to manage the
      1. A broad overview of the curriculum.
      1. The program's function keys, their coding, and use.
      • 2.1. Softkey create.
        • 2.1.1. A program's user guide.
        • 2.1.2. Program source code.
      • 2.2. Softkey Update.
        • 2.2.1. A program's user guide.
        • 2.2.2. Program source code.
      • 2.3. Softkey Delete.
        • 2.3.1. A program's user guide.
        • 2.3.2. Program source code.
      • 2.4. Softkey reset.
        • 2.4.1. A program's user guide.
  • IV. Explain the debugging process and explain the debugging facilities available in the IDE. (P4)
      1. Denfinition:
      1. Description:
      1. Debugging steps and continue execution:
      • 3.1. Debugging.
      • 3.2. Breakpoints.
      • 3.3. Variable inspection.
        • 3.3.1. Window Locals:
        • 3.3.2. Window Autos:
        • 3.3.3. Window Watch:
        • 3.3.4. Step over.
        • 3.3.5. Simply Inspect Variables.
        • 3.3.6. Step into.
        • 3.3.7. Step out:
      1. Debug tips.
      • 4.1. Try to find a consistent step to reproduce the bug.
      • 4.2. Unit test to reproduce a bug.
      • 4.3. Rubber Duck Strategy.
      • 4.4. Add logs.
      • 4.5. Debugger.
      • 4.6. Refer Documentation.
  • applications. (M4) V. Evaluate how the debugging process can be used to help develop more secure, robust
      1. Debugger Security.
      1. Optimum security procedures.
      1. Managed security debugging.
      1. Remote debugging security.
      1. Web services debugging security.
      1. Symbols and Source code.
  • VI. Outline the coding standard you have used in your code. (P5)
      1. Restricted usage of global variables:
      1. Typical headers for various modules:
      1. Naming conventions for constants, functions, global variables, and local variables:
      1. Indentation:
      1. Error return values and exception handling conventions:
      1. Steer clear of code that is too difficult to decipher:
      1. Well-documented code should be used:
  • VII. References..............................................................................................................................................
  • Image 1: Procedural programming.................................................................................................................
  • Image 2: Event-driven programming 1...........................................................................................................
  • Image 3: Event-driven programming 2...........................................................................................................
  • Image 4: Event-driven programming 3.........................................................................................................
  • Image 5: Event-driven programming 4.........................................................................................................
  • Image 6: Event-driven programming 5.........................................................................................................
  • Image 7: Object-oriented programming.......................................................................................................
  • Image 8: Object-oriented programming.......................................................................................................
  • Image 9: IDE..................................................................................................................................................
  • Image 10: Program Interface........................................................................................................................
  • Image 11: Softkey Create..............................................................................................................................
  • Image 12: Step 1...........................................................................................................................................
  • Image 13: Step 2...........................................................................................................................................
  • Image 14: Step 3...........................................................................................................................................
  • Image 15: Program source code...................................................................................................................
  • Image 16: Softkey Update.............................................................................................................................
  • Image 17: Step 1...........................................................................................................................................
  • Image 18: Step 2...........................................................................................................................................
  • Image 19: Step 3...........................................................................................................................................
  • Image 20: Program source code...................................................................................................................
  • Image 21: Softkey Delete..............................................................................................................................
  • Image 22: Step 1...........................................................................................................................................
  • Image 23: Step 2...........................................................................................................................................
  • Image 24: Step 3...........................................................................................................................................
  • Image 25: Program source code...................................................................................................................
  • Image 26: Softkey reset................................................................................................................................
  • Image 27: Step 1...........................................................................................................................................
  • Image 28: Step 2...........................................................................................................................................
  • Image 29: Program source code...................................................................................................................
  • Image 30: Steps to debug.............................................................................................................................
  • Image 31: begin to debug.............................................................................................................................
  • Image 32: Make a breakpoint.......................................................................................................................
  • Image 33: Example about windows locals....................................................................................................
  • Image 34: Example about Auto window.......................................................................................................
  • Image 35: Example about watch window.....................................................................................................
  • Image 36: Example about Step over.............................................................................................................
  • Image 37: Example about Simply Inspect Variables.....................................................................................
  • Image 38: Example about step into..............................................................................................................
  • Image 39: Example about Remote debugging security................................................................................
  • Image 40: Class Naming................................................................................................................................
  • Image 41: Identifier Naming.........................................................................................................................
  • Image 42: Wrong Variable Naming...............................................................................................................
  • Image 43: Correct Variable Naming..............................................................................................................
  • Image 44: Single-line comment....................................................................................................................
  • Image 45: Multi-line comment.....................................................................................................................

I. Give explanations of what procedural, object-oriented and event-driven paradigms are; their characteristics and the relationship between them. (P2)

  1. The definition of programming models

1.3. Object-oriented programming and give examples

1.3.1. Define:
  • The main focus of procedural programming is the orderly fulfillment of tasks. An extensive program (function) is divided into smaller, easier-to-handle sections using the procedural approach (procedures). Procedures or subroutines handle calculations. Using procedural programming, you may write a set of instructions that tell the computer what to do at each step of the process. 1.1.2. Examples:

keystrokes, sensor output, or message transmission from other threads or applications. Programming device drivers follow the same principles.

1.2.2. Example:

Image 2 : Event-driven programming 1

Image 3 : Event-driven programming 2 1.3. Object-oriented programming and give examples 1.3.1. Define:

  • Object-oriented programming (OOP), a style of writing programs that are built on the concepts of classes and objects, allows programmers to create abstract versions of objects in their code. It also makes recommendations for practices and traits that could be inherited. It's a technique for keeping track of data and the actions needed to process it, based on a subfield of mathematics called "abstract data types." In computer school, the most popular programming paradigm, OOP, is taught as the standard for the majority of professions
1.3.2. Example:

Image 5 : Object-oriented programming

2. Characteristics of the programming models

2.1. State the characteristics and advantages, disadvantages of the 3 models.

2.1.1. Procedural programming.
2.1.1.1. Characteristics:
  • Concentrate on the algorithm that will be used.
  • Smaller segments of a lengthy program are sent in any combination and at any time.
  • Multiple functions utilize the same data.
  • The system changes all of the data in it.
  • Design using a top-down method.
  • Repetition of functions, lack of inheritance, and reuse
2.1.3.2. Advantages:
  • Because there is no function or object calling step, applications can be written more rapidly.
  • The program that is simple and easy to comprehend.
2.1.3.3. Disadvantages:
  • When developing complex projects, the command line is excessively lengthy, making it difficult to organize and maintain the code.
  • The code is repeatedly used; if a change is required, each piece of code is changed. 2.1.2. Object-oriented programming.
2.1.3.1. Characteristics:
  • Encapsulation: Encapsulation enables an object's core processing characteristics and information to be hidden. Other objects cannot directly influence state changes; instead, they can only be impacted via an object's public methods. This characteristic aids in enhancing object security and preventing unintended data corruption.
  • Inheritance: Inheritance enables the creation of a new class (Child class), allowing it to inherit and reuse methods and properties from an earlier class (Parent class). It helps prevent unnecessary writing code that does the same thing repeatedly.
  • Polymorphism: In OOP programming, polymorphism enables several objects to carry out the same function in various ways.
  • Difficult to find Errors are difficult to locate and correct in big applications.
  • Slower: Programs with complicated graphical user interfaces may load and execute more slowly than other software modules, particularly if RAM is limited.

3. Relationship between Procedural, Object-oriented, Event-driven.

  • Variables are used in procedural programming to store the application's state and processes are used to update that state. A programming technique is a predetermined pattern that follows a top-down or linear methodology. Calculations are handled via procedures or subroutines. Following the order of statements outlined in the formatting instructions takes more code to be written, but since the statements are more memory-efficient, they may also be performed more quickly. Additionally, it makes testing it challenging since a procedure's behavior might change based on the value of a variable.
  • We may restrict access or prohibit editing to address the procedural programming issue.
  • Event-driven programming's role is to stop modifying.
  • You choose a model based on the situation at hand in order to tackle it as efficiently as possible. II. Analyse the common features that a developer has access to in an IDE. (M2)

1. Introduction to IDE

  • A feature-rich tool called an integrated development environment (IDE) supports many different facets of software development. Microsoft Visual Studio and VS are other names for Visual Studio. It is a tool for creating websites, online applications, computer programs, and web services. Compilers, completion tools, and other features are included to make the software development process easier.

Image 6 : IDE

2. Analysis of popular IDE features.

2.1. Text editor:

  • Any word processing application that allows you to input and modify text is a text editor. It's not called a text editor for nothing, after all. Popular text editors include WordPad and NotePad for Windows, as well as SimpleText and TextEdit for Mac. Although they offer additional functions, larger systems like Microsoft Word and Word Perfect are still text editors. As long as you are familiar with the appropriate HTML syntax, you can actually write HTML and generate HTML pages using a basic text editor.

2.2. Debugger:

  • Users may find and correct ASCII computer file issues with the help of debugging tools. Programmers often use them to test their code and find any issues before exposing it to the public. They may assist programmers in checking all potential scenarios while the client is using the application, allowing program performance to be assessed.

2.3. Compiler:

  • A software known as a compiler transforms source code written in high-level languages into computer language. It is well-known for many reasons than only the fact that the processor chip is made using the greatest semiconductor technology and an effective IDE. Additionally, the compiler

Image 7 : Program Interface

2. The program's function keys, their coding, and use.

2.1. Softkey create.

  • The information display table below is presented when the create function key, which is used to gather client information, is entered. Image 8 : Softkey Create
2.1.1. A program's user guide.
  • Step 1: All information must be entered into the text fields. Image 9 : Step 1
  • Step 2: In order for the program to accept the data that has been input and printed in the information panel, you must pick the create function key. Image 10 : Step 2