Question: Imagine you are developing a software system for a local library. The system includes a feature to categorize books based on their publication year. Some

Imagine you are developing a software system for a local library. The system includes a feature to categorize books based on their publication year. Some categories of interest are "Vintage Books", which include books published between 1950 and 1970, and "Classic Books", all books before 1950. Your task is to write a part of the system that identifies these books.
Given a variable publicationYear, write a statement that prints the message "Vintage Book" to standard output if the value of publicationYear falls within the range from 1950 to 1970, inclusive. If the book was published before 1950, print "Classic Book" instead.
Note: You must only write the if statement checking for the conditions and the correct side effect. You can assume the std is available for direct use.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!