UML Diagrams Shape (interface) + getPerimeter() : double + getArea(): double + getDetails() : void Triangle (implements Shape)| - sideA sint Circle (implements Shape) PI: float (final – 3.14) radius: int sideb sint sidec zint Rectangle (implements Shape) Square (implements Shape) - length : int - width : int is greater than width) (note that length side : int
UML Diagrams Shape (interface) + getPerimeter() : double + getArea(): double + getDetails() : void Triangle (implements Shape)| - sideA sint Circle (implements Shape) PI: float (final – 3.14) radius: int sideb sint sidec zint Rectangle (implements Shape) Square (implements Shape) - length : int - width : int is greater than width) (note that length side : int
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Java: Abstraction using Interface
![UML Diagrams
Shape (interface)
+ getPerimeter() : double
+ getArea() : double
+ getDetails() : void
Triangle (implements Shape)
Circle (implements Shape)
- sideA :int
- sideb :int
- sidec :int
PI : float (final - 3.14)
radius: int
Rectangle (implements Shape)
Square (implements Shape)
- length : int
- width : int is greater than width)
(note that length
- side : int](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F200eab8b-1555-4a19-b68b-e447df014971%2F07a643eb-e2e8-4c3a-913d-6536d7c4c73e%2Fqx7g44_processed.png&w=3840&q=75)
Transcribed Image Text:UML Diagrams
Shape (interface)
+ getPerimeter() : double
+ getArea() : double
+ getDetails() : void
Triangle (implements Shape)
Circle (implements Shape)
- sideA :int
- sideb :int
- sidec :int
PI : float (final - 3.14)
radius: int
Rectangle (implements Shape)
Square (implements Shape)
- length : int
- width : int is greater than width)
(note that length
- side : int
![Create a program that will String input.
Based on the number of inputs, the
program will decide what shape it is. (1
input
rectangle, 3 inputs - triangle). The program
will then display the shape type, details,
circle, 2 inputs
square or
perimeter and area.
Justines-MacBook-Pro:classes Justines java -jar Shape.jar 15
Type: Circle
Radius: 15
Perimeter: 94.2
Area: 706.5
Justines-MacBook-Pro:classes Justines java -jar Shape. jar 1z 24
Type: Rectangle
Length: 24
Width: 12
Perimeter: 72.0
Area: 288.0
Justines-MacBook-Pro:classes Justines java -jar Shape.jar 12 12
Type: Square
Side: 12
Perimeter: 48.e
Area: 144.0
Justines-MacBook-Pro:classes Justines java -jar Shape.jar 9 15 12
Type: Triangle
Sides: 9, 15, 12
Perimeter: 36.0
Area: 54.0
Justines-MacBook-Pro:classes Justines java -jar Shape. jar 9 15 12 8
Invalid input
Java File Layout
Shape/
E classes
E Circle.class
E Rectangle.class
E Shape.class
E Shape.jar
E Square.class
E TestShape.class
Triangle.class
manifest.txt
src
E Circle.java
E Rectangle. java
E Shape. java
E Square.java
E TestShape.java
- Triangle.java
2 directories, 14 files](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F200eab8b-1555-4a19-b68b-e447df014971%2F07a643eb-e2e8-4c3a-913d-6536d7c4c73e%2Fx8q27px_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Create a program that will String input.
Based on the number of inputs, the
program will decide what shape it is. (1
input
rectangle, 3 inputs - triangle). The program
will then display the shape type, details,
circle, 2 inputs
square or
perimeter and area.
Justines-MacBook-Pro:classes Justines java -jar Shape.jar 15
Type: Circle
Radius: 15
Perimeter: 94.2
Area: 706.5
Justines-MacBook-Pro:classes Justines java -jar Shape. jar 1z 24
Type: Rectangle
Length: 24
Width: 12
Perimeter: 72.0
Area: 288.0
Justines-MacBook-Pro:classes Justines java -jar Shape.jar 12 12
Type: Square
Side: 12
Perimeter: 48.e
Area: 144.0
Justines-MacBook-Pro:classes Justines java -jar Shape.jar 9 15 12
Type: Triangle
Sides: 9, 15, 12
Perimeter: 36.0
Area: 54.0
Justines-MacBook-Pro:classes Justines java -jar Shape. jar 9 15 12 8
Invalid input
Java File Layout
Shape/
E classes
E Circle.class
E Rectangle.class
E Shape.class
E Shape.jar
E Square.class
E TestShape.class
Triangle.class
manifest.txt
src
E Circle.java
E Rectangle. java
E Shape. java
E Square.java
E TestShape.java
- Triangle.java
2 directories, 14 files
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 7 steps with 11 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY