Question: Consider the classes Book and EnumTest discussed in Chapter 8 Part II ( slides 4 - 6 ) which you can find in the folder
Consider the classes Book and EnumTest discussed in Chapter Part II slides which you can find in the folder Source Code. You are asked to:
Add, following the field copyrightYear, a new field called pages that stores the number of pages in the book. Add an accessor method for it and make sure to modify the constructor to take into account the new field.
Modify the constants and include in each constant a value for pages according to the following table:
tableConstant Unique Identifier,# of PagesJHTPCHTPIWHTPCPPHTPVBHTPCSHARPHTP
Modify EnumTest only to display the output in a different way row wise instead of column wise and for only the unique identifiers JHTP IWHTP and CSHARPHTP. Design your program to display the following output:
: AM
BookJHTP
TitleJava How to Program
CopyrightYear
Pages
BookIWHTP
TitleInternet & World Wide Web How to Program
CopyrightYear
Pages
BookCSHARPHTP
TitleVisual C# How to Program
CopyrightYear
Pages
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
