Designing Classes

Description

HS Computer Science Slide Set on Designing Classes, created by Shannon Anderson-Rush on 25/10/2018.
Shannon Anderson-Rush
Slide Set by Shannon Anderson-Rush, updated more than 1 year ago
Shannon Anderson-Rush
Created by Shannon Anderson-Rush over 5 years ago
634
0

Resource summary

Slide 1

Slide 2

    A fundamental part of object-oriented software design is determining the classes that will contribute to the program. One way to identify potential classes is to identify the objects discussed in the program requirements. Objects are generally the nouns in a program description. Classes that represent objects should generally be given names that are singular nouns, such as Student, Dice, or Coin.

Slide 3

    Here are some helpful tips:
    During the design stage, classes and objects need to be identified Examine the program requirements Objects are generally nouns A class represents a group of objects with similar behavior For example, to represent products, we may need a class called Product Strike a good balance between classes that are too general and those that are too specific

Slide 4

    When designing classes, there are two pieces of information to take into consideration: State - how an object is represented Behavior - what an object does The state becomes the instance variables of an object. The behavior becomes the methods. When thinking about behavior, you should think about how others might want to use the object.
Show full summary Hide full summary

Similar

Computing Hardware - CPU and Memory
ollietablet123
SFDC App Builder 2
Parker Webb-Mitchell
Data Types
Jacob Sedore
Intake7 BIM L1
Stanley Chia
Software Processes
Nurul Aiman Abdu
Design Patterns
Erica Solum
CCNA Answers – CCNA Exam
Abdul Demir
Abstraction
Shannon Anderson-Rush
Spyware
Sam2
HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Data Analytics
anelvr