Labs Solution
Labs Solution
Objective:
The objective of this lab is to teach students how to install and use the Dev-
C++ and online compilers.
Learning Outcomes:
After this lab, the students will be able to run the C++ code in Dev-C++ and
the online compilers.
Problem Statement
You are required to install any version of Dev-C++ in your system according
to your system and operating system requirements.
Dev C++ 4.9.9.2 Installation Guide
Installation Steps:
Step 1:
Step 2:
Step 3:
Step 5:
Step 7:
Your Dev C++ 4.9.9.2 has been installed successfully. Now start writing
compiling and running programs and enjoy programming.
Dev C++ 5.9 Installation Guide
Installation Steps:
Step 1:
Step 2:
Step 3:
Click on the “OK” button.
Step 4:
Step 6:
Step 8:
Following are the steps to write, save, compile, and run a program, using
Dev-C++:
1st Step:
2nd Step:
How to compile the program:
1st Step:
2nd and 3rd step will be performed automatically
2nd Step:
3rd Step:
How to run the program:
Output will be displayed as:
Guidelines on how to use online C++ compiler
Following are the steps to write, compile, and run a program using an online
compiler:
Open a browser and type the following address in the address bar.
https://www.programiz.com/cpp-programming/online-compiler/
Now, write the C++ code in the highlighted area.
Write your C++ code in the highlighted area.
After removing the syntax errors, click on the ‘Run’ button again to see the
output.
Lab 1-2: Object Orientation
Objective:
The objective of this lab is to teach students how to identify objects, their attributes and
behaviors from the real-world scenario.
Learning Outcomes:
After this lab, the students will be able to identify objects, attributes and behaviors from a given
scenario.
Problem Statement
Consider the following scenario and identify all objects, their attributes, and behaviors.
In the Virtual University bookshop, the handouts of all courses are provided at reasonable
prices. The handouts are made in accordance with the video lectures recorded by famous
professors. It is a step to facilitate students to easily digest the course contents.
You are required to extract the Class Name, attributes and behaviours (operations) from the
above scenario.
Solution:
Objective:
The objective of this lab is to teach students how to identify classes and relationships between
classes and draw a UML class diagram by applying the concepts of inheritance, aggregation or
composition.
Learning Outcomes:
After this lab, the students will be able to draw a UML class diagram for a given scenario.
Problem Statement
You are required to apply the concepts of inheritance, aggregation or composition to the given
scenario and draw a UML class diagram.
Solution: