SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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 .docxmonicafrancis71118
 
Quality Assurance and Software Testing
Quality Assurance and Software TestingQuality Assurance and Software Testing
Quality Assurance and Software Testingpingkapil
 
Programming II hiding, and .pdf
 Programming II hiding, and .pdf Programming II hiding, and .pdf
Programming II hiding, and .pdfaludin007
 
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.pdfamarhandi
 
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
 
Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7ashhadiqbal
 
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 181Mahmoud 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 umlsmumbahelp
 
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 examplesMani Deepak Choudhry
 
IRJET- American Sign Language Classification
IRJET- American Sign Language ClassificationIRJET- American Sign Language Classification
IRJET- American Sign Language ClassificationIRJET Journal
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignDr. C.V. Suresh Babu
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptxTekle12
 
SDLC models testing
SDLC models testingSDLC models testing
SDLC models testingJadavsejal
 
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 Kuwait10Kuwait10
 
Software testing introduction
Software testing introductionSoftware testing introduction
Software testing introductionSriman Eshwar
 
From use case to software architecture
From use case to software architectureFrom use case to software architecture
From use case to software architectureAhmad karawash
 
Devry CIS 247 Full Course Latest
Devry CIS 247 Full Course LatestDevry CIS 247 Full Course Latest
Devry CIS 247 Full Course LatestAtifkhilji
 

Ähnlich wie 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
 
SDLC models testing
SDLC models testingSDLC models testing
SDLC models testing
 
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
 

Kürzlich hochgeladen

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Kürzlich hochgeladen (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

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