Question: continue stack I really need stack.h so stack.c makes sense HELP with Stacks (Cprog.) This a program stores information of the books there are in

continue stack

I really need stack.h so stack.c makes sense

HELP with Stacks (Cprog.)

This a program stores information of the books there are in a library (code, author, availability..), and not only that but also lets the user to insert new books in its database which will get store in certain manner or to delete existing ones.

In this exercise, we have to define a stack to save units of data of the type Book, and the methods to have access to this stack. We do that by completing the files stack.h and stack.c

The tasks are:

1)To define in stack.h the type of data tBookStack that represents a stack of units of data of the type tBook

2)Implement in stack.c the action:

Void bookStack_create(tBookStack*stack) so given an input/output parameter of the type tBookStack, it initializes this parameter in an empty stack.

I inclue the .h and .c files

Stack.h

#include "data.h"

typedef struct { } tBookStack;

void bookStack_create(tBookStack *stack);

tBoolean bookStack_empty(tBookStack stack);

tError bookStack_push(tBookStack *stack, tBook newElement);

tError bookStack_pop (tBookStack *stack, tBook *element);

void bookStack_transfer(tBookStack *stack_dest, tBookStack *stack);

tError bookStack_search(tBookStack *stack, char *ISBN, tBook *book);

Stack.c

#include "books.h" #include "stack.h" #include

void bookStack_create(tBookStack *stack) {

}

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 Databases Questions!