300144 Object Oriented Analysis 300888 Object Oriented Analysis (Advanced)
Tutorial 2 – UML (Week 3)
Student Name: ______________________________________ Student ID: ______________________________________ Tutorial Class: ______________________________________
Instructions to students –
• Attempt all questions
• This Tutorial will contribute to your final assessment mark
• The Tutor will check your solutions when you are finished
• OOA (Adv.) students need to complete optional questions.
Project Work:
1. Students should now be working in groups with 3~5 members. Contact your tutor(s) and/or lecturer if you have not joined any groups yet.
2. UML-based CASE tools (Microsoft VISIO) should be available in all CDMS computer laboratories. You can download this software (any versions in recent years) in your own computers. Besides, some other similar software is available on the Internet.
3. Before starting your project by using the CASE tool, you need familiarise yourself with the software. Start MS VISIO and try to create some of the UML diagrams as given in the list: Use case, Activity, Class, Sequence, Interaction Overview, Communication, Object, State Machine, Composite Structure, Component, Deployment, and Package.*
4. Experiment with saving and opening diagrams that you have created. Please be advised that most of the practical works in following weeks of this semester are related to the project. Thus you need to save your weekly work appropriately.
* There is no requirement for correctness at this stage of the project work as this is just a practice to familiarise yourselves with the tool.
Tutorial Exercises:
1. List at least 5 UML diagrams. Briefly explain nature and basics of these UML diagrams.
2. List all UML diagrams that are dynamic-behavioural in nature. Explain your answer. (When there are conflicts from different resources, trust lecture notes/textbook)
3. List three static-structural diagrams.
4. Which UML diagrams are important from a business analyst’s point of view? What diagrams do you think you should use for this unit project? Explain your answer.
5. Which UML diagrams are important from a designer’s point of view? Explain your answer.
6. (Optional) List UML diagrams that you would consider most valuable for models in the background modelling space.
7. (Optional) Compile and run the following java program.
Can we change the access specifier for the three instance variables (studentID, studentName and schoolName) of WSU_Student from protected to private without any other changes of the program? Explain your answer.
abstract class WSU_Student { protected String studentID; protected String studentName; protected String schoolName;
WSU_Student (String sid, String name, String school) {
studentID = sid; studentName = name; schoolName = school;
}
abstract String setCourse (String courseCode); abstract void displayStudent();
}
class ICT_Student extends WSU_Student { private String courseCode;
ICT_Student (String sid, String name, String school, String course) {
super(sid, name, school);
courseCode = setCourse(course); }
String setCourse(String course) {
return course; }
void displayStudent() {
System.out.println(“\n”+this.studentID+”\n”+this.studentName+”\n”+ this.schoolName+”\n”+this.courseCode+”\n”);
} }
class RegisterStudent {
public static void main(String[] args) {
WSU_Student oneStudent = new ICT_Student(“12345678”, “Tom Smith”, “SCEM”, “3639”);
oneStudent.displayStudent(); }
}