progamming assignment, Essays (university) of C programming

its an assignment , programming assignment

Typology: Essays (university)

2021/2022

Uploaded on 03/23/2023

zeyad-mo
zeyad-mo 🇦🇪

1 document

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
P4
Screenshots from Employee program
Sql connection
Login window
1
pf3
pf4
pf5

Partial preview of the text

Download progamming assignment and more Essays (university) C programming in PDF only on Docsity!

P

Screenshots from Employee program

Sql connection Login window

Employee info

P

Debugging

Debugging is the process of identifying and removing present and potential flaws (commonly referred to as "bugs") in software code that may cause it to behave strangely or crash. Debugging is used to find and correct errors or flaws in software or systems in order to avoid erroneous operation. When numerous subsystems or modules are tightly coupled, debugging becomes more challenging since each alteration in one module may cause more faults to develop in another. It is possible that debugging a software will take longer than developing it. To debug a program, the user must first discover a problem, then isolate and correct the source code of the problem. Because knowledge in problem analysis is expected, a software user must understand how to resolve the issue. When the problem is fixed, the software is ready for use. Debugging tools (sometimes known as debuggers) are used to discover code errors at different stages of development. They are used to reproduce the error conditions, after which the program state at the time is investigated to find the cause. Programmers can follow the execution of a program step by step by assessing variable values and interrupting the execution anytime variable values are needed or program variables are reset.

Features of debugging in Eclipse IDE using Java

Eclipse is a popular Java Integrated Development Environment (IDE) that includes a built-in debugger with a wide range of features for debugging Java programs. Some of the key features of the Eclipse debugger include:  Breakpoints: Allows you to pause the execution of your program at a specific line of code.  Step-by-step execution: Allows you to execute your program one line at a time, allowing you to see exactly what is happening as the code is being executed.  Watches: Allows you to monitor the value of specific variables as your program is executing.  Call stack: Shows the sequence of method calls that have led to the current point in the program execution.  Debugger console: Provides a command-line interface for entering debugging commands and evaluating expressions.  Display view: Allows you to see the current values of variables and expressions in a graphical view.  Memory view: Shows the current state of the Java heap and allows you to inspect the contents of objects.  Hot code replace: Allows you to make changes to your code while the program is paused and instantly see the effect of those changes.

Coding standards

A coding standard is a set of guidelines for writing and formatting code in a specific programming language. Coding standards are designed to improve the readability and maintainability of code, and to make it easier for multiple developers to work on the same codebase. Coding standards typically cover a wide range of issues, including naming conventions, indentation, commenting, and the use of whitespace. They may also include guidelines for organizing code into logical blocks, and for breaking up large blocks of code into smaller, more manageable chunks. Adhering to a coding standard can help to ensure that code is consistent and easy to understand, which is especially important in large software projects where multiple developers may be working on the same codebase. Many organizations and programming communities have their own coding standards, and it is important for developers to be familiar with the standards that apply to their work. The following are some of the java code standards:

  1. Variable Scopes, Readability, and Lambda Expression A scope is assigned to every variable specified in Java. This means that the visibility and use of the variables must be restricted inside the scope. A local variable is visible from the time it is declared until the method or code block in which it is defined ends. Declaring a variable near its probable application is a good idea. This not only increases code readability, but also makes debugging easier.
  2. Class Fields In Java, methods either belong to a class or an interface. As a result, the programmer may have unintentionally called local variables the same as class member variables. The Java compiler, on the other hand, may choose the best one from the scope. Furthermore, modern IDEs are clever enough to recognize the issue. In any case, programmers must be responsible enough to prevent such conflicts, as the ramifications might be serious. The code below shows how conflicting variable names may provide significantly different outcomes.
  3. Interfaces Because interfaces are not connected to any method implementation (excluding default methods), we must utilize them appropriately when concrete classes are not required. Interfaces are similar to contracts in that they provide for a great deal of freedom and flexibility in how they are laid out. Concrete classes might use the flexibility to enhance and refresh their business agenda. This is especially true and frequently observed when an external system or service is used in the implementation.