Exam Review - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Exam Review

Description:

Exam Review. by. Broc Miramontes. Arion Clarke. Object Oriented Design. Candidate Classes ... Description: Calculates the overall GPA from the current transcript using ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 26
Provided by: arionc
Category:
Tags: arion | exam | review

less

Transcript and Presenter's Notes

Title: Exam Review


1
Exam Review
  • byBroc Miramontes
  • Arion Clarke

2
Object Oriented Design
  • Candidate Classes
  • Decide on Classes
  • UML Diagram

3
Candidate Classes
  • GPA
  • Transcript
  • Student
  • DB
  • Grade
  • Course
  • Term

4
Decide on Classes
  • GPA ???
  • Transcript
  • Grade
  • Course
  • Term

5
GPA Decision
  • BigDecimal
  • String
  • Float
  • Int

6
UML Diagram
7
Five Sample Functions
  • Transcript.calculateOverallGPA()
  • Transcript.calculateMajorGPA()
  • Term.calulateTermGPA()
  • Transcript.isRepeatCourse(Course)
  • Grade.convertGradeToPoints()

8
Functions Specifications
  • Transcript.calculateOverallGPA()
  • Description Calculates the overall GPA from the
    current transcript using totalUnits and
    totalGradePoints.
  • Precondition None
  • PostConditions Returns the overall GPA as a
    java.math.BigDecimal.
  • Transcript.calculateMajorGPA()
  • Description Calculates the major GPA from the
    current transcript using totalMajorUnits and
    totalMajorGradePoints.
  • Precondition None
  • PostConditions Returns the major GPA as a
    java.math.BigDecimal.

9
Functions Specifications
  • Term.calulateTermGPA()
  • Description Calculates the term GPA from the
    current transcript using totalTermUnits and
    totalTermGradePoints.
  • Precondition None
  • PostConditions Returns the term GPA as a
    java.math.BigDecimal.
  • Transcript.isRepeatCourse(Course)
  • Description Is passed a course and checks to see
    if the course is repeated in the current
    transcript.
  • Precondition None
  • PostConditions Returns a boolean value of true
    if the course was repeated otherwise it returns
    false.

10
Functions Specifications
  • Grade.convertGradeToPoints()
  • Description Takes a grade and uses metadata to
    get the points that grade corresponds
    to.Examplenew Grade(A-).convertGradeToPoints(
    )returns 3.700
  • Precondition None
  • PostConditions Returns the points as a
    java.math.BigDecimal.

11
Unit Test
  • Unit Testing of Transcript.isRepeatCourse

12
Structural Design
  • Tasks/Use Cases
  • Verb Phrases
  • Functions

13
Tasks/Use Cases
  • Calculate overall GPA
  • Calculate major GPA
  • Calculate term GPA

14
Verb Phrases
  • count total units
  • sum total grade points
  • divide the grade points by total units
  • count major units
  • sum major grade points
  • divide the major grade points by total major
    units
  • count term units
  • sum term grade points
  • divide the term grade points by term units

15
Functions
  • calcGPA()
  • countTotalUnits()
  • sumTotalGradePoints()
  • countMajorUnits()
  • sumMajorGradePoints()
  • countTermUnits()
  • sumTermGradePoints()
  • intializeCourseArray()
  • roundIntToTensPlace()

16
structure
  • struct Course
  • char name30
  • char grade10
  • unsigned int points
  • bool majorCourse

17
ADT
18
Structural Diagram Design
19
Five Sample Functions
  • int countTotalUnits(Course )
  • unsigned int sumTotalGradePoints(Course )
  • unsigned int calcGPA(unsigned int gradePoints,
    int units)
  • int countMajorUnits(Course )
  • unsigned int sumMajorGradePoints(Course )

20
Functions Specifications
  • int countTotalUnits(Course )
  • Description countTotalUnits will go through the
    two dimensional Course array and add up all the
    units.
  • Precondition intializeCourseArray() has been
    called.
  • PostConditions Returns the total amount of units
    found.
  • unsigned int sumTotalGradePoints(Course )
  • Description sumTotalGradePoints will go through
    the two dimensional Course array and add up all
    the grade points.
  • Precondition intializeCourseArray() has been
    called.
  • PostConditions Returns the total amount of grade
    points.

21
Functions Specifications
  • unsigned int calcGPA(unsigned int
    gradePoints, int units)
  • Description calcGPA() divides gradePoints by
    units.
  • Precondition units gt 0
  • PostConditions Returns a weighted int
    corresponding to the overall GPA.
  • int countMajorUnits(Course )
  • Description countMajorUnits() will go through
    the two dimensional Course array and add up all
    the major units
  • Precondition intializeCourseArray() has been
    called.
  • PostConditions Returns the total amount of major
    units found.

22
Functions Specifications
  • unsigned int sumMajorGradePoints(Course )
  • Description sumMajorGradePoints will go through
    the two dimensional Course array and add up all
    the major grade points.
  • Precondition intializeCourseArray() has been
    called.
  • PostConditions Returns the total amount of
    weighted major grade points.

23
Unit Test
  • Unit Testing of unsigned int calcGPA(unsigned int
    gradePoints, int units)

24
Metadata
  • Major classes per major, based on school
  • Grade points per grade, based on school

25
System Tests
Write a Comment
User Comments (0)
About PowerShow.com