SlideShare a Scribd company logo
Lab 2




Analyzing a Problem and Designing a
Solution


Objectives
             Upon completion of this lab, you should be able to:
             ●      Complete Review Questions
             ●      Analyze a problem using object-oriented analysis (OOA)
             ●      Design classes from which objects will be created




                                                                                                   2-1
             Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
Lab Overview


Lab Overview
               In this lab, you complete review questions and two exercises.

               The exercises are:
               ●     List the objects, attributes, and operations in a sample problem
                     domain
               ●     Model an object using an UML-like notation




2-2                Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
Completing Review Questions

Completing Review Questions
         Complete the following questions:
          1.    Which of the following terms refers to the scope of a problem or a
                system:
                a.      The problem context
                b.      The problem domain
                c.      The system context
                d.      The problem area
          2.    Which of the following terms represents two different characteristics
                of an object:
                a.      Methods and operations
                b.      The problem domain
                c.      Attributes and operations
                d.      Variables and data
          3.    Which of the following statements is a criteria to test the validity of
                an object relative to a problem domain:
                a.      Relevance to the problem domain
                b.      Operation order
                c.      Attribute type
                d.      If a class has a super class
          4.    Which of the following statements are true:
                a.      A class is an instance of an object.
                b.      An object is a blueprint for a class.
                c.      An object and a class are exactly the same.
                d.      An object is an instance of a class.
                e.      An attribute cannot be a reference to another object.




         Analyzing a Problem and Designing a Solution                                            2-3
         Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
Exercise 1: Analyzing a Problem Domain


Exercise 1: Analyzing a Problem Domain
                This exercise is based on a small case study. You will identify the objects,
                their attributes and operations involved in the system domain.


         Preparation
                Read the following case study, and then model the system by choosing
                objects and their attributes and operations.

                Case Study

                A soccer league has many players. Each year there are three seasons and
                the league puts together teams for each season. Each team is comprised of
                15 players. The goals scored by each player during each season are
                tracked. The games played between the teams, their final scores, and each
                team’s standings based on its won and lost games are tracked.


         Task – Performing an Analysis
                Your task is to produce an object-oriented analysis for a Java technology
                application that tracks soccer scores. The program should track:
                ●      The list of players on each team
                ●      The number of goals that each player scores
                ●      The games played during a season, including the teams that play
                       each other, and the final score

                The application should be able to generate statistics for teams, players,
                and seasons.

                To finalize the analysis, complete the following steps:
                1.     Create a list of the potential objects.
                2.     Apply the rules in this module to decide if all your objects are valid.
                3.     Create a list of attributes and operations for each of your objects.




2-4                  Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
Exercise 1: Analyzing a Problem Domain

Notes




        Analyzing a Problem and Designing a Solution                                          2-5
        Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
Exercise 2: Designing a Solution


Exercise 2: Designing a Solution
                 In this exercise you will use UML notation to represent a class.


          Task – Producing a Design
                 Your task is to produce a design for each of the classes in the earlier
                 system for tracking soccer scores. Remember to:
                 ●     Use short-hand to name your classes, attribute variables, and
                       methods
                 ●     Identify a valid range of values for each attribute (where a range is
                       known)
                 ●     Use the parentheses to identify methods




2-6                  Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
Exercise 2: Designing a Solution

Notes




        Analyzing a Problem and Designing a Solution                                              2-7
        Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
Exercise Summary


Exercise Summary
              Take a few minutes to identify what experiences, issues, or discoveries
              you had during the lab exercises.
              ●      Experiences
              ●      Interpretations
              ●      Conclusions
              ●      Applications




2-8                Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

More Related Content

Similar to Wj 1101-se6-lab2

1 Student Name Submission Date DBST 667 .docx
1 Student Name   Submission Date   DBST 667 .docx1 Student Name   Submission Date   DBST 667 .docx
1 Student Name Submission Date DBST 667 .docx
monicafrancis71118
 
Quality Assurance and Software Testing
Quality Assurance and Software TestingQuality Assurance and Software Testing
Quality Assurance and Software Testing
pingkapil
 
Programming II hiding, and .pdf
 Programming II hiding, and .pdf Programming II hiding, and .pdf
