Object Oriented Design

Topics: Object-oriented programming, Object, Subroutine Pages: 2 (263 words) Published: May 15, 2011
Object Oriented Design

The object oriented design to be used CD and DVD media collection system to identify the information about the media. You will need some general information to make the system work correctly.

The media collection needs to have a item class to keep the general information about the media and a class to handle the media to is going to be used. Attributes are: Name, type and quantity.
Methods are: Set name, get name, set type, set quantity and get quantity Class item
Name as string
Type as string
Quantity as integer

Sub program new item (New name)
Call set name (New name)
Call set quantity (Quantity + 1)
End subprogram
Subprogram set name (New name)
Set name = New name
End subprogram
Subprogram set type (New type)
Set type= New type
End subprogram
Subprogram set quantity (New quantity)
Set quantity = New quantity
End subprogram
Function get name () as string
Set get name = Name
End function
Function get type () as string
Set get type = Type
End function
Function get quantity () as integer
Set get quantity = Quantity
End function
End class

Class CD media as item
Length as real
Genre as string
Rating as string
Subprogram new CD media (New length, new genre, new rating)
Call set length (New length)
Call set genre (New genre)
Call set rating (New rating)
End subprogram
Subprogram set length (New length)
Set length = New length
End subprogram
Subprogram Set genre (New genre)
Set genre= New genre
End subprogram
Subprogram set rating (New rating)
Set rating = New rating
End subprogram
Function get length () as real
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • System Analysis and Design Essay
  • Reusability: Object Oriented Programming Essay
  • Comparison of Object Oriented and Structured Programming Essay
  • Object-Oriented Concepts Essay
  • Object-oriented Programming/Event-Driven Programming versus Procedural Programming Essay
  • Essay on object oriented system
  • 6 8c Chapter Excercises Essay
  • Essay on What Is Object Oriented Methodology?

Become a StudyMode Member

Sign Up - It's Free