Subscribe this Blog

Wikipedia

Search results

Notifications and New Posts!

Friday, July 31, 2020

Google Meet Session - 31st July 2020 C++ TY Mechanical (A and B)

C++ TY Mech AB
Friday, 31 July13:30 – 15:30
Weekly on Friday, until 30 Sep 2020
Join with Google Meet
https://meet.google.com/qaj-pyzn-zmy
Join by phone
Description:Dear Student Friends,Please join sharp at 13:30 today. I will admit/allow students up to 13:40.Those who will join late for them door will be closed means entry to the session will be denied. Please note. Because admitting late, creates disturbance to all.
  1. 10 minutes before
Organiser: Sachin Bhosale

With Kind Regards,

To know attendance : Click here

Today's Learning:

/*
destructor
Destructor destroys the created objects and makes free the memory location.
1. Destructor never take an argument.
2. Only one destructor is needed to destroy all objects created by constructor.
3. This special member function gets automatically called at the end of program
4. Last priority will be given to destructor as it destroys the created objects.

Note: Constructor and Destructor will not have any return type means they are not returning any value.
*/
#include<iostream.h>
#include<conio.h>
class sample
{
int no;
public:
sample()
{
cout<<"\n Please enter number=";
cin>>no;
cout<<"\n Value of Number="<<no;
}
~sample()
{
cout<<"\n Value of Number="<<no;
}
};
void main()
{
clrscr();
sample o1,o2,o3;
getch();
}

/*
Destructor destroys all created objects.
and helps to release memory of computer.
*/
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
class sample
{
private:
int No;
public:
sample()
{
cout<<"\n  I am in Constructor";
cout<<"\n  Please enter value of Number=";
cin>>No;
printf("\n Address of object=%u",&No);
}
~sample()
{
cout<<"\n  I am in Destructor";
printf("\n Address of object=%u",&No);
}
};

void main()
{
clrscr();
sample o1;
{
sample o2;
sample o3;
}
getch();
}

/*
parameterized constructor
*/
#include<iostream.h>
#include<conio.h>
class sample
{
int p,q;
public:
sample(int a,int b)
{
p=a;
q=b;
cout<<"\n p="<<p;
cout<<"\n q="<<q;
}
};
void main()
{
clrscr();
int a,b;
cout<<"\n Please enter a=";
cin>>a;
cout<<"\n Please enter b=";
cin>>b;
sample obj(a,b);
getch();
}


/*
function overloading
A C++ program to understand function overloading

Displaying side of rectangular box, Calculating area of rectangular box
and calculating volume of rectangular box by using single function fun()
In this case fun() is overloaded.
And in program we used function overloading.
*/
#include<iostream.h>
#include<conio.h>
class sample
{

public:
void fun(int);
void fun(int,int);
void fun(int,int,int);
};
void sample::fun(int l)
{
cout<<"\n fun() function will to display sides of rectangular box";
cout<<"\n Side of Rectangular Box="<<l;
}

void sample::fun(int l,int b)
{
cout<<"\n fun() function will calculate area of rectangular box";
cout<<"\n Area of Rectangular Box="<<l*b;
}

void sample::fun(int l,int b,int h)
{
cout<<"\n fun() function will calculate volume of rectangular box";
cout<<"\n Volume of Rectangular Box="<<l*b*h;
}

void main()
{
int l,b,h;
clrscr();
cout<<"\n Please enter l=";
cin>>l;
cout<<"\n Please enter b=";
cin>>b;
cout<<"\n Please enter h=";
cin>>h;
sample obj;
//first side of rectangular box is passed
obj.fun(l);
//second side of rectangular box is passed
obj.fun(b);
//third side of rectangular box is passed
obj.fun(h);
//area of rectangular box by considering first two sides
obj.fun(l,b);
//area of rectangular box by considering last two sides
obj.fun(b,h);
//area of rectangular box by considering first and last sides
obj.fun(l,h);
//Only one possibility can be considered as multiplication of three sides remains same
obj.fun(l,b,h);
getch();
}

Google Meet Session Video



