responsibilities for doing
Download
Skip this Video
Download Presentation
Responsibilities for Doing

Loading in 2 Seconds...

play fullscreen
1 / 29

Responsibilities for Doing - PowerPoint PPT Presentation


  • 79 Views
  • Uploaded on

Responsibilities for Doing. Verbs (actions) in problem statement keep relevant others from experience Assign each to a class who knows data? collaboration to access data Example computing final mark Student and MarkingScheme generate report Course and Student average

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Responsibilities for Doing' - gaetan


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
responsibilities for doing
Responsibilities for Doing
  • Verbs (actions) in problem statement
    • keep relevant
    • others from experience
  • Assign each to a class
    • who knows data?
    • collaboration to access data
  • Example
    • computing final mark
      • Student and MarkingScheme
    • generate report
      • Course and Student
    • average
      • Course and Student
  • CRC cards
architecture
Architecture
  • Main class
    • identified class or new
    • Course could be part of something larger
    • could have many applications involving a course
    • new class (FinalGrades)
  • Collaborations
    • who controls interaction?
      • i.e. which is client which is server
    • also relationships (analysis diagram)
  • Architectural plan
    • persistence
      • various applications access information over time
      • all classes except FinalGrades are persistent
    • sequential processing
      • process Students in order
detailed design
Detailed Design
  • Class design
    • responsibility for knowing
      • instance variables
    • responsibility for doing
      • methods
  • Interfaces
    • class specifications including method declarations
    • methods identified as “doing” in CRCs
    • accessor and updater methods
    • fill in parameter types
  • Generalization
    • design for future use
interfaces
Interfaces
  • Specification for classes
    • constants and method headers only
  • No implementation
    • cannot create objects of interface type
    • create objects of implementation classes
  • Defines a type
    • can declare variables of interface type
    • can assign objects of any implementation type
      • subtype
  • Can be compiled
    • can reference in other classes without an implementation
class design
Class Design
  • Interface Course
    • accessor methods
    • updater methods?
    • other methods
  • Interface Student
    • accessor methods
    • updater methods?
    • other methods
slide17
Interface MarkingScheme
    • accessor methods
    • updater methods
    • other methods
  • Interface Work
    • accessor methods
    • updater methods
    • other methods
coding
Coding
  • May be multiple applications in system
    • e.g. Student Records System
      • new course setup
      • mark entry
      • mark reporting
      • final grade computation with report*
  • Coding by programmers
    • responsible for a specific class
    • implementation can be done in any order
    • may discover new classes
      • support classes
      • GUIs and reports
slide19
Contract
    • interface provides specification
    • interfaces for other classes
      • collaborators – what can be used
  • Implementation Classes
    • implements clause
    • requirements
  • Instance variables
    • from “knowing” in CRCs
    • others as needed for implementation
  • Methods
    • as required by interface
    • additional support (local) methods
class markingschemeimpl
Class MarkingSchemeImpl
  • Persistent
  • Instance variables
  • Constructor
    • would be required for new course application
  • Identified methods
    • accessor/updater
    • apply
      • weighted sum
class studentimpl
Class StudentImpl
  • Persistent
  • Represents single student
  • Instance variables
  • Constructor
    • would be required for new course application
  • Identified methods
    • accessor/updater
    • calcFinalMark
      • delegates to MarkingScheme
    • update
      • for mark update application
class workimpl
Class WorkImpl
  • Persistent
  • Instance variables
  • Constructor
    • would be required for new course application
  • Identified methods
    • accessor/updater
class courseimpl
Class CourseImpl
  • Persistent
  • Instance variables
  • Constructor
    • would be required for new course application
  • Identified methods
    • accessor/updater
    • calcFinalGrades
      • report
        • report class
      • user feedback
        • marking scheme form
      • process each student
        • detail line
      • compute average
      • write summary
    • doUpdateMarks, doMarkReport
      • other applications
  • Discovered classes
    • FinalGradeRreport
    • MarkingSchemeForm
class finalgradereport
Class FinalGradeReport
  • Visibility
  • Report for final grades
  • Not persistent
  • Instance variables
  • Constructor
  • Methods
  • Local methods
class markingschemeform
Class MarkingSchemeForm
  • Visibility
  • GUI for marking scheme display
  • Not persistent
  • Instance variables
  • Constructor
    • builds form
  • Methods
  • Local Methods
main class finalgrades
Main class (FinalGrades)
  • Object creation
    • all persistent objects assumed to exist
    • read Course object
  • Confirmation
    • course form
  • Course object will be modified (average grade) so this is a file update (1 record)
    • write updated Course object (file)
  • Course object does work
  • User feedback
  • Discovered Classes
    • CourseForm
class courseform
Class CourseForm
  • Visibility
  • GUI for course information display
  • Not persistent
  • Instance variables
  • Constructor
    • builds form
  • Methods
  • Local Methods
testing
Testing
  • Class stubs
    • collaborator classes?
    • class stub implements same interface so is pluggable
    • method stubs
  • Test harness
    • replaces main class for testing
    • perform desired tests
      • test all methods and constructors
    • repeatable
  • Integration testing & system test
  • Test sets
    • sets of test data to test all possibilities
    • test ends of ranges
      • 0, 1 and other number of students
      • 0, full and other marks
    • predicted output
    • prepare ahead of time and keep on file
debugging production maintenance
Debugging, Production& Maintenance
  • Debugging
    • apply program to test data
    • when unexpected output, re-code, re-design and/or re-analyze
      • System.out.println
  • Production
    • when satisfies all tests, release to users
  • Maintenance
    • correction of errors found in field (hopefully few)
    • addition of new features
      • re-analyze etc.
    • change of specification
      • re-analyze etc.
ad