Designing Classes

Descrição

HS Computer Science Slides sobre Designing Classes, criado por Shannon Anderson-Rush em 25-10-2018.
Shannon Anderson-Rush
Slides por Shannon Anderson-Rush, atualizado more than 1 year ago
Shannon Anderson-Rush
Criado por Shannon Anderson-Rush mais de 5 anos atrás
634
0

Resumo de Recurso

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.

Semelhante

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