Bhaiya aap Ko jitna thanks bolun utna kamm hai ,aapne jitni asaani se computer language ,DS ALGO aur v bahut kuch samjhaya hai wo kaabil-e-taarif hain. Aise hi hummm village student k liye aap hard work karte rahiyega .Aapke video kaa mera 10 student ka group humesha wait karte rahte hain .love u bhaiya from Deoghar ,Jharkhand.😍😍🙏🙏
Buddy Please help.. Volume always comes as 0 import java.util.Scanner; class Rectangle { public int length, breadth; public void setLength(int length) { this.length = length; } public void setBreadth(int breadth) { this.breadth = breadth; } public int area() { return this.length * this.breadth; } } class Cube extends Rectangle{ public int height; public void setHeight(int height) { this.height = height; } public int volume() { return this.height* this.length * this.breadth; } } public class practicesat { public static void main(String[] args) { Rectangle r = new Rectangle(); Scanner sc = new Scanner(System.in); System.out.println("Enter Length"); int l = sc.nextInt(); r.setLength(l); System.out.println("Enter Breadth"); int b = sc.nextInt(); r.setBreadth(b); System.out.println("AREA is " + r.area()); Cube c = new Cube(); System.out.println("Enter Height"); int h = sc.nextInt(); c.setHeight(h); System.out.println("Volume is " + c.volume()); } }
@@amandevrani1898If you want do by the code above given, then you should call the methods of SetLength,SetBreadth from object c(cube object) then you will get the answers
Questions 2 and 4 class rectangle1 { private float width,breadth; public float getWidth() { return width; } public void setWidth(float width) { this.width = width; } public float getBreadth() { return breadth; } public void setBreadth(float breadth) { this.breadth = breadth; } float area() { return width*breadth; } } class cuboid extends rectangle1 { private float height; public float getHeight() { return height; } public void setHeight(float height) { this.height = height; } float volume() { return area()*height; } } public class CWH_52_ch10_ps { public static void main(String[] args) { rectangle1 rec=new rectangle1(); cuboid obj=new cuboid(); rec.setWidth(5); rec.setBreadth(8); obj.setHeight(10); obj.setWidth(6); obj.setBreadth(3); System.out.println("The width of the rectangle is "+rec.getWidth()); System.out.println("The breadth of the rectangle is "+rec.getBreadth()); System.out.println("The area of the rectangle is "+rec.area()); System.out.println("The width of the cuboid is "+obj.getWidth()); System.out.println("The breadth of the cuboid is "+obj.getBreadth()); System.out.println("The height of the cuboid is "+obj.getHeight()); System.out.println("The volume of the cuboid is "+obj.volume()); } }
// I will complete questions class Rectangle { // area of rectangle = lXB public int length; public int breadth; // constructor Rectangle() { System.out.println("I am non parameterized constructor of rectangle"); } Rectangle(int l, int b) { System.out.println("I am parameterized constructor of rectangle"); } public int getLength() { return length; } public void setLength(int length) { this.length = length; } public int getBreadth() { return breadth; } public void setBreadth(int breadth) { this.breadth = breadth; } // method public int area() { return this.length * this.breadth; } } class Cuboid extends Rectangle { // Surface area of Cuboid = 2*lb +2*bh+ 2*hl // constructor public int height; Cuboid(int l, int b, int h) { super(l, b); System.out.println("I am cuboid parameterized constructor"); } //method public int surfacearea() { return 2 * (this.length * this.breadth) + 2 * (this.breadth * this.height) + 2 * (this.height + this.length); } } public class inheritance_rectangle { public static void main(String[] args) { // System.out.println("ya devlat basa ya kusgun lese"); // Rectangle r = new Rectangle(); // r.area(); // Cuboid obj = new Cuboid(84,4,2); Cuboid obj = new Cuboid(63,33,33); // getters and Setters // Rectangle r = new Rectangle(); // r.setLength(3); // r.setBreadth(9); // // System.out.println(r.getLength()); // System.out.println(r.getBreadth()); } }
The chapter 10 notes are missing , you've only uploaded the practice questions pdf . It would be very kind of you if you could provide us with the pdf of the notes as well . Thank you .
******ATTENTION ⚠****** JOIN CODEWITHHARRY FANCLUB GROUP ON FACEBOOK AND SHARE ALL VIDEOS OF HARRY BHAI, IT IS LIKE A GIFT TO HARRY BRO FROM US. LET'S GO (1 MILLION SUBSCRIBER CONGRATULATION PRESENT IN ADVANCE ) *****PLEASE DON'T IGNORE THIS *****
Harry bhaiya, sub class ke constructor mein print statement ke baad super keyword ka use kiya to print statement pehle run hoga ya super constructor pehle run hoga, 🤔 answer plz 🙏
//Question no 2 & 4 //we can also small over code using only constructor; class Rectangle{ int l; int w; Rectangle(int l, int w){ System.out.println("I'm the contructor of rectangle class"); } public int getLength(){ return l; } public void setLength(int l){ this.l = l; } public int getWidth(){ return w; } public void setWidth(int w){ this.w = w; } public int areaOfRectangle(){ return l*w; } } class Cuboid extends Rectangle { int h; int b; Cuboid(int l , int w , int b , int h){ super(l,w); System.out.println("I'm the overloaded contructor of Cuboid "); } public int getBreadth(){ return b; } public void setBredth(int b){ this.b = b; } public int getHeight(){ return h; } public void setHeight(int h){ this.h = h; } public int areaOfCUboid(){ return 2*l*b + 2*l*h + 2*h*w; } } public class CWH_52_Inheritance_PracticeSet { public static void main(String[] args) { // cylinder c = new cylinder(4,5); // System.out.println(c.volumeOfCylinder()); Cuboid a = new Cuboid(4,3 ,34,9); a.setLength(4); a.setWidth(3); a.setHeight(9); a.setBredth(34); System.out.println(a.areaOfCUboid()); } } Thanks harry sir for this amazing course.
Question 1 and 3 class circle { float r ; } class cylinder extends circle { float h ; double area , vol ; void res() { area = 3.1*r*r ; vol = 3.1*r*r*h ; System.out.println(" Area and volume are ") ; System.out.println(area) ; System.out.println(vol) ; } } public class Main { public static void main(String [] args) { cylinder k = new cylinder() ; k.r = 1 ; k.h = 1 ; k.res() ; } }
QUESTION 2 AND 4: class RectangleR{ RectangleR(){ System.out.print("The perimeter of the Rectangle is: "); } public int length; public int width; public int getLength() { return length; } public void setLength(int length) { this.length = length; } public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } RectangleR(int l , int w){ this.length = l; this.width = w; } public double perimeter(){ return 2* (this.length + this.width); } } class Cuboid extends RectangleR{ public int height; public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } Cuboid(int l , int w , int h){ super(l,w); this.height = h; } public double perimeter(){ return 4 * (this.length + this. width + this.height); } } // UNDER MAIN FUNCTION // PROBLEM 2 & 4: RectangleR objR = new RectangleR(); objR.setLength(4); objR.setWidth(5); System.out.println(objR.perimeter()); Cuboid Cuboid = new Cuboid(4,5,6); System.out.println("Perimeter of Cuboid : " + Cuboid.perimeter()); } }
kr diya bhai solve waise to ma;um hai ki ab tum apna commrnt nhi dekhne wale ho, kya hi frk padta hoga ab 😅 but fir bhi effort bohot jyada ki hai aapna
Extend karke inherit karte hai, and use object banake hi use karte hai, bina extend kiye bhi to use kar sakte hai object banake , so extends ka kya advantage hai, please answer bhaiya
Solution of Q.2 and Q4 :) :) ↓ class rectangle { public int length; public int breadth; rectangle() { System.out.println("I am Default Constructor of rectangle"); } rectangle(int length, int breadth) { System.out.println("I am Parameterized Constructor of rectangle"); this.length = length; this.breadth = breadth; } public void setlength(int length) { this.length = length; } public void setbreadth(int breadth) { this.breadth = breadth; } public int getlength() { return length; } public int getbreadth() { return breadth; } public int area() { return length * breadth; } } class Cuboid extends rectangle { public int height; Cuboid(int length, int breadth, int height) { super(length, breadth); System.out.println("I am Parameterized Constructor of Cuboid"); this.height = height; } public void setheight(int height) { this.height = height; } public int getheight() { return height; } public int Surfacearea() { return 2 * length * breadth + 2 * breadth * height * +2 * length * height; } } public class rectangle_Cuboid { public static void main(String[] args) { // rectangle r = new rectangle(3,2); Cuboid c = new Cuboid(3, 2, 6); c.setlength(3); c.setbreadth(2); c.setheight(6); System.out.println(c.getlength()); System.out.println(c.getbreadth()); System.out.println(c.getheight()); // System.out.println(c.getlength() * c.getbreadth() * c.getheight()); System.out.println(c.Surfacearea()); } }
harry bhai mera itellij idea par kisibhi file ke upar right click karne par "Run" ka option nhi dikha raha hai . bhai please mera problem solve kijiye . Right-click on a test class does not show the "run" options .
Ques2 and Ques4: class Rectangle{ public int length; Rectangle(){ System.out.println("I am a non-parameterised constructor , I am called by default if there is no super class define"); } Rectangle(int l, int b){ System.out.println(" I am parameterised constructor"); } public int getLength() { return length; } public int getBreadth() { return breadth; } public int breadth; public void setLength(int l){ this.length=l; } public void setBreadth(int b){ this.breadth =b; } public int Area(int l,int b){ return l*b; } } class Cuboid extends Rectangle{ public int height; Cuboid(int l, int b, int h){ super(l,b); /* calling parent class constructor with 2 parameter inside it. */ this.height=h; System.out.println("this is sub class constructor"); } public int Volume(){ return (2*(length)*breadth)+(2*height*breadth)+(2*length*height); } } public class practice12 { public static void main(String[] args) { // Cylinder1 d=new Cylinder1(12,5); // Circle c= new Circle(); // Rectangle r=new Rectangle(2,3); Cuboid c= new Cuboid(2,3,4); //setting length c.setLength(2); //setting breadth c.setBreadth(3); System.out.println(c.Volume()); } }
Bhaiya aap Ko jitna thanks bolun utna kamm hai ,aapne jitni asaani se computer language ,DS ALGO aur v bahut kuch samjhaya hai wo kaabil-e-taarif hain. Aise hi hummm village student k liye aap hard work karte rahiyega .Aapke video kaa mera 10 student ka group humesha wait karte rahte hain .love u bhaiya from Deoghar ,Jharkhand.😍😍🙏🙏
Android Development course with notes 🔥 Requesting Again
Pls make
+1
yes please
C ex
bnaya hua h dalle
Bhai i am attending your lectures on html,css and js.Abhi tho 22 lecture pe pohonch gaya hoo very benefitial.🙏🏻🙏🏻🙏🏻
Yes Sir, I will Calculate area and volume for Question 2
I am totally into this course!!!!!!!!
Thanks Harry Bhai 🤍 For growing confidence
I calculated the area & volume of the rectangle and cuboid respectively:)
Buddy Please help..
Volume always comes as 0
import java.util.Scanner;
class Rectangle {
public int length, breadth;
public void setLength(int length) {
this.length = length;
}
public void setBreadth(int breadth) {
this.breadth = breadth;
}
public int area() {
return this.length * this.breadth;
}
}
class Cube extends Rectangle{
public int height;
public void setHeight(int height) {
this.height = height;
}
public int volume()
{
return this.height* this.length * this.breadth;
}
}
public class practicesat {
public static void main(String[] args) {
Rectangle r = new Rectangle();
Scanner sc = new Scanner(System.in);
System.out.println("Enter Length");
int l = sc.nextInt();
r.setLength(l);
System.out.println("Enter Breadth");
int b = sc.nextInt();
r.setBreadth(b);
System.out.println("AREA is " + r.area());
Cube c = new Cube();
System.out.println("Enter Height");
int h = sc.nextInt();
c.setHeight(h);
System.out.println("Volume is " + c.volume());
}
}
@@amandevrani1898 Use constructors bro.
This code is lengthy. You will get answers then
@@amandevrani1898If you want do by the code above given, then you should call the methods of SetLength,SetBreadth from object c(cube object) then you will get the answers
14:37
I will definitely do it!
Hii bro❤️
answer bhjio bro. 4 ka
Thank You Harry Bhai for your efforts
Constructors Code ko bahot easy bana deta hai Q.4 me pata chala
Thanks Harry bro ❤❤
Questions 2 and 4
class rectangle1
{
private float width,breadth;
public float getWidth() {
return width;
}
public void setWidth(float width) {
this.width = width;
}
public float getBreadth() {
return breadth;
}
public void setBreadth(float breadth) {
this.breadth = breadth;
}
float area()
{
return width*breadth;
}
}
class cuboid extends rectangle1
{
private float height;
public float getHeight() {
return height;
}
public void setHeight(float height) {
this.height = height;
}
float volume()
{
return area()*height;
}
}
public class CWH_52_ch10_ps {
public static void main(String[] args) {
rectangle1 rec=new rectangle1();
cuboid obj=new cuboid();
rec.setWidth(5);
rec.setBreadth(8);
obj.setHeight(10);
obj.setWidth(6);
obj.setBreadth(3);
System.out.println("The width of the rectangle is "+rec.getWidth());
System.out.println("The breadth of the rectangle is "+rec.getBreadth());
System.out.println("The area of the rectangle is "+rec.area());
System.out.println("The width of the cuboid is "+obj.getWidth());
System.out.println("The breadth of the cuboid is "+obj.getBreadth());
System.out.println("The height of the cuboid is "+obj.getHeight());
System.out.println("The volume of the cuboid is "+obj.volume());
}
}
U didn't used "this" keyword in area method of class rectangle
return area()*height
will throw error.
@@komalKumari-qy7gg it's not necessary to use but sometimes it is when the name of the local variable is same as instance variable in the class
width height breadth private kyu liya public chahiye tha n??
@@niteshkumbhare8209 jaruri nhi hai private bhi de sakte hai par fir sab private mei dene padenge eek pirvate or eek public nhi de sakte
Congrats for 777k subscribers
Thank you! Liked.
#Main karunga all problems solve harry bhai❤
Teaching nice sir 👌👍
I will do it!👍
Thanks Harry Bhaiya
Harry Bhai , ur r really awesome😍🥰😘😘
Thanks a lot for creating this video!
14:45 , I will calculate Area and Volume for Question-2
Done? 😅
@@karanpatel592 yes bro
Happiest learning with CodeWithHarry ...
majja agyaa solve karke
// I will complete questions
class Rectangle {
// area of rectangle = lXB
public int length;
public int breadth;
// constructor
Rectangle() {
System.out.println("I am non parameterized constructor of rectangle");
}
Rectangle(int l, int b) {
System.out.println("I am parameterized constructor of rectangle");
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public int getBreadth() {
return breadth;
}
public void setBreadth(int breadth) {
this.breadth = breadth;
}
// method
public int area() {
return this.length * this.breadth;
}
}
class Cuboid extends Rectangle {
// Surface area of Cuboid = 2*lb +2*bh+ 2*hl
// constructor
public int height;
Cuboid(int l, int b, int h) {
super(l, b);
System.out.println("I am cuboid parameterized constructor");
}
//method
public int surfacearea() {
return 2 * (this.length * this.breadth) + 2 * (this.breadth * this.height) + 2 * (this.height + this.length);
}
}
public class inheritance_rectangle {
public static void main(String[] args) {
// System.out.println("ya devlat basa ya kusgun lese");
// Rectangle r = new Rectangle();
// r.area();
// Cuboid obj = new Cuboid(84,4,2);
Cuboid obj = new Cuboid(63,33,33);
// getters and Setters
// Rectangle r = new Rectangle();
// r.setLength(3);
// r.setBreadth(9);
//
// System.out.println(r.getLength());
// System.out.println(r.getBreadth());
}
}
kya bakwas code likha hai
@@Mr.AIAnukalpiss ko mene Execute bi kiya Sala Run he nahi hua
@@mirenayatali1257😂
Harry bhai ek dil dedo ❤️❤️❤️
yes sir i wii do
Present sir 👌🏻❤👌🏻👌🏻❤👌🏻❤
Sout(“brilliant harry bhai”);
I will calculate area and volume question number 2❤❤❤
Love u harry bhai ❤❤
I will calculate que 2 for sure...will try my best
U are working very hard sir for us.. thankyou❤️🥰🥰🥰
Thanks a lot sir 🔥 🔥 🔥 🔥
Thanks for your coursh
13:14
class Rectangle1{
private double length;
private double breadth;
Rectangle1(){
System.out.println("I am non param of Rectangle1");
}
Rectangle1(double l,double b){
System.out.println("I am Rectangle1 parameterized constructor");
this.length = l;
this.breadth = b;
}
public double getLength() {
return length;
}
public double getBreadth() {
return breadth;
}
public double area(){
return length * breadth;
}
}
class Cuboid1 extends Rectangle1{
private double height;
public double getHeight() {
return height;
}
Cuboid1(double l, double b, double h){
super(l,b);
System.out.println("I am Cuboid1 parameterized constructor");
this.height = h;
}
public double volume(){
return this.getLength() * this.getBreadth() * this.height;
}
}
public class AccessModifiersProbs {
public static void main(String[] args) {
// Cuboid1 obj = new Cuboid1(14,15,16);
// Rectangle1 objR = new Rectangle1(24,25);
Cuboid1 Cub = new Cuboid1(15,30,45);
}
}
The chapter 10 notes are missing , you've only uploaded the practice questions pdf . It would be very kind of you if you could provide us with the pdf of the notes as well . Thank you .
Yes
Yes
******ATTENTION ⚠******
JOIN CODEWITHHARRY FANCLUB GROUP ON FACEBOOK AND SHARE ALL VIDEOS OF HARRY BHAI, IT IS LIKE A GIFT TO HARRY BRO FROM US.
LET'S GO
(1 MILLION SUBSCRIBER CONGRATULATION PRESENT IN ADVANCE )
*****PLEASE DON'T IGNORE THIS *****
Bro PDF kaha milti h bta do mujhe mil nhi rhi please bhai
@@UTKARSHYADAV-im2tc description me link h
Harry bhaiya, sub class ke constructor mein print statement ke baad super keyword ka use kiya to print statement pehle run hoga ya super constructor pehle run hoga, 🤔 answer plz 🙏
Bhai code krke dekhle
Setup Tour Please ! ! ! 😁😁
Thx bhaiya 💙
@codewithharry please Data structure using java bhi course me add kr dena please .....🤗🙏
great questions
Loved this vdo bro plz make vdo on flutter
good video harry bhai
Will do for sure
questiob 2 answer;
class Rectangle {
public int radius;
public int length;
public int width;
Rectangle() {
System.out.println("I have nothing to say");
}
Rectangle(int w, int l) {
System.out.println("I am parameterized constructor");
this.length = l;
this.width = w;
}
public double perimeter() {
return 2 * (this.length + this.width);
}
public double area() {
return this.length * this.width;
}
}
class Cuboid extends Rectangle {
public int height;
Cuboid(int w, int l, int h) {
super(w,l);
System.out.println("I am parameterized constructor of Cuboid");
this.height = h;
}
public double volume() {
return this.length * this.width * this.height;
}
public double surfaceArea() {
return 2 * (this.length * this.width + this.length * this.height + this.width * this.height);
}
}
public class inheritancekysawal {
public static void main(String[] args) {
Cuboid bankia = new Cuboid(34, 37, 37);
System.out.println("Area of Rectangle: " + bankia.area());
System.out.println("Perimeter of Rectangle: " + bankia.perimeter());
System.out.println("Surface Area of Cuboid: " + bankia.surfaceArea());
System.out.println("Volume of Cuboid: " + bankia.volume());
}
}
0:11 , Q-1
class Circle_{
Circle_(){
System.out.println("Me Circle!");
}
}
class Clyender_ extends Circle_{
Clyender_(){
System.out.println("Me Clyender");
}
}
video 52 done 😊😊
14:38
I will solve it sir
Thank you🙏
Same
Thank you Harry sir 🎉..
I am doing timepass here, but not only doing timepass ✌✌
14:47 --> I will calculate area and volume of question number 2
14:48 I will calculate area and volume for question number 2
Was just watching your advanced python.
I Will Done It !!!
//Question no 2 & 4
//we can also small over code using only constructor;
class Rectangle{
int l;
int w;
Rectangle(int l, int w){
System.out.println("I'm the contructor of rectangle class");
}
public int getLength(){
return l;
}
public void setLength(int l){
this.l = l;
}
public int getWidth(){
return w;
}
public void setWidth(int w){
this.w = w;
}
public int areaOfRectangle(){
return l*w;
}
}
class Cuboid extends Rectangle {
int h;
int b;
Cuboid(int l , int w , int b , int h){
super(l,w);
System.out.println("I'm the overloaded contructor of Cuboid ");
}
public int getBreadth(){
return b;
}
public void setBredth(int b){
this.b = b;
}
public int getHeight(){
return h;
}
public void setHeight(int h){
this.h = h;
}
public int areaOfCUboid(){
return 2*l*b + 2*l*h + 2*h*w;
}
}
public class CWH_52_Inheritance_PracticeSet {
public static void main(String[] args) {
// cylinder c = new cylinder(4,5);
// System.out.println(c.volumeOfCylinder());
Cuboid a = new Cuboid(4,3 ,34,9);
a.setLength(4);
a.setWidth(3);
a.setHeight(9);
a.setBredth(34);
System.out.println(a.areaOfCUboid());
}
}
Thanks harry sir for this amazing course.
it working
@@NP_Targetor 😊😊
Harry bhai ek doubt clear kr do ,
Circle c = new cylinder (3) ;
Mai is trh se , Circle class ka constructor kyu nhi invoke kr skta ?
Great work sir!!
I will do it!
To see all the questions 0:50
yes i will calculate area and volume for question no 2
Question 1 and 3
class circle
{
float r ;
}
class cylinder extends circle
{
float h ;
double area , vol ;
void res()
{
area = 3.1*r*r ;
vol = 3.1*r*r*h ;
System.out.println(" Area and volume are ") ;
System.out.println(area) ;
System.out.println(vol) ;
}
}
public class Main
{
public static void main(String [] args)
{
cylinder k = new cylinder() ;
k.r = 1 ;
k.h = 1 ;
k.res() ;
}
}
14:43 yes bhaiya I will do it
Sir plzzz one video on object detection in python plzzzz 🙏🙏🙏
Thank You
I'm in java array element. And lo another video got uploaded 😂👍
😂
14.40 done sir.
answer bhjio bro. 4th ka
I will calculate area and volume for question 1 and 2
QUESTION 2 AND 4:
class RectangleR{
RectangleR(){
System.out.print("The perimeter of the Rectangle is: ");
}
public int length;
public int width;
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
RectangleR(int l , int w){
this.length = l; this.width = w;
}
public double perimeter(){
return 2* (this.length + this.width);
}
}
class Cuboid extends RectangleR{
public int height;
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
Cuboid(int l , int w , int h){
super(l,w);
this.height = h;
}
public double perimeter(){
return 4 * (this.length + this. width + this.height);
}
}
// UNDER MAIN FUNCTION
// PROBLEM 2 & 4:
RectangleR objR = new RectangleR();
objR.setLength(4); objR.setWidth(5);
System.out.println(objR.perimeter());
Cuboid Cuboid = new Cuboid(4,5,6);
System.out.println("Perimeter of Cuboid : " + Cuboid.perimeter());
}
}
perfect
14:42
I will calculate are & volume of question no. 2.
Sir Android ka one short hai Kya jese c kaa hai
kr diya bhai solve
waise to ma;um hai ki ab tum apna commrnt nhi dekhne wale ho, kya hi frk padta hoga ab 😅
but fir bhi effort bohot jyada ki hai aapna
Q.1 & Q.3 ------------------------> ( not used constructors only methods used )
import java.util.Random;
import java.util.Scanner;
class Circle {
public double r ;
public double areacr (double r) {
this.r =r ;
double ar = Math.PI * this.r * this.r ;
return ar ;
}
}
class Cylinder extends Circle {
public double h ;
public double areal (double r , double h) {
this.r = r;
this.h = h;
double al = (2 * Math.PI * this.r * h) + (2 * Math.PI * this.r * this.r);
return al ;
}
public double volumel (double r , double h) {
this.r = r;
this.h = h;
double vl = Math.PI * this.r * this.r * h ;
return vl ;
}
}
class Cone extends Circle {
public double l ;
public double arean (double r , double l) {
this.r = r;
this.l = l;
double an = Math.PI * r * ( r + (Math.sqrt((r*r) + (l*l)) ));
return an ;
}
public double volumen (double r , double l) {
this.r = r;
this.l = l;
double vn = Math.PI * this.r * this.r * l / 3 ;
return vn ;
}
}
public class Arrayss {
public static void main (String[]args) {
Cylinder l = new Cylinder();
double al = l.areal(3,5) ;
double vl = l.volumel(3,5) ;
System.out.println(al);
System.out.println(vl);
Cone n = new Cone();
double an = n.arean(3,5);
double vn = n.volumen(3,5);
Circle c1 = new Cone();
double x = c1.areacr(5);
System.out.println("ac=" + x);
Cone c2 = new Cone();
double y = c1.areacr(5);
System.out.println("ac=" + y);
System.out.println(an);
System.out.println(vn);
}
}
Extend karke inherit karte hai, and use object banake hi use karte hai, bina extend kiye bhi to use kar sakte hai object banake , so extends ka kya advantage hai, please answer bhaiya
thank you sir
Sir aapne jo Website bnai hui he usme jo Contect me ! Wala page he usme Submit ka button kaam nhi kar rha he pls check
Ha yrr
Bat to Shi h
Harry bhai data structures ko continue kro plzzzzzzz 🙏
i will calculate area and volume of the this one
@CodeWithHarry can you tell how can we access the in lectures code program
maan gaye guru ~May 12,2k21 (11:48 pm)
Solution of Q.2 and Q4 :) :)
↓
class rectangle {
public int length;
public int breadth;
rectangle() {
System.out.println("I am Default Constructor of rectangle");
}
rectangle(int length, int breadth) {
System.out.println("I am Parameterized Constructor of rectangle");
this.length = length;
this.breadth = breadth;
}
public void setlength(int length) {
this.length = length;
}
public void setbreadth(int breadth) {
this.breadth = breadth;
}
public int getlength() {
return length;
}
public int getbreadth() {
return breadth;
}
public int area() {
return length * breadth;
}
}
class Cuboid extends rectangle {
public int height;
Cuboid(int length, int breadth, int height) {
super(length, breadth);
System.out.println("I am Parameterized Constructor of Cuboid");
this.height = height;
}
public void setheight(int height) {
this.height = height;
}
public int getheight() {
return height;
}
public int Surfacearea() {
return 2 * length * breadth + 2 * breadth * height * +2 * length * height;
}
}
public class rectangle_Cuboid {
public static void main(String[] args) {
// rectangle r = new rectangle(3,2);
Cuboid c = new Cuboid(3, 2, 6);
c.setlength(3);
c.setbreadth(2);
c.setheight(6);
System.out.println(c.getlength());
System.out.println(c.getbreadth());
System.out.println(c.getheight());
// System.out.println(c.getlength() * c.getbreadth() * c.getheight());
System.out.println(c.Surfacearea());
}
}
If length is private then how we can pass the values
Harry brother how do you edit videos
Because your video is very nice
Create a full tutorial series on artificial intelligence
YES PLS MAKE
Make a complete tutorial on artificial intelligence
amazing...
harry bhai mera itellij idea par kisibhi file ke upar right click karne par "Run" ka option nhi dikha raha hai . bhai please mera problem solve kijiye . Right-click on a test class does not show the "run" options .
Harry bhai 👋👋
I will do it.
Hey dada, sbb notes 📝 ka pdf ek sath banao na plzz, 🤗🙏🏻🙏🏻
Mujhe bhi chaiye mil nhi rhi but
Hi Please Make a Full Beginner Tutorial of KIVY...
Make video on algo trading using ML
I had done this area and volume
i will calculate area and volume for question number 4
I will Calculate area and volume for Question 2
Chapter 10 notes are missing you have just uploaded the practise set of Chapter 10.
Please see......
And thanks for this course
harry bhai op
Any on face create breakpoint problem?
How to solve problem?
Make course on angullar.js and react.js
14:44 i will calculate area and volume for question 2. Sirf likha nahi hai, karunga bhi
Ques2 and Ques4:
class Rectangle{
public int length;
Rectangle(){
System.out.println("I am a non-parameterised constructor , I am called by default if there is no super class define");
}
Rectangle(int l, int b){
System.out.println(" I am parameterised constructor");
}
public int getLength() {
return length;
}
public int getBreadth() {
return breadth;
}
public int breadth;
public void setLength(int l){
this.length=l;
}
public void setBreadth(int b){
this.breadth =b;
}
public int Area(int l,int b){
return l*b;
}
}
class Cuboid extends Rectangle{
public int height;
Cuboid(int l, int b, int h){
super(l,b); /* calling parent class constructor with 2 parameter inside it. */
this.height=h;
System.out.println("this is sub class constructor");
}
public int Volume(){
return (2*(length)*breadth)+(2*height*breadth)+(2*length*height);
}
}
public class practice12 {
public static void main(String[] args) {
// Cylinder1 d=new Cylinder1(12,5);
// Circle c= new Circle();
// Rectangle r=new Rectangle(2,3);
Cuboid c= new Cuboid(2,3,4);
//setting length
c.setLength(2);
//setting breadth
c.setBreadth(3);
System.out.println(c.Volume());
}
}
Please do live sessions also because there are some topics which are not clear for us and there are many confusions also.
harry bhai please make a video over
const REQUEST = "how to host a website" ;