[GA3001 OOP] Week2 & Week3


Hi again. These two weeks we need to master the following concepts. Please read them carefully and read all the readings associated with each concept.

Coding Concepts:

A variable by definition is an identifier pointing to a storage location in memory, which contains its value

  • int
  • bool
  • string

Variables

Adding properties to a class

C# Application with Visual Studio: Reading Materials: walkthrough: Create a Simple Application with Visual C# or Visual Basic

  • Console Application
  • Namespace
  • The Program Class
  • The System Name Space
  • The Using statement

Object Orients Concepts:

A method is a code block that contains a series of statements. A program causes the statements to be executed by calling the method and specifying any required method arguments.

Read this: Adding methods to a class

  • Properties

A property is a member that provides a flexible mechanism to read, write, or compute the value of a private field. Properties can be used as if they are public data members, but they are actually special methods called accessors. This enables data to be accessed easily and still helps promote the safety and flexibility of methods.

Design Concepts:
  • Code Separation

Separation of concerns (SoC) is a design principle for separating a computer program into distinct sections, such that each section addresses a separate concern. A concern is a set of information that affects the code of a computer program. A program that embodies SoC well is called a modular program. Modularity, and hence separation of concerns, is achieved by encapsulating information inside a section of code that has a well-defined interface.

separation-of-concerns-feb-2013

  • Encapsulation
    • Public
    • Void
    • API / Client

Encapsulation is a means of information hiding. Layered designs in information systems are another embodiment of separation of concerns (e.g., presentation layer, business logic layer, data access layer, persistence layer).

Fun Assignment: play this game

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: