Object Oriented Design

Object Oriented Design - Set get Rating = Rating End...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Object Oriented Design Class CD and DVD Name As String Type As String Quantity As Integer Subprogram New Item (name) Call Set Name (name) Call Set Quantity(Quantity + 1) 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 Subprogram set Name(name) Set Name = name End Subprogram Subprogram set Type(type) Set Type = Type End Subprogram Subprogram set Quantity(Quantity) Set Quantity = Quantity End Subprogram End Class Class CD Media Length as Real Genre as String Rating as String Subprogram New CD(length, genre, rating) Call Set Length(length)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Call Set Genre(genre) Call Set Rating(rating) End Subprogram Function get Length() As Real Set get Length = Length End Function Function get Genre() As String Set get Genre = Genre End Function Function get Rating() As String
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Set get Rating = Rating End Function Subprogram set Length(length) Set Length = Length End Subprogram Subprogram set Genre(genre) Set Genre = Genre End Subprogram Subprogram set Rating(Rating) Set Rating = Rating End Subprogram End Class Class DVD Media Length as Real Genre as String Rating as String Subprogram New DVD(length, genre, rating) Call Set Length(length) Call Set Genre(genre) Call Set Rating(rating) End Subprogram Function get Length() As Real Set get Length = Length End Function Function get Genre() As String Set get Genre = Genre End Function Function get Rating() As String Set get Rating = Rating End Function Subprogram set Length(length) Set Length = Length End Subprogram Subprogram set Genre (genre) Set Genre = Genre End Subprogram Subprogram set Rating(Rating) Set Rating = Rating End Subprogram End Class...
View Full Document

This note was uploaded on 08/12/2011 for the course IT 215 taught by Professor Danielreddy during the Spring '11 term at University of Phoenix.

Page1 / 3

Object Oriented Design - Set get Rating = Rating End...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online