Computer Science – 12.2 Program Design | e-Consult
12.2 Program Design (1 questions)
Login to see all questions.
Click on a question to view the answer
Structure Chart:
The top-level module would be 'Library Management System'. It calls upon sub-modules for specific tasks.
Level 1:
- Library Management System: This is the main module.
- Book Management: Handles adding, searching, and removing books.
- User Interface: Provides the user interaction (e.g., menus, input fields, output display).
Level 2:
- Book Management:
- Add Book: Takes book details (title, author, ISBN, publication year) as input. Parameters: book_details (a structure containing the book information).
- Search Book: Takes a search term (title or author) as input. Parameters: searchterm (a string), booklist (a list of book structures). Returns: found_book (a book structure or null).
- Remove Book: Takes the ISBN of the book to remove as input. Parameters: isbn (a string), booklist (a list of book structures). Returns: updatedbook_list (a list of book structures).
- User Interface:
- Display Menu: No parameters. Returns: None.
- Get User Input: Takes a menu choice as input. Parameters: menuchoice (an integer). Returns: userchoice (an integer).
- Display Book List: Takes a list of book structures as input. Parameters: book_list (a list of book structures). Returns: None.
Relationships:
| Library Management System calls Book Management and User Interface. |
| Book Management calls Add Book, Search Book, and Remove Book. |
| User Interface calls Display Menu and Get User Input. |