3. Model the person class by performing the following steps:
a. In the Logical View/Main class diagram, drop in a Package icon and label
it helloWorld.
b. Use the dependency tool to draw dependencies from helloWorld to the wt
and java packages.
c. Go to the Main diagram of the helloWorld package.
d. Drop on a class icon and give the class the name Item (the parent for
Person). Attributes and operations for Item automatically appear. Change
the diagram to suppress attributes and operations of Item. Ensure that the
Show Visibility option is on for Item (so you can see in the diagram that it
comes from the fc package).
e. Drop on another class icon and give it the name Person.
f. Make Person a subclass of Item. (Use the generalization icon/tool to draw
a line from Person to Item.)
g. Insert the attributes name, age, title, and id. Name, title, and id should be
strings (String) and age should be an integer (int). Use lowercase or a mix
of upper- and lowercase letters for these attributes; do not use all
uppercase letters.2 Right click to start the specification dialog. Make all
the attributes public and change the Windchill property of each to
constrain=false. Click the Apply button for each change and, when you
are done, click the OK button.
2.
a. In the Logical View/Main class diagram, drop in a Package icon and label
it helloWorld.
b. Use the dependency tool to draw dependencies from helloWorld to the wt
and java packages.
c. Go to the Main diagram of the helloWorld package.
d. Drop on a class icon and give the class the name Item (the parent for
Person). Attributes and operations for Item automatically appear. Change
the diagram to suppress attributes and operations of Item. Ensure that the
Show Visibility option is on for Item (so you can see in the diagram that it
comes from the fc package).
e. Drop on another class icon and give it the name Person.
f. Make Person a subclass of Item. (Use the generalization icon/tool to draw
a line from Person to Item.)
g. Insert the attributes name, age, title, and id. Name, title, and id should be
strings (String) and age should be an integer (int). Use lowercase or a mix
of upper- and lowercase letters for these attributes; do not use all
uppercase letters.2 Right click to start the specification dialog. Make all
the attributes public and change the Windchill property of each to
constrain=false. Click the Apply button for each change and, when you
are done, click the OK button.
2.
6729

被折叠的 条评论
为什么被折叠?



