Vous êtes sur la page 1sur 2

Assignment 1 DSA 1/2

Assignment 1 Problem 1

Team no. Team members

Assigned problem:
Data to be stored in the following structure is given

typedef struct
{
char authors[5][40]; // first and last names of the author
char title[50]; // title of the publication
unsigned int year; // year of the publication
char isbn[15]; // publication code
} PubEntryT;

The key field here is the isbn.


Imagine a solution to store that data effectively, based on singly and doubly linked lists, such a
way that you can answer the following queries effectively:

1. All the books of the first author in ascending order of their publication year.
2. All the books of the first author in descending order of their publication year.
3. All the books stored in the descending order of their isbn.
4. Tell whether a book given by its isbn is stored or not.

You should also be able to delete:

1. A book record based on its isbn.


2. All the books of written by the first author.

You should also be able to reverse the order of the store such a way that you can easily list all
the books in ascending order of their isbn.

Include all the necessary validation for data.

You should read from the input text file P01.dat such entries. Each line contains fields
corresponding to the given ones, i.e. author, title, year, isbn. The field separator is comma. All
character fields should be enclosed in double quotes (i.e. "). If you need to include a double
quote within such a field, then double it. The numeric fields should be written as they are.

Sample input is given in file P01.dat. Sample output for that input is given in file P01.out.

Use the general implementations you developed at the laboratory.


Assignment 1 DSA 2/2

Tasks assignment

No. Task description Assigned to


1 Develop main module for application SLList Pop Daniela
2 Develop module for implementing a generalized Boian Diana
singlylinked
list operations – module uses files SLLlist.c and
SLList.h
3 Implement data reading, conversion and validation – Boian Diana
module uses files Queries.h for SLList
4 Pair review of code for data reading, conversion and Pop Daniela
Validation in SLL

5 Develop main module for application DLList Pop Daniela


6 Implement data reading, conversion and validation – Pop Daniela
module uses files Queries.c/ .h for DLList
7 Develop module for implementing a generalized Pop Daniela
doublylinked
list operations – module uses files DLLlist.c and
DLList.h
8 Pair review of code for data reading, conversion and Boian Diana
Validation in DLL
9 Pair review of code for data reading, conversion and both
Validation in main module
10 Test application including developing of test data sets both

Vous aimerez peut-être aussi