CJCoding With Joseph
15per day

Triple Constructor - BookInfo

Create a class BookInfo with private fields title, author (strings), and year (int).

Requirements:
1. Constructor BookInfo(string title, string author, int year)
2. toString() returns: "title - author (year)"

Do NOT write a main function.

Expected Output:

Dune - Herbert (1965)
Topics:
Classes
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.