Agile2011 Object Card
-
Upload
tsuyoshi-ushio -
Category
Technology
-
view
984 -
download
0
description
Transcript of Agile2011 Object Card
![Page 1: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/1.jpg)
S.A. �
Java�
Execute the class that has the first parameter name.�
Step-0 1 / 49
![Page 2: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/2.jpg)
S.A. �
Manager�Represent a manager�
Execute ・instantiate(new) Singer � with the data “name =� Michael height = 5.5” � ・command him to sing � ・command him to dance �
Step-0
Singer: michael
2 / 49
Note: This class can be executed without instantiate.
![Page 3: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/3.jpg)
S.A. �
Singer�Singer Role�
Manage “name”�Manage “height”�sing � ・Display “(name) is singing.”�
dance � ・Display “(name) is dancing.��
Step-0
name
height
3 / 49
![Page 4: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/4.jpg)
S.A. �
1:Singer�Singer Role�
Manage “name”�Manage “height”�sing � ・Display “(name) is singing.”�
dance � ・Display “(name) is dancing.��
Step-0
name
height
4 / 49
![Page 5: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/5.jpg)
S.A. �
Screen �
Step-0,1,2 5 / 49
![Page 6: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/6.jpg)
S.A. �
Java�
Execute the class that has the first parameter name and pass the other parameters.
If you’ll get an Runtime Exception,
catch it and show the message of it.
Step-1 Step-1,2 6 / 49
![Page 7: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/7.jpg)
S.A. �
President�Represent a president�
Execute � ・instantiate(new) Employee � Factory �
・Get an Employee from � EmployeeFactory with the � second parameter.�
・Command Employee to � standup�
Step-1 Step-1
Note: This class can be executed without instantiate.
Employee factory : factory
Employee : employee
7 / 49
![Page 8: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/8.jpg)
S.A. �
EmployeeFactory�Role: instantiate Employees�
Return an Employee
・If you get “new”, instantiate� (new) BrandNewEmployee and � return it.��
・If you get “mid”, � instantiate (new) � MidLevelEmployee and � return it.�
・If you get “exp”,� instantiate (new) � ExperiencedEmployee and � return it.�
If there is no proper Employee, set “No such a title employee.” to RuntimeException and throw it.�
Step-1,2 8 / 49
![Page 9: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/9.jpg)
S.A. �
1:EmployeeFactory�Role: instantiate Employees�
If there is no proper Employee, set “No such title employee.” to RuntimeException and throw it.�
Step-1,2 9 / 49
Return an Employee
・If you get “new”, instantiate� (new) BrandNewEmployee and � return it.�
・If you get “mid”, � instantiate (new) � MidLevelEmployee and � return it.�
・If you get “exp”,� instantiate (new) � ExperiencedEmployee and � return it. �
![Page 10: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/10.jpg)
S.A. �
Employee�Represent an Employee�
standup�
Step-1 10 / 49
![Page 11: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/11.jpg)
S.A. �
BrandNewEmployee(Employee)�
Represent a brand new Employee�standup� ・display “A brand new � employee normally stands � up!” �
Step-1 11 / 49
![Page 12: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/12.jpg)
S.A. �
MidLevelEmployee(Employee)�
Represent a mid-level Employee�standup� ・display “A mid-level � employee quickly � stands up!” �
Step-1 12 / 49
![Page 13: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/13.jpg)
S.A. �
ExperiencedEmployee(Employee)�
Represent an experienced Employee�standup� ・display “A experienced� employee slowly stands up!” �
Step-1 13 / 49
![Page 14: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/14.jpg)
S.A. �
2:BrandNewEmployee(Employee)�
Represent a brand new Employee�standup� ・display “A brand new � employee normally � stands up!” �
Step-1 14 / 49
![Page 15: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/15.jpg)
S.A. �
3:MidLevelEmployee(Employee)�
Represent a mid-level Employee�standup� ・display “A mid-level� employee quickly � stands up!” �
Step-1 15 / 49
![Page 16: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/16.jpg)
S.A. �
4:ExperiencedEmployee(Employee)�
Represent a Manager Employee�
standup� ・display “A experienced� employee slowly stands up!” �
Step-1 16 / 49
![Page 17: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/17.jpg)
S.A. �
RuntimeException(Exception)�Represent Runtime Exception�
Step-2
Manage “error message” �
17 / 49
Error message
![Page 18: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/18.jpg)
S.A. �
President�Represent a president�
Execute � ・instantiate(new) Employee � Factory. �
・Get an Employee from � EmployeeFactory with the � second parameter.�
・Command Employee to � standup.�
・Pass Employee the third � parameter as a base salary.�
・ask(get) salary from Employee �
・Display “Employee’s salary is � (salary) yen.”�
Step-2
Note: This class can be executed without instantiate.
Employee factory : factory
Employee : employee
18 / 49
![Page 19: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/19.jpg)
S.A. �
Employee�Represent an Employee�
standup
manage “baseSalary” getSalary�
Step-1 19 / 49
base salary
![Page 20: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/20.jpg)
S.A. �
BrandNewEmployee(Employee)�
Represent a brand new Employee�standup� ・display “A brand new � employee normally � stands up!” �
Step-1 20 / 49
getSalary ・return baseSalary as salary �
![Page 21: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/21.jpg)
S.A. �
MidLevelEmployee(Employee)�
Represent a mid-level Employee�standup� ・display “A mid-level � employee quickly � stands up!” �
Step-1 21 / 49
getSalary ・return baseSalary x 2 + 1� as salary �
![Page 22: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/22.jpg)
S.A. �
ExperiencedEmployee(Employee)�
Represent an experienced Employee�standup� ・display “an experienced � employee quickly stands up!” �
Step-1 22 / 49
getSalary ・return baseSalary x 3� as salary �
![Page 23: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/23.jpg)
S.A. �
2:BrandNewEmployee(Employee)�
Represent a brand new Employee�standup� ・display “A brand new � employee normally � stands up!” �
Step-1 23 / 49
getSalary ・return baseSalary as salary �
base salary Manage “baseSalary”�
![Page 24: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/24.jpg)
S.A. �
3:MidLevelEmployee(Employee)�
Represent a mid-level Employee�standup� ・display “A mid-level � employee quickly � stands up!” �
Step-1 24 / 49
getSalary ・return baseSalary x 2 + 1� as salary �
base salary Manage “baseSalary”�
![Page 25: Agile2011 Object Card](https://reader034.fdocuments.us/reader034/viewer/2022051816/5456f72daf79592b448b5007/html5/thumbnails/25.jpg)
S.A. �
4:ExperiencedEmployee(Employee)�
Represent an experienced Employee�standup� ・display “an experienced � employee quickly stands up!” �
Step-1 25 / 49
getSalary ・return baseSalary x 3� as salary �
base salary Manage “baseSalary”