- Project files
	- _Rectangle class
This commit is contained in:
HeshamTB 2020-09-09 23:07:10 +03:00
parent f4fa262bd9
commit 4a8354a474
Signed by: Hesham
GPG Key ID: 74876157D199B09E
6 changed files with 67 additions and 0 deletions

3
lab-02/.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

6
lab-02/.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
lab-02/.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/lab-02.iml" filepath="$PROJECT_DIR$/lab-02.iml" />
</modules>
</component>
</project>

6
lab-02/.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

11
lab-02/lab-02.iml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,33 @@
public class _Rectangle {
private double width;
private double height;
public _Rectangle(double w){
this.width = w;
}
public _Rectangle(double w, double h){
this.width = w;
this.height = h;
}
public double getArea(){
return this.height*this.width;
}
public void setWidth(double w){
this.width = w;
}
public void setHeight(double h){
this.height = h;
}
public double getWidth(){ return this.width; }
public double getHeight(){ return this.height; }
public String toString() {
return " ";//TODO: _Rectangle toString output format
}
}