BASIC COMPUTER ENG
BASIC COMPUTER ENG
1
Certificate
2
List of Practical
S.
Experiment
No.
A campus is arriving in the college and they need resumes of students to do the short listing.
Prepare your resume to appear in campus. Resume should be in MS Word in proper format
1 as given by class teacher.
Assume you are a trainer of Computer Fundamentals. To make students understand what is
2
“Computer System organisation” prepare a presentation.
Create a system for departmental store to perform various arithmetic operations on sailing and
3
purchasing prices of goods.
Store monthly rainfall amounts in an array. Then display the monthly rainfall amounts, the total
annual rainfall amount, the average rainfall amount, the highest rainfall amount, or the lowest
4 rainfall amount First get the rainfall amounts for the 12 months.
Create a checker to check whether a number is a prime number or not using the function.
5
For the students of school create a table generator, so that they will be able to learn table of
6 any no. given by them.
Asks the user several questions and selects a car for them. The questions are 1) do you have
children; 2) do you have lots of money; 3) do you like trucks.
Porsche: have no children, have lots of money, don’t like trucks Yukon: have no children, have
7 lots of money, like trucks Civic: have no children, have little money Villager: have children, have
lots of money, don’t like trucks Explorer: have children, have lots of money, like trucks Sentra:
have children, have little money
3
Create a tool to calculate the circle's area and circumference. create a class called Circle that
has private member variables for radius. Include member functions to calculate the circle's
8 area and circumference.
Create a tool that can give sum of given numbers (2,3 or 4). with function overloading.
9
Implement a class called Shape with member functions for calculating area and perimeter.
Derive classes such as Circle, Rectangle, and Triangle from the Shape class and overload
11 functions accordingly.
Implement a stack using an array with push and pop operations. Find the top element of the
stack and check if the stack is empty or not.
12
For the doctor's clinic create a waiting list of patients as per their arrival (FCFS) and find out
13 total no. of persons in waiting queue.
How can you navigate, open, and manipulate files on your computer without using GUI.
15
How to :1) List all the processes running. 2) Change the file permissions of the directories. 3)
check disk space usage. 4) List all the partitions on your system.
16
4
Index
5
Create a tool to calculate the circle's area and
circumference. create a class called Circle that
8 has private member variables for radius. Include
member functions to calculate the circle's area
and circumference.
6
EXPERIMENT – 1
EXPERIMENT TITLE: A campus is arriving in the college and they need resumes of students to do
the short listing. Prepare your resume to appear in campus. Resume should be in MS Word in proper
format as given by class teacher.
Durgesh Jhala
586, Jyoti Colony, Kshipra, Indore (MP)
Contact: 9981787937 | Email: [email protected]
Career Objective
Dedicated and detail-oriented first-year Civil Engineering student at Acropolis Institute of
Technology, eager to leverage my academic background and skills in office management and
computer applications. Aspiring to contribute effectively to the growth of a dynamic organization
while enhancing my professional abilities.
Educational Qualifications
Bachelor of Technology (Civil Engineering)
Acropolis Institute of Technology, Indore
(MP) 1st Year, 1st Semester
Higher Secondary School Certificate (HSC)
Kshipranjali Public H.S. School, Kshipra (MP Board)
Stream: PCM
Certifications
Office Management Program
Comprehensive training in administrative and organizational tasks.
Technical Skills
Proficient in basic computer operations.
Hands-on experience with:
7
MS Word
MS PowerPoint
MS Excel
Hobbies
Sketching
Painting
Crafting
Work Experience
Fresher
Strengths
Strong organizational and multitasking abilities.
Creative problem-solving skills.
Willingness to learn and adapt to new environments.
Declaration
I hereby declare that all the information provided above is true to the best of my knowledge and
belief.
SIGNATURE
8
EXPERIMENT – 2
EXPERIMENT TITLE: Assume you are a trainer of Computer Fundamentals. To make students
understand what is “Computer System organisation” prepare a presentation.
9
1
0
11
12
13
EXPERIMENT – 3
EXPERIMENT TITLE : Create a system for departmental store to perform various arithmetic operations on
sailing and purchasing prices of goods.
CODE:
#include <iostream>
#include <vector>
#include <string>
using namespace std;
}
};
public:
{ if (products.empty()) {
14
cout << "\nProduct Details:\n"; cout << "Name\tPurchase Price\tSelling Price\tQuantity\tProfit/Loss\n";
for (const auto& product : products) {
}
}
total += product.calculateProfitOrLoss();
}
};
do {
cout << "\nDepartmental Store System\n"; cout << "1. Add Product\n";
cout << "2. Display Products\n"; cout << "3. Calculate Total Profit/Loss\n";
cout << "4. Exit\n"; cout << "Enter your choice: "; cin >> choice;
store.addProduct(); break;
case 2:
store.displayProducts(); break;
case 3:
store.calculateTotalProfitOrLoss(); break;
default:
15
} while (choice != 4);
return 0;
MENU:
1. Add Product
2. Display Products
3. Calculate Total Profit/Loss
4. Exit
SAMPLE RUN:
Product Details:
16
EXPERIMENT – 4
EXPERIMENT TITLE: Store monthly rainfall amounts in an array. Then display the monthly rainfall
amounts, the total annual rainfall amount, the average rainfall amount, the highest rainfall amount, or the lowest
rainfall amount First get the rainfall amounts for the 12 months.
Code:
#include <iostream>
#include <string>
#include <limits>
using namespace std;
int main() {
// Input rainfall data cout << "Enter rainfall amounts for each month
(in mm):\n"; for (int i = 0; i < MONTHS; i++) {
// Validate input while (rainfall[i] < 0) { cout << "Rainfall cannot be negative. Enter again for " <<
monthNames[i] << ": "; cin >> rainfall[i];
} totalRainfall += rainfall[i];
} else {
17
}
}
}
cout << monthNames[i] << ": " << rainfall[i] << " mm\n";
cout << "\nTotal Annual Rainfall: " << totalRainfall << " mm"; cout << "\nAverage Monthly Rainfall: " <<
averageRainfall << " mm"; cout << "\nHighest Rainfall: " << highestRainfall << " mm in " <<
monthNames[highestMonth]; cout << "\nLowest Rainfall: " << lowestRainfall << " mm in " <<
monthNames[lowestMonth] <<
"\n";
return 0;
Input:
January: 100
February: 80
March: 120
April: 150
May: 110
June: 90
July: 200
August: 190
September: 170
October: 140
November: 130
December: 120
18
Output:
Monthly Rainfall Data:
January: 100 mm
February: 80 mm
March: 120 mm
April: 150 mm
May: 110 mm
June: 90 mm
July: 200 mm
August: 190 mm
September: 170 mm
October: 140 mm
November: 130 mm
December: 120 mm
19
EXPERIMENT – 5
EXPERIMENT TITLE: Create a checker to check whether a number is
prime number or not using the function.
Code:
#include <iostream>
using namespace std;
if (number <= 1) {
for (int i = 2; i * i <= number; i++) { // Check divisors up to the square root of the number
if (number % i == 0) {
}
}
int main() {
int num; cout << "Enter a number to check if it's a prime number: "; cin >>
num;
}
return 0;
}
Input: Output:
Enter a number to check if it's a prime number: 29 29 is a prime number.
Enter a number to check if it's a prime number: 10 10 is not a prime number.
2
0
EXPERIMENT – 6
EXPERIMENT TITLE: For the students of school create a table generator, so that they will be able to learn
table of any no. given by them.
Code:
#include <iostream>
using namespace std;
int main() {
int number, range;
cout << "Enter the range up to which you want the table: ";
cin >> range;
return 0;
}
Output:
Enter the number for which you want to generate the multiplication table: 5
Enter the range up to which you want the table: 10
Multiplication Table for
5: 5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25
5 x 6 = 30
5 x 7 = 35
5 x 8 = 40
5 x 9 = 45
5 x 10 = 50
21
EXPERIMENT – 7
EXPERIMENT TITLE: Asks the user several questions and selects a car for them. The questions are 1) do
you have children; 2) do you have lots of money; 3) do you like trucks.
Porsche: have no children, have lots of money, don’t like trucks Yukon: have no children, have lots of money,
like trucks Civic: have no children, have little money Villager: have children, have lots of money, don’t like
trucks Explorer: have children, have lots of money, like trucks Sentra: have children, have little money
Code:
#include <iostream>
#include <string>
using namespace std;
int main() {
22
} else if (haveChildren == 'n' && haveMoney == 'n')
} else {
cout << "Sorry, we couldn't match a car for you." << endl;
return 0;
Output:
Case 1:
Do you have children? (y/n): n
Case 2:
Do you have children? (y/n): y
23
EXPERIMENT – 8
EXPERIMENT TITLE: Create a tool to calculate the circle's area and circumference. create a class called
Circle that has private member variables for radius. Include member functions to calculate the circle's area and
circumference.
Code:
#include <iostream>
#include <cmath>
using namespace std;
class Circle {
private:
double radius;
public:
Circle(double r) {
if (r >= 0)
{ radius =
r;
} else {
cout << "Radius cannot be negative. Setting radius to 0." << endl;
radius = 0;
void setRadius(double r) {
if (r >= 0)
{ radius =
r;
} else {
cout << "Radius cannot be negative. Please enter a valid radius." << endl;
24
}
25
}
return radius;
};
int main()
{ double
radius;
Circle circle(radius);
26
cout << "Circle's Area: " << circle.calculateArea() << endl;
27
cout << "Circle's Circumference: " << circle.calculateCircumference() << endl;
return 0;
Output:
Case 1:
Enter the radius of the circle: 5
Case 2:
Enter the radius of the circle: -3
Circle's Area: 0
Circle's Circumference: 0
28
EXPERIMENT – 9
EXPERIMENT TITLE: Create a tool that can give sum of given numbers (2,3 or 4). with function
overloading.
Code:
#include <iostream>
class SumCalculator {
public:
return a + b;
return a + b + c;
return a + b + c + d;
};
int main() {
SumCalculator calculator;
int choice;
cout << "Enter the number of values you want to sum (2, 3, or 4): ";
29
cin >> choice;
if (choice == 2) {
int num1,
num2;
} else if (choice == 3) {
cout << "Sum: " << calculator.calculateSum(num1, num2, num3) << endl;
} else if (choice == 4) {
cout << "Sum: " << calculator.calculateSum(num1, num2, num3, num4) << endl;
} else {
return 0;
Output:
Case 1:
Enter the number of values you want to sum (2, 3, or 4):
Sum: 12
21
0
Case 2:
Enter the number of values you want to sum (2, 3, or 4):
Sum: 6
Case 3:
Enter the number of values you want to sum (2, 3, or 4):
Sum: 22
21
1
EXPERIMENT – 10
EXPERIMENT TITLE: Illustrate with example, how to overload increment operator.
Code:
#include <iostream>
class Counter {
private:
int count;
public:
Counter(int c = 0) : count(c) {}
Counter& operator++() {
Counter operator++(int) {
3
0
cout << "Count: " << count << endl;
};
int main()
{ Counter
obj(5);
obj.display();
// Pre-increment
++obj;
obj.display();
// Post-increment
obj++;
obj.display();
return 0;
Output:
Initial state: Count: 5
31
EXPERIMENT – 11
EXPERIMENT TITLE: Implement a class called Shape with member functions for calculating area and
perimeter. Derive classes such as Circle, Rectangle, and Triangle from the Shape class and overload functions
accordingly.
Code:
#include <iostream>
#include <cmath>
using namespace std;
class Shape {
public:
// Virtual destructor
virtual ~Shape() {}
};
private:
double radius;
public:
Circle(double r) : radius(r) {}
32
double calculatePerimeter() const override
};
private:
public:
};
private:
public:
33
double calculateArea() const override {
double s = (a + b + c) / 2; // Semi-perimeter
{ return a + b + c;
};
int main()
{ Shape*
shape;
// Circle
delete shape;
// Rectangle
delete shape;
// Triangle
34
cout << "Triangle Perimeter: " << shape->calculatePerimeter() << endl;
35
delete shape;
return 0;
Output:
Circle Area: 78.5398
Rectangle Area: 28
Rectangle Perimeter: 22
Triangle Area: 6
Triangle Perimeter: 12
36
EXPERIMENT – 12
EXPERIMENT TITLE: Implement a stack using an array with push and pop operations. Find the top element
of the stack and check if the stack is empty or not.
Code:
#include <iostream>
class Stack {
private:
element
public:
Stack(int size) {
capacity = size;
~Stack() {
delete[] arr;
if (topIndex == capacity - 1) {
37
cout << "Stack Overflow! Cannot push " << value << "." << endl;
38
return;
arr[++topIndex] = value;
void pop() {
if (isEmpty()) {
cout << "Stack Underflow! Cannot pop from an empty stack." << endl;
return;
topIndex--;
if (isEmpty()) {
return arr[topIndex];
39
return topIndex + 1;
};
int main() {
stack.push(10);
stack.push(20);
stack.push(30);
// Pop an element
stack.pop();
cout << "Top element after pop: " << stack.top() << endl;
if (stack.isEmpty()) {
} else {
stack.push(40);
stack.push(50);
31
0
return 0;
Output:
Top element: 30
31
1
EXPERIMENT – 13
EXPERIMENT TITLE: For the doctor's clinic create a waiting list of patients as per their arrival (FCFS) and
find out total no. of persons in waiting queue.
Code:
#include <iostream>
#include <queue>
#include <string>
using namespace std;
class ClinicQueue {
private:
queue<string> patientQueue;
public:
patientQueue.push(name);
cout << "Patient " << name << " added to the waiting list." << endl;
void servePatient() {
if (patientQueue.empty()) {
} else {
patientQueue.pop();
4
0
// Get the total number of patients in the queue
4
0
int totalPatients() const {
return patientQueue.size();
if (patientQueue.empty()) {
} else {
while (!tempQueue.empty()) {
tempQueue.pop();
};
int main() {
ClinicQueue clinic;
int choice;
string name;
do {
41
cout << "5. Exit" << endl;
switch (choice)
{ case 1:
cin.ignore();
getline(cin, name);
clinic.addPatient(name);
break;
case 2:
clinic.servePatient();
break;
case 3:
cout << "Total patients in the queue: " << clinic.totalPatients() << endl;
break;
case 4:
clinic.displayQueue();
break;
case 5:
cout << "Exiting the program. Have a nice day!" << endl;
break;
default:
return 0;
42
Output:
--- Doctor's Clinic Menu ---
1. Add Patient
2. Serve Patient
5. Exit
1. Add Patient
2. Serve Patient
5. Exit
1. Add Patient
2. Serve Patient
5. Exit
Enter your choice: 4
43
John Doe
Jane Smith
1. Add Patient
2. Serve Patient
5. Exit
1. Add Patient
2. Serve Patient
5. Exit
44
EXPERIMENT – 14
EXPERIMENT TITLE: Create a list of even nos. from 1 to 20 without using array.
Code:
#include <iostream>
using namespace std;
int main() {
if (i % 2 == 0) {
return 0;
Output:
Even numbers from 1 to 20:
2 4 6 8 10 12 14 16 18 20
45
EXPERIMENT – 15
EXPERIMENT TITLE: How can you navigate, open, and manipulate files on your computer
without using GUI.
To navigate, open, and manipulate files on a computer without using a Graphical User Interface
(GUI), you typically rely on the command-line interface (CLI). Here are key concepts and steps:
2. File Operations
Create a File:
touch filename.txt (in Linux/Mac)
type nul > filename.txt (in Windows)
Open a File:
Use a text editor like nano, vim, or notepad.
Example: nano filename.txt to open a file in Linux.
Copy Files:
cp source.txt destination.txt (Linux/Mac)
46
copy source.txt destination.txt (Windows)
Move Files:
mv source.txt destination/ (Linux/Mac)
move source.txt destination/ (Windows)
Delete Files:
rm filename.txt (Linux/Mac)
del filename.txt (Windows)
Extract Files:
tar -xzvf archive.tar.gz
(Linux/Mac) unzip archive.zip
(Windows)
47
EXPERIMENT – 16
EXPERIMENT TITLE: How to :1) List all the processes running. 2) Change the file permissions of the
directories. 3) check disk space usage. 4) List all the partitions on your system.
48
Remove write permission:
chmod -w directory_name
49