Internship Report
Internship Report
A report submitted in partial fulfillment of the requirements for the Award of Degree
of
BACHELOR OF TECHNOLOGY
In
ENROLLMENT NO:0191CS211034
Under Supervision of
Mr. Mohit Saxena
i
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
TECHNOCRATS INSTITUTE OF TECHNOLOGY (EXCELLENCE) BHOPAL
CERTIFICATE
This is to certify that the “AWS Cloud Practitioner Certification Internship Report submitted by Anand
Soni, 0191CS211034 work done by himand submitted during 2022 – 2023 academic year, in
partial fulfillment of the requirements for the award of the degree of BACHELOR OF TECHNOLOGY in
ii
CERTIFICATE PASTE HERE
ACKNOWLEDGEMENT
It is indeed with a great sense of pleasure and immense sense of gratitude that
I acknowledge the help of these individuals.
I am highly indebted to Director Prof (Dr.)K.K DWIVEDI for the facilities provided to
accomplish this internship.
o
I would like to thank my Head of the Department Prof. Rajesh Boghey for his
constructive criticism throughout my internship.
I would like to thank Prof. Mohit Saxenainternship coordinator Department of CSE for their
support and advices to get and complete internship in above said organization.
Abstract
Computers have turned into a vital piece of life. We require computers everywhere, be it for work, research
or in any such field. As the utilization of computers in our everyday life expands, the computing resources that
we need also go up. For companies like Google and Microsoft,
Cloud computing is a paradigm shift in which computing is moved away from personal computers and even
the individual enterprise application server to a ‘cloud’ of computers. Which can give the distinctive registering
assets of their customers? Clients of this framework require just be worried about the computing resources
administration being requested. The fundamental points of interest of how it is accomplished are avoided the
client. The data and the services provided reside in massively scalable data centers and can be ubiquitously
accessed from any connected device all over the world. Google, Microsoft, and Amazon, Alibaba Rackspace
has started providing cloud computing services. Amazon is the pioneer in this field.
CONTENTS
Object A Object B
Data Data
Communication
Functions Functions
Object C
Functions
Data
1. Objects
2. Classes
3. Data abstraction and encapsulation
4. Inheritance
5. Polymorphism
6. Dynamic binding
7. Message passing
OBJECTS
Objects are the basic run-time entities in an object-oriented system. They may represent a person, a
place, a bank account, a table of data or any item that the program must handle.
The fundamental idea behind object oriented approach is to combine both data and function
into a single unit and these units are called objects.
The term objects means a combination of data and program that represent some real word
entity. For example: consider an example named Amit; Amit is 25 years old and his salary is 2500.
The Amit may be represented in a computer program as an object. The data part of the object would
be (name: Amit, age: 25, salary: 2500)
The program part of the object may be collection of programs (retrive of data, change age,
change of salary). In general even any user –defined type-such as employee may be used. In the
Amit object the name, age and salary are called attributes of the object.
DATA T otal
Name
Date-of-birth
Marks Average
FUNCTIONS
Total
Average D isplay
Display
CLASS:
A group of objects that share common properties for data part and some program part are
collectively called as class.
In C ++ a class is a new data type that contains member variables and member functions that
operate on the variables.
DATA ABSTRACTION :
Abstraction refers to the act of representing essential features without including the back
ground details or explanations. Classes use the concept of abstraction and are defined as size, width
and cost and functions to operate on the attributes.
DATA ENCAPSALATION :
The wrapping up of data and function into a single unit (called class) is known as
encapsulation. The data is not accessible to the outside world and only those functions which are
wrapped in the class can access it. These functions provide the interface between the objects data and
the program.
INHERITENCE :
Inheritance is the process by which objects of one class acquire the properties of another
class. In the concept of inheritance provides the idea of reusablity. This mean that we can add
additional features to an existing class with out modifying it. This is possible by desining a new class
will have the combined features of both the classes.
POLYMORPHISIM:
Polymorphism means the ability to take more than one form. An operation may exhibit different
instance. The behaviour depends upon the type of data used in the operation.
A language feature that allows a function or operator to be given more than one definition. The types
of the arguments with which the function or operator is called determines which definition will be
used.
It is able to express the operation of addition by a single operater say ‘+’. When this is possible you
use the expression x + y to denote the sum of x and y, for many different types of x and y; integers ,
float and complex no. You can even define the + operation for two strings to mean the concatenation
of the strings.
DYNAMIC BINDING :
Binding refers to the linking of a procedure call to the code to the executed in
response to the call. Dynamic binding means the code associated with a given procedure call is not
known untill the time of the call at run-time. It is associated with a polymorphic reference depends
upon the dynamic type of that reference.
MESSAGE PASSING :
An object oriented program consists of a set of objects that communicate with each
other.
A message for an object is a request for execution of a procedure and therefore will
invoke a function (procedure) in the receiving object that generates the desired result. Message
passing involves specifying the name of the object, the name of the function (message) and
information to be sent.
Object Information
Message
Module-3
C ++ Data Types
Derived type
User defined type
Structure Built in types
Array
Union Function
Class pointer
enumeration
Both C and C++ compilers support all the built in types. With the exception of void the basic
datatypes may have several modifiers preceding them to serve the needs of various situations. The
modifiers signed, unsigned, long and short may applied to character and integer basic data types.
However the modifier long may also be applied to double.
usigned 1 0 to 265
FUNCTION IN C++ :
main()
{
//main program statements
}
This is property valid because the main () in ANSI C does not return any value. In C++, the main () returns a value of
type int to the operating system. The functions that have a return value should use the return statement for terminating.
The main () function in C++ is therefore defined as follows.
int main( )
{
return(0)
}
Since the return type of functions is int by default, the key word int in the main( ) header is optional.
INLINE FUNCTION:
To eliminate the cost of calls to small functions C++ proposes a new feature called inline function.
An inline function is a function that is expanded inline when it is invoked .That is the compiler
replaces the function call with the corresponding function code.
The inline functions are defined as follows:-
inline function-header
{
function body;
}
Example: inline double cube (double a)
{
return(a*a*a);
}
The above inline function can be invoked by statements like
c=cube(3.0);
d=cube(2.5+1.5);
remember that the inline keyword merely sends a request, not a command to the compliler. The
compiler may ignore this request if the function definition is too long or too complicated and compile
the function as a normal function.
FUNCTION OVERLOADING:
Overloading refers to the use of the same thing for different purposes . C++ also
permits overloading functions .This means that we can use the same function name to creates
functions that perform a variety of different tasks. This is known as function polymorphism in oops.
Using the concepts of function overloading , a family of functions with one function
name but with different argument lists in the functions call .The correct function to be invoked is
determined by checking the number and type of the arguments but not on the function type.
For example an overloaded add() function handles different types of data as shown
below.
//Declaration
int add(int a, int b); //prototype 1
//function call
cout<<add(5,10); //uses prototype 1
cout<<add(15,10.0); //uses prototype 4
cout<<add(12.5,7.5); //uses prototype 3
cout<<add(5,10,15); //uses prototype 2
cout<<add(0.75,5); //uses prototype 5
A function call first matches the prototype having the same no and type of arguments and then calls
the appropriate function for execution.
The function selection invokes the following steps:-
a) The compiler first tries to find an exact match in which the types of actual
arguments are the same and use that function .
b) If an exact match is not found the compiler uses the integral promotions to the actual
arguments such as :
char to int
float to double
to find a match
c)When either of them tails ,the compiler tries to use the built in conversions to the actual
arguments and them uses the function whose match is unique . If the conversion is possible to have
multiple matches, then the compiler will give error message.
Example:
long square (long n);
double square(double x);
A function call such as :- square(lO)
Will cause an error because int argument can be converted to either long or
double .There by creating an ambiguous situation as to which version of square( )should be used.
Module-05
CLASS:-
Class is a group of objects that share common properties and relationships .In C++, a class is
a new data type that contains member variables and member functions that operates on the variables.
A class is defined with the keyword class. It allows the data to be hidden, if necessary from external
use. When we defining a class, we are creating a new abstract data type that can be treated like any
other built in data type.
Generally a class specification has two parts:-
a) Class declaration
b) Class function definition
the class declaration describes the type and scope of its members. The class function
definition describes how the class functions are implemented.
Syntax:-
class class-name
{
private:
variable declarations;
function declaration ;
public:
variable declarations;
function declaration;
};
The members that have been declared as private can be accessed only
from with in the class. On the other hand , public members can be accessed from outside the class
also. The data hiding is the key feature of oops. The use of keywords private is optional by default,
the members of a class are private.
The variables declared inside the class are known as data members and the functions
are known as members mid the functions. Only the member functions can have access to the private
data members and private functions. However, the public members can be accessed from the outside
the class. The binding of data and functions together into a single class type variable is referred to as
encapsulation.
Syntax:-
class item
{
int member;
float cost;
public:
void getldata (int a ,float b);
void putdata (void);
The class item contains two data members and two function members, the data
members are private by default while both the functions are public by declaration. The function
getdata() can be used to assign values to the member variables member and cost, and putdata() for
displaying their values . These functions provide the only access to the data members from outside
the class.
CREATING OBJECTS:
Once a class has been declared we can create variables of that type
by using the class name.
Example:
item x;
creates a variables x of type item. In C++, the class variables are known as objects. Therefore
x is called an object of type item.
}x ,y ,z;
would create the objects x ,y ,z of type item.
; error . x is private
p,
z=10; ok ,z is public
xyz p;
p. x =0; error . x is private
p, z=10; ok ,z is public
module-06
CONSTRUCTOR:
A constructor is a special member function whose task is to initialize the objects of its class .
It is special because its name is the same as the class name. The constructor is invoked when ever an
object of its associated class is created. It is called constructor because it construct the values of data
members of the class.
};
integer :: integer(void)
{
m=0;
n=0;
}
When a class contains a constructor like the one defined above it is guaranteed that an
object created by the class will be initialized automatically.
For example:-
Integer int1; //object int 1 created
This declaration not only creates the object int1 of type integer but also initializes its
data members m and n to zero.
DESTRUCTOR:-
A destructor, us the name implies is used to destroy the objects that have been created by a
constructor. Like a constructor, the destructor is a member function whose name is the same as the
class name but is preceded by a tilde.
For Example:-
~ integer( ) { }
A destructor never takes any argument nor does it return any value. It will be invoked
implicitly by the compiler upon exit from the program to clean up storage that is no longer
accessible. It is a good practice to declare destructor in a program since it releases memory space for
future use.
Delete is used to free memory which is created by new.
Module-07
Inheritance:
Reaccessability is yet another feature of OOP's. C++ strongly supports the concept of reusability.
The C++ classes can be used again in several ways. Once a class has been written and tested, it can
be adopted by another programmers. This is basically created by defining the new classes, reusing
the properties of existing ones. The mechanism of deriving a new class from an old one is called
'INHERTTENCE'. This is often referred to as IS-A' relationship because very object of the class
being defined "is" also an object of inherited class. The old class is called 'BASE' class and the new
one is called'DERIEVED'class.
Multilevel Inheritance
When the inheritance is such that, the class A serves as a base class for a derived class B which in
turn serves as a base class for the derived class C. This type of inheritance is called ‘MULTILEVEL
INHERITENCE’. The class B is known as the ‘INTERMEDIATE BASE CLASS’ since it provides a
link for the inheritance between A and C. The chain ABC is called ‘ITNHERITENCE*PATH’ for
e.g.
A Base class
C
Derived class
Multiple Inheritances
A class can inherit the attributes of two or more classes. This mechanism is known as ‘MULTIPLE
INHERITENCE’. Multiple inheritance allows us to combine the features
of several existing classes as a starring point for defining new classes. It is like the child inheriting
the physical feature of one parent and the intelligence of another. The syntax of the derived class is
as follows:
Where the visibility refers to the access specifiers i.e. public, private or protected. Following
program shows the multiple inheritance.
module-08
Exception Handling:
Exception refers to unexpected condition in a program. The unusual conditions could be faults,
causing an error which in turn causes the program to fail. The error handling mechanism of c++ is
generally referred to as exception handling.
Generally , exceptions are classified into synchronous and asynchronous exceptions.. The exceptions
which occur during the program execution, due to some fault in the input data or technique that is not
suitable to handle the current class of data. with in a program is known as synchronous exception.
Example:
errors such as out of range,overflow,underflow and so on.
The exceptions caused by events or faults unrelated to the program and beyond the control of
program are asynchronous exceptions.
For example, errors such as keyboard interrupts, hardware malfunctions, disk failure and so on.
When a program encounters an abnormal situation for which it in not designed, the user may transfer
control to some other part of the program that is designed to deal with the problem. This is done by
throwing an exception. The exception handling mechanism uses three blocks: try, throw and catch.
The try block must be followed immediately by a handler, which is a catch block. If an exception is
thrown in the try block the program control is transferred to the appropriate exception handler. The
program should attempt to catch any exception that is thrown by any function. The relationship of
these three exceptions handling constructs called the exception handling model is shown in figure:
try block
perform operation which may throw
or invoke external function if needed
throw block
if (failure)
throw object
exception
catch block
catches all exceptions thrown
from
The keyword throw is used to raise an exception when an error is generated in the comutation. the
throw expression initialize a temporary object of the typeT used in thorw (T arg).
syntax:
throw T;
catch construct:
The exception handler is indicated by the catch keyword. It must be used immediately after the
statements marked by the try keyword. The catch handler can also occur immediately after another
catch Each handler will only evaluate an exception that matches.
syn:
catch(T)
{
// error meassges
}
try construct:
The try keyboard defines a boundary within which an exception can occur. A block of code in which
an exception can occur must be prefixed by the keyword try. Following the try keyword is a block of
code enclosed by braces. This indicates that the prepared to test for the existence of exceptions. If an
exception occurs, the program flow is interrupted.
try
{
…
if (failure)
throw T;
}
catch(T)
{
…
}
example:
#include<iostream.h>
void main()
{
int a,b;
cout<<”enter two numbers:”;
cin>>a>>b;
try
{
if (b= =0)
throw b;
else
cout<a/b;
}
catch(int x)
{
cout<<”2nd operand can’t be 0”;
}
}