Sale!

CSE 1320 Intermediate Programming Assignment 8 solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (4 votes)

This assignment focuses on linked lists, stacks, and queues.
Your code must compile without any warnings or errors and run without segmentation
faults to receive credit. Additionally, any allocated memory must be freed. Points will be
taken for inconsistent formatting.
1. Create a program that reads in Book data in CSV format and allows the user to
search by author. The Book data should be stored in your program using a linked
list. When searching by author, your program should group all books by that author
together in a separate linked list. The order does not matter. After grouping, the
program should traverse through the linked list recursively, printing the title of each
book. It should print the result as seen in the example run.
Data Format
typedef struct {
char *title;
char *author;
} Book;
Other Requirements
• The CSV file must be input as a command lined argument when running the
program.
• Nodes must be allocated for each book read in the CSV file.
• Allocated memory must be freed before the program terminates.
Example Run
Enter author: Carl Sagan
1. Contact
2. Cosmos
3. Dragons of Eden: Speculations on the Evolution of Human Intelligence
2. Create a reading list program that stores data of books belonging to a user’s reading
list. The list should be implemented as a queue. A menu should be presented to the
user with the options to add a book (enqueue), view a book, and mark the current
book completed (dequeue).
Other Requirements
• Only the book at front of the queue can be viewed.
CSE 1320: Assignment 8
• After viewing the book, the user can either choose to mark it as read or go
back to the menu.
• The queue can be implemented using either a dynamic array or linked list.
• The data format is the same as in problem 1.
Example Run
1. Add Book
2. View Next
3. Quit
> 2
Contact by Carl Sagan
1. Mark as Read
2. Go back
> 2
1. Add Book
2. View Next
3. Quit
> 3
3. Create a bug tracker program where each reported bug is given by user input. The
bug entries should be implemented as a stack. New bug reports are pushed onto
the stack. The user can view the report at the top of the stack and either choose to
fix it (pop) or go back.
Data Format
enum priority {
Low,
Medium,
High
};
typedef struct {
char *description;
enum priority p;
}
Other Requirements
• Each bug report should be a node in a linked list-based stack.
• Nodes should be managed using dynamic memory allocation.
Example Run
1. Report bug
2. View current bug
3. Quit
> 1
Description: program crashing
Priority (0, 1, 2): 0
2
CSE 1320: Assignment 8
1. Report bug
2. View current bug
3. Quit
> 2
Description: program crashing
Priority (0, 1, 2): 0
1. Mark as fixed
2. Back
> 2
1. Report bug
2. View current bug
3. Quit
> 3
Create a zip file using the name template LASTNAME_ID_A8.zip which includes the all
required code files. Submit the zip file through Canvas.
3