Select a specific web application or website related to programming or designing.
Then,
answer the following items:
1. Provide the name of the web application/website. (2 points)
2. Provide the link to the web application/website. (2 points)
3. Briefly describe the web application/website. (5 points)
4. What type of user interface (UI) does the web application/website encompasses?
Justify your answer. (Essay: 10 points)
5. Take a screenshot of at least two (2) different event-driven program execution
that you have noticed in the web application/website. (3 points x 2 items)
6. Based on your answers on item number 5, rationalize how each screenshot
encompasses event-driven program execution. (Essay: 10 points x 2 items)
Web Application/Website: Online GDB
- Online GDB is a web-based platform that lets users write, compile, and debug code
directly in their browser. It supports languages like C, C++, Python, Java, and more. This
makes it really convenient for people who want to quickly test their code or for those who
don’t want to bother with setting up a programming environment on their computer. It's
especially helpful for students, learners, or anyone who needs a quick, easy-to-use tool
for coding and debugging.
- The platform is simple to use and combines a code editor with a compiler and debugger,
all in one place. You can write your code, run it to check for errors, and debug it if
needed all through your browser. There’s no need to install anything on your computer,
which makes it a great tool for anyone looking for a quick solution.
User Interface (UI) of Online GDB
- Online GDB has a straightforward, easy-to-navigate interface that’s designed to help you
code and debug with minimal hassle. Here are the key parts of the UI:
1. Code Editor: The main part of the screen is where you write your code. It looks like a
simple text editor but with added features like syntax highlighting, which colors different
parts of your code (like keywords and variables) to make it easier to read and
understand.
2. Console/Terminal: Below the code editor, there’s a console where the output of your
program is displayed after running it. If there are any errors or warnings, you’ll see them
here, which helps you troubleshoot problems.
3. Execution and Debugging Controls: On the side of the screen, you’ll find buttons to
compile, run, or debug your program. These buttons let you control the program’s flow,
whether you're just running it to see the results or using the debugger to find issues.
4. Interactive Debugging: The platform allows you to set breakpoints and step through the
code line by line. This helps you pause and examine what’s happening in your program,
making it easier to figure out what might be going wrong.
Why the UI is Good for Event-Driven Programming
- The UI is built to let you interact with your code in real time. When you click a button to
run or debug the program, that action (called an event) triggers something to happen.
So, the interface is interactive and responds to your actions, making it a perfect example
of event-driven design. Whenever you interact with it, the system reacts, either by
running your code or showing you the result of debugging.
Event-Driven Program Execution in Online GDB
- Event-driven programming is all about making the program respond to certain actions or
events. In the case of Online GDB, the actions are things like clicking buttons or setting
breakpoints, and the program responds by running code, pausing it, or providing
feedback.
Why This Is Event-Driven:
- The program only runs when you click the button, it doesn’t do anything unless you
trigger the event. So, when you click "Run," it’s like telling the system, “Please go ahead
and execute this code.” This event starts the entire process of compiling and running the
program, which shows how event-driven programming works.
Why This Is Event-Driven:
- This is a simple event-driven program that waits for the user’s input to decide what
happens next. When the user types "start," the program asks for a starting and ending
number and then calculates the sum of the even numbers in that range. If the user types
anything else, it shows an error message. The program keeps running until the user
types "exit" to quit.
- You can copy and paste this code into a Java environment like GDB Online Debugger.
Once the program is running, it waits for the user to type either "start" to calculate the
sum or "exit" to end the program. The flow of the program changes based on what the
user types, making it event-driven.
Conclusion
- Online GDB offers an interactive interface that reacts to your actions in real-time.
Whether you're running or debugging code, things like clicking buttons or setting
breakpoints immediately trigger a response from the system. This is a good example of
event-driven programming in action. Each step you take results in an instant reaction
from the platform, making the whole coding and debugging experience smooth and easy
to follow.