{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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)
Image of page 1

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

View Full Document Right 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
Image of page 2
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern