مشاهدة "برمجة كيانية _جافا شرح انشاء كلاس واستدعائه بكلاس ثاني" على YouTube
https://youtu.be/qH52nZYcxhU
https://youtu.be/qH52nZYcxhU
YouTube
برمجة كيانية _جافا شرح انشاء كلاس واستدعائه بكلاس ثاني
OOP
JAVA PROGRAMMING
Ali Aqeel
كتبولي ملاحظاتكم بالتعليقات❤️❤️
JAVA PROGRAMMING
Ali Aqeel
كتبولي ملاحظاتكم بالتعليقات❤️❤️
مستند جديد 68.pdf
18.5 MB
بفضل الله وبعض من الطلاب (علي عقيل و دعاء سمير)على مساعده ببعض من المعلومات على مادة جافا سويت pdf وان شاء تستفادون منه واذه بيه اخطأ صحح الخطأ انت/انتي 🌸
التوفيق للجميع
التوفيق للجميع
package inhariretins;
public class Rectangiel {
private double length;
private double width;
public Rectangiel()
{
length=1;
width=1;
}
Rectangiel(double l, double w)
{
setdimetion(l,w);
}
public void setdimetion(double l, double w)
{
if(l>0)
length=l;
else
length=1;
if(w>0)
width=w;
else
width=1;
}
public double getlenth()
{
return length;
}
public double getwidth()
{
return width;
}
public double Area()
{
return length*width;
}
public double Perimeter()
{
return (length+width)*2;
}
public void print()
{
System.out.println(" Length : "+length+" \n widgth : "+width+" "
+ " \n area : "+Area()+" \n perimeter : "+Perimeter());
}
}
public class Rectangiel {
private double length;
private double width;
public Rectangiel()
{
length=1;
width=1;
}
Rectangiel(double l, double w)
{
setdimetion(l,w);
}
public void setdimetion(double l, double w)
{
if(l>0)
length=l;
else
length=1;
if(w>0)
width=w;
else
width=1;
}
public double getlenth()
{
return length;
}
public double getwidth()
{
return width;
}
public double Area()
{
return length*width;
}
public double Perimeter()
{
return (length+width)*2;
}
public void print()
{
System.out.println(" Length : "+length+" \n widgth : "+width+" "
+ " \n area : "+Area()+" \n perimeter : "+Perimeter());
}
}
package inhariretins;
public class Box extends Rectangiel {
private double higth;
public Box()
{
super();
higth=1;
}
public Box(double l ,double w, double h)
{
super(l,w);
if(h>0)
higth=h;
else
higth=1;
}
public double Area()
{
return Perimeter()*higth;
}
public double volum()
{
return super.Area()*higth;
}
public void print()
{
super.print();
System.out.println(" Area "+Area()+" valom "+volum());
}
}
public class Box extends Rectangiel {
private double higth;
public Box()
{
super();
higth=1;
}
public Box(double l ,double w, double h)
{
super(l,w);
if(h>0)
higth=h;
else
higth=1;
}
public double Area()
{
return Perimeter()*higth;
}
public double volum()
{
return super.Area()*higth;
}
public void print()
{
super.print();
System.out.println(" Area "+Area()+" valom "+volum());
}
}