Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
assessment 2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jinny.wilkin
assessment 2
Commits
7d98d415
Commit
7d98d415
authored
May 11, 2022
by
jinny.wilkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
incomplete upload1
parent
89aec285
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
Rectangle.java
Rectangle.java
+41
-0
No files found.
Rectangle.java
0 → 100644
View file @
7d98d415
public
class
Rectangle
extends
Shape
{
public
Square
()
{
super
();
}
public
Square
(
int
i
)
{
super
(
i
);
}
public
void
draw
(){
for
(
int
i
=
0
;
i
<=
size
+
1
;
i
++)
{
if
(
i
==
0
||
i
==
size
+
1
)
{
for
(
int
j
=
0
;
j
<
size
;
j
++)
{
System
.
out
.
print
(
"--"
);
}
System
.
out
.
println
(
""
);
//enter a new line
}
else
{
//else
for
(
int
j
=
0
;
j
<=
size
;
j
++)
{
if
(
j
==
0
||
j
==
size
-
1
)
{
System
.
out
.
print
(
"| "
);
}
else
{
System
.
out
.
print
(
" "
+
" "
);
}
}
System
.
out
.
println
(
""
);
//enter a new line
}
}
}
//@Override
public
float
area
()
{
float
fSize
=
size
;
float
area
=
fSize
*
fSize
;
return
area
;
}
//@Override
public
float
circumference
()
{
float
fSize
=
size
;
float
circ
=
fSize
+
fSize
+
fSize
+
fSize
;
return
circ
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment