Question: 2. Write a Class statement that defines a class named Book. The class contains three Public variables: Title, Author, and Price. The Title and Author
2. 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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