Thursday, July 30, 2020

Google Meet Session - 30th July 2020 C++ TY Mechanical (A and B)

C++ TY Mech AB
Thursday, 30 July14:45 – 16:45
Weekly on Thursday, until 30 Sep 2020
Join with Google Meet
https://meet.google.com/hid-dmnv-qxw
Join by phone
Description: Dear Student Friends,Please join sharp at 13:30 today. I will admit/allow students up to 13:40.Those who will join late for them door will be closed means entry to the session will be denied. Please note. Because admitting late, creates disturbance to all.
  1. 10 minutes before

Organiser: Sachin Bhosale

With Kind Regards,

To know attendance : Click here


Google Meet Session Facebook Link:



Learning for today's session:
1. 
/*
A C++ program to understand constructor
constructor is nothing but special member function.
*/
#include<iostream.h>
#include<conio.h>
//#define pi 3.14
class sample
{
private:
float cc,r,ac,pi;
public:
sample()
{
pi=3.14;
cout<<"\n Value of pi"<<pi;
}
void enterr();
void cal_cc();
void cal_ac();
};

void sample::enterr()
{
cout<<"\n Value of pi="<<pi;
cout<<"\n Please enter Radius=";
cin>>r;
cout<<"\n Value of pi="<<pi;
}

void sample::cal_cc()
{
cc=2*pi*r;
cout<<"\n Circumference of circle="<<cc;
}
void sample::cal_ac()
{
ac=pi*r*r;
cout<<"\n Area of circle="<<ac;
}

void main()
{
clrscr();
sample obj;
obj.enterr();
obj.cal_cc();
obj.cal_ac();
getch();

}


2.
Use following presentation to install python and pycharm on Window's 10 OS:

Thursday, July 23, 2020

Google Meet Session - 23rd July 2020 C++ TY Mechanical (A and B)

C++ TY Mech AB
Thursday, 23 July13:30 – 15:30
Weekly on Thursday, until 30 Sep 2020
Join with Google Meet
meet.google.com/hid-dmnv-qxw
Join by phone
Description: Dear Student Friends,Please join sharp at 13:30 today. I will admit/allow students up to 13:40.Those who will join late for them door will be closed means entry to the session will be denied. Please note. Because admitting late, creates disturbance to all.
  1. 10 minutes before

Organiser: Sachin Bhosale

With Kind Regards,

Attendance will be uploaded after 14:45.
To know attendance : Click here

/*
A C++ program to pass values from main function to class (udf)
*/
#include<iostream.h>
#include<conio.h>
#define k 5.0  //global declaration
class sample
{
private:
int a,b;
public:
int add;
void fun(int x,int y)
{
a=x;
b=y;
cout<<"\n a="<<a;
cout<<"\n b="<<b;
cout<<"\n k="<<k;
}
void sum();
};
void sample::sum()
{
add=a+b;
cout<<"\n Addition of a and b="<<add;
cout<<"\n k="<<k;
}

void main()
{
int a,b;
clrscr();
cout<<"\n Please enter a=";
cin>>a;
cout<<"\n Please enter b=";
cin>>b;
cout<<"\n k="<<k;
sample obj;
obj.fun(a,b); //calling of udf with the object of class and passing values from main to class  (udf)
obj.sum();
cout<<"\n value of add="<<obj.add;
getch();

}


Started to learn html
<html>
<title>
Mechancial
</title>
<head>
Welcome to webpage
<head>
<bodyt>
<marquee><h1><b>Hello</b></h1></marquee>
</body>
</html>

Started to Learn to php language:
<html>
<title>
Mechanical
</title>
<head>
Welcome to webpage
<head>
<body>
<marquee><h1><b>Hello</b></h1></marquee>
</body>
</html>

<?php
$a=10;
$b=20;
echo "a=".$a."<br>";
echo "b=".$b."<br>";

function sum($a,$b)
{
$c=$a+$b;
echo "Addition=".$c."<br>";
}

sum($a,$b);

?>


Google Meet Session Video Link:
Please rotate mobile screen.






Google Meet Session Facebook Video Link: