Homework 5 - UMBC-CMSC104/General GitHub Wiki

Functions continued

You will be practicing more with functions for this program.

The assignment

You are to implement a miniature library info system. The name of this file will be library.c.

Welcome to Homework 5!
Please select a book to get info about:
1) Book 1
2) Book 2
3) Book 3
Please select a book:

When the user selects 1, 2, or 3, you must display the following information for each book (example):

ISBN: 12345678
Number of pages: 16
Publish date: 12/2/1992

Requirements

  • You are to research and come up with the info for the 3 books in your menu. **Do not use "book 1," "book 2," and "book 3."
  • Your menu should be its own function.
  • The menu selection prompt should be its own function.
  • Book information must be displayed via a function call with various values for the different arguments. Your function should take in (as input) an ISBN, number of pages, and publish date, and print out the information. There should only be one function printing out information, and each book selection should use the same function to print out information. To put this another way, if you write printf("ISBN: %d\n", isbn") more than once, you are doing this assignment incorrectly.

To submit it, type

submit cs104_wilson hw05 library.c

Notes

  • Refer to classwork 5 and your book for function information.
  • Refer to the reference implementations code.
  • Don't forget -- the new clamp down procedures are in effect! Proper indentation, code commenting, file headers, and proper variable names are required!