0% found this document useful (0 votes)
5 views9 pages

1.2 C++

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views9 pages

1.2 C++

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

EXPERIMENT NUMBER –1.

STUDENT’S NAME-Brandon Bernard Chiripanyanga


STUDENT’S UID – 21BAS1182
CLASS AND GROUP –21BAS301C
SEMESTER – 2

AIM OF THE EXPERIMENT 2.1– input a matrix of dimension m*n. If base


address is 1000. Find the address of (m-1, n-1) element of the matrix.

FLOWCHART/ ALGORITHM

 start
 declare variables integer b,i,j,w,n,m, a[10][10]
 display number of rows
 input number of rows
 display number of coloums
 input number of coloums
 display elements of matrices
 input elements of matrices
 display base address
 input base address
 display the storage size
 input the storage size
 i=m-1
 j=n-1
 display address of A[i][j]
 stop

SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103


PROGRAM CODE

ERRORS ENCOUNTERED DURING PROGRAM’S EXECUTION


(Kindly jot down the compile time errors encountered)
 No match for operators
 undeclared variable
 missing terminating character
 missing of semicolon
 eliminated bracket

PROGRAMS’ EXPLANATION (in brief)


Creates a matrix m*n with a base address of 1000 and this same address is being used to create a matric for
(m-1,n-1)

SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103


OUTPUT

AIM OF THE EXPERIMENT 1.2 – Create a class called employee with the following details
as variables within it.

1. Name of the employee (string)

2. Age (int)

3. Designation (string)

4. Salary (double)

FLOWCHART/ ALGORITHM
 start
 declare variables for class employee
(
char Name[25];
int Age;
char Desg[8];
long Salary;
public:
void GetData();
void PutData();
)
 Display Enter Employee Name
 Input name
 Display Enter Employee Age
 Input age
 Display Enter Employee Designation
 Input des
 Display Enter Employee Salary
 Input salary
 stop
SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103
PROGRAM CODE

ERRORS ENCOUNTERED DURING PROGRAM’S EXECUTION


(Kindly jot down the compile time errors encountered)
-Get data was declared private
-undeclared variable
-missing of semicolon
-eliminated bracket
-

PROGRAMS’ EXPLANATION (in brief)


A class has been created which is called employee and the class has detailes like
name,age,designation,salary. It will allow users to enter there data under the employee class.

SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103


OUTPUT

AIM OF THE EXPERIMENT 2.3 – the use of scope resolution operator. Display the various values of
the same variables declared at different scope levels

FLOWCHART/ ALGORITHM
 start
 declare a global variable =100
 declare a local variable =10
 display the global variable
 display the local variable
 stop

PROGRAM CODE

SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103


ERRORS ENCOUNTERED DURING PROGRAM’S EXECUTION
(Kindly jot down the compile time errors encountered)
 undeclared variable
 missing of semicolon
 eliminated bracket
 missing terminating character

PROGRAMS’ EXPLANATION (in brief)


This program declares a local and glabal variable with the same name but different values. Then when you
call out the variable name it has to be display both the variables.

OUTPUT

LEARNING OUTCOMES

Understand the concepts of object-oriented programming including programming process


and compilation process.

Apply different techniques to decompose a problem and programmed a solution with its sub
modules.

Analyze and explain the behavior of simple programs involving the programming addressed in
the course.

Implement and evaluate the programs using the syntax and semantics of object-oriented
programming.

Design the solution of real-world problems in order to determine that the program performs
as expected.

SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103


EVALUATION COLUMN (To be filled by concerned faculty only)

Sr. No. Parameters Maximum Marks


Marks Obtained
1. Worksheet Completion including writing 10
learning objective/ Outcome
2. Post-Lab Quiz Result 5

3. Student engagement in Simulation/ 5


Performance/ Pre-Lab Questions
4. Total Marks 20

SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103


SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103
SUBJECT NAME-Object Oriented Programming using C++ SUBJECT CODE-21CSH103

You might also like