Write a Class statement that defines a class named Book. The class contains three Public variables: Title,

Question:

Write a Class statement that defines a class named Book. The class contains three Public variables: Title, Author, and Price. The Title and Author variables are String variables. The Price variable is a Decimal variable. Then use the syntax shown in Version 1 in Figure 11-5 to declare a variable that can store a Book object; name the variable fiction. Also write a statement that instantiates the Book object and assigns it to the fiction variable.

Instantiating an Object from a Class Syntax – Version 1 (Dim | Private) variableName As className variableName = New className Syntax – Version 2 (Dim | Private) variableName As New className Example 1 (using Syntax Version 1) Private hoursInfo As TimeCard O = hoursInfo = New TimeCard The Private instruction

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: