Responsibilities for doing
This presentation is the property of its rightful owner.
Sponsored Links
1 / 29

Responsibilities for Doing PowerPoint PPT Presentation


  • 46 Views
  • Uploaded on
  • Presentation posted in: General

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

Download Presentation

Responsibilities for Doing

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


Selecting candidate tasks

Selecting Candidate Tasks


Identified tasks

Identified Tasks


Course

Course


Markingscheme

MarkingScheme


Student

Student


Responsibilities for doing

Work


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


Analysis model

Analysis Model


Design model

Design Model


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


Responsibilities for doing

  • 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


Responsibilities for doing

  • 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.


  • Login