SlideShare uma empresa Scribd logo
1 de 8
Baixar para ler offline
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

Mais conteúdo relacionado

Semelhante a 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
 

Semelhante a 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
 

Último

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
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
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
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
 

Último (20)

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
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
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
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
 

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