lab8 finished

This commit is contained in:
2022-04-17 11:41:41 +08:00
parent fdb4e8296d
commit cea6585033
43 changed files with 2645 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/**
* Answers the question.
*
* Question3:
*
* - Q: What is the problem with the resize method of the Shape calss? How do
* you solve this problem?
*
* - A: The resize method of the Dot class is inherited from the Shape class.
* which does not have a throw Exception declared. We can solve this problem by
* declaring the resize method in the Shape class as a throw Exception.
*
* - Q: Do you need to change the resize method of the Circle class then?
*
* - A: No, we do not need to change the resize method of the Circle class.
*/
public class Start {
public static void main(String[] args) {
Shape.testShape();
Circle.testCircle();
Dot.testDot();
}
}