Programming II hiding, and .pdf
aludin007
 
Assignment 4- Implementing a Banking Application Due See course shel.pdf
 Assignment 4- Implementing a Banking Application Due See course shel.pdf Assignment 4- Implementing a Banking Application Due See course shel.pdf
Assignment 4- Implementing a Banking Application Due See course shel.pdf
amarhandi
 
Applying UML and Patterns (CH1, 6, 9, 10)
Applying UML and Patterns (CH1, 6, 9, 10)Applying UML and Patterns (CH1, 6, 9, 10)
Applying UML and Patterns (CH1, 6, 9, 10)
Jamie (Taka) Wang
 
Ch05lect1 ud
Ch05lect1 udCh05lect1 ud
Ch05lect1 ud
Ahmet Balkan
 
Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7
ashhadiqbal
 
The Ring programming language version 1.5.2 book - Part 69 of 181
The Ring programming language version 1.5.2 book - Part 69 of 181The Ring programming language version 1.5.2 book - Part 69 of 181
The Ring programming language version 1.5.2 book - Part 69 of 181
Mahmoud Samir Fayed
 
Mc0083 object oriented analysis & design using uml
Mc0083 object oriented analysis & design using umlMc0083 object oriented analysis & design using uml
Mc0083 object oriented analysis & design using uml
smumbahelp
 
Bank questions
Bank questionsBank questions
Bank questions
Ahmad sohail Kakar
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examples
Mani Deepak Choudhry
 
IRJET- American Sign Language Classification
IRJET- American Sign Language ClassificationIRJET- American Sign Language Classification
IRJET- American Sign Language Classification
IRJET Journal
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
Dr. C.V. Suresh Babu
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
Tekle12
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
Kuwait10
 
Software testing introduction
Software testing introductionSoftware testing introduction
Software testing introduction
Sriman Eshwar
 
From use case to software architecture
From use case to software architectureFrom use case to software architecture
From use case to software architecture
Ahmad karawash
 
Devry CIS 247 Full Course Latest
Devry CIS 247 Full Course LatestDevry CIS 247 Full Course Latest
Devry CIS 247 Full Course Latest
Atifkhilji
 
3Requirements.ppt
3Requirements.ppt3Requirements.ppt
3Requirements.ppt
KUMKUMOKUSSIA
 
Agile & Iconix sdlc
Agile & Iconix sdlcAgile & Iconix sdlc
Agile & Iconix sdlc
Ahmed Nehad
 

Similar to Wj 1101-se6-lab2 (20)

1 Student Name Submission Date DBST 667 .docx
1 Student Name   Submission Date   DBST 667 .docx1 Student Name   Submission Date   DBST 667 .docx
1 Student Name Submission Date DBST 667 .docx
 
Quality Assurance and Software Testing
Quality Assurance and Software TestingQuality Assurance and Software Testing
Quality Assurance and Software Testing
 
Programming II hiding, and .pdf
 Programming II hiding, and .pdf Programming II hiding, and .pdf
Programming II hiding, and .pdf
 
Assignment 4- Implementing a Banking Application Due See course shel.pdf
 Assignment 4- Implementing a Banking Application Due See course shel.pdf Assignment 4- Implementing a Banking Application Due See course shel.pdf
Assignment 4- Implementing a Banking Application Due See course shel.pdf
 
Applying UML and Patterns (CH1, 6, 9, 10)
Applying UML and Patterns (CH1, 6, 9, 10)Applying UML and Patterns (CH1, 6, 9, 10)
Applying UML and Patterns (CH1, 6, 9, 10)
 
Ch05lect1 ud
Ch05lect1 udCh05lect1 ud
Ch05lect1 ud
 
Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7
 
The Ring programming language version 1.5.2 book - Part 69 of 181
The Ring programming language version 1.5.2 book - Part 69 of 181The Ring programming language version 1.5.2 book - Part 69 of 181
The Ring programming language version 1.5.2 book - Part 69 of 181
 
Mc0083 object oriented analysis & design using uml
Mc0083 object oriented analysis & design using umlMc0083 object oriented analysis & design using uml
Mc0083 object oriented analysis & design using uml
 
Bank questions
Bank questionsBank questions
Bank questions
 
types of testing with descriptions and examples
types of testing with descriptions and examplestypes of testing with descriptions and examples
types of testing with descriptions and examples
 
IRJET- American Sign Language Classification
IRJET- American Sign Language ClassificationIRJET- American Sign Language Classification
IRJET- American Sign Language Classification
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
 
Software testing introduction
Software testing introductionSoftware testing introduction
Software testing introduction
 
From use case to software architecture
From use case to software architectureFrom use case to software architecture
From use case to software architecture
 
Devry CIS 247 Full Course Latest
Devry CIS 247 Full Course LatestDevry CIS 247 Full Course Latest
Devry CIS 247 Full Course Latest
 
3Requirements.ppt
3Requirements.ppt3Requirements.ppt
3Requirements.ppt
 
Agile & Iconix sdlc
Agile & Iconix sdlcAgile & Iconix sdlc
Agile & Iconix sdlc
 

Recently uploaded

Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Leena Ghag-Sakpal
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
spdendr
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 

Recently uploaded (20)

Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 

Wj 1101-se6-lab2

  • 1. Lab 2 Analyzing a Problem and Designing a Solution Objectives Upon completion of this lab, you should be able to: ● Complete Review Questions ● Analyze a problem using object-oriented analysis (OOA) ● Design classes from which objects will be created 2-1 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
  • 2. Lab Overview Lab Overview In this lab, you complete review questions and two exercises. The exercises are: ● List the objects, attributes, and operations in a sample problem domain ● Model an object using an UML-like notation 2-2 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
  • 3. Completing Review Questions Completing Review Questions Complete the following questions: 1. Which of the following terms refers to the scope of a problem or a system: a. The problem context b. The problem domain c. The system context d. The problem area 2. Which of the following terms represents two different characteristics of an object: a. Methods and operations b. The problem domain c. Attributes and operations d. Variables and data 3. Which of the following statements is a criteria to test the validity of an object relative to a problem domain: a. Relevance to the problem domain b. Operation order c. Attribute type d. If a class has a super class 4. Which of the following statements are true: a. A class is an instance of an object. b. An object is a blueprint for a class. c. An object and a class are exactly the same. d. An object is an instance of a class. e. An attribute cannot be a reference to another object. Analyzing a Problem and Designing a Solution 2-3 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
  • 4. Exercise 1: Analyzing a Problem Domain Exercise 1: Analyzing a Problem Domain This exercise is based on a small case study. You will identify the objects, their attributes and operations involved in the system domain. Preparation Read the following case study, and then model the system by choosing objects and their attributes and operations. Case Study A soccer league has many players. Each year there are three seasons and the league puts together teams for each season. Each team is comprised of 15 players. The goals scored by each player during each season are tracked. The games played between the teams, their final scores, and each team’s standings based on its won and lost games are tracked. Task – Performing an Analysis Your task is to produce an object-oriented analysis for a Java technology application that tracks soccer scores. The program should track: ● The list of players on each team ● The number of goals that each player scores ● The games played during a season, including the teams that play each other, and the final score The application should be able to generate statistics for teams, players, and seasons. To finalize the analysis, complete the following steps: 1. Create a list of the potential objects. 2. Apply the rules in this module to decide if all your objects are valid. 3. Create a list of attributes and operations for each of your objects. 2-4 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
  • 5. Exercise 1: Analyzing a Problem Domain Notes Analyzing a Problem and Designing a Solution 2-5 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
  • 6. Exercise 2: Designing a Solution Exercise 2: Designing a Solution In this exercise you will use UML notation to represent a class. Task – Producing a Design Your task is to produce a design for each of the classes in the earlier system for tracking soccer scores. Remember to: ● Use short-hand to name your classes, attribute variables, and methods ● Identify a valid range of values for each attribute (where a range is known) ● Use the parentheses to identify methods 2-6 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
  • 7. Exercise 2: Designing a Solution Notes Analyzing a Problem and Designing a Solution 2-7 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A
  • 8. Exercise Summary Exercise Summary Take a few minutes to identify what experiences, issues, or discoveries you had during the lab exercises. ● Experiences ● Interpretations ● Conclusions ● Applications 2-8 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A