DOWNLOAD
CS372 Programming Assignment #2
(Individual Programming Project implementing Doubly Linked Lists)
WARNING: Programming assignment #2 is due at the end of week 2.
It will not be accepted more than 1 day late.
Rationale: You must successfully complete individual assignments 1 and 2, before you can join a
team for assignment 3. Teams must be formed in time to complete the design in week 3.
Therefore, if you are not able to successfully complete both assignments 1 and 2
within one day of the due dates, you will not be allowed to move forward in this course.
Part 1: The Program
Write a program to analyze all integers contained in two text files.
Both text data input files will contain an unknown number of integers (in the range 1 999),
separated by whitespace. There may be duplicate integers in the files.
The program will:
- Read and organize all of the integers from the first data input file into two doubly linked lists,
based on whether the integer is odd or even.
- Search for all the integers in the second data input file, to determine which list they are in and
what their location is within that list.
The program must be modular and use correct parameter passing. Use of global variables will
NOT be allowed. And object-oriented constructs (classes, objects, templates, STL, etc) may NOT
be used.
Although we will not be using objects yet, we will begin introducing object-oriented concepts, via
Abstract Data Type data definitions and functions. Therefore, you will be required to implement the
following doubly linked list data structure and functions.
Data Structure Overview
This program will maintain a doubly linked list for odd integers, and a second doubly linked list for
even integers.
The individual nodes in each list should contain one integer and two pointers (one pointer pointing
forward to the next node and one pointer pointing backwards to the previous node) only.
Sample Node:
CS372 Programming Assignment #2
(Individual Programming Project implementing Doubly Linked Lists)
WARNING: Programming assignment #2 is due at the end of week 2.
It will not be accepted more than 1 day late.
Rationale: You must successfully complete individual assignments 1 and 2, before you can join a
team for assignment 3. Teams must be formed in time to complete the design in week 3.
Therefore, if you are not able to successfully complete both assignments 1 and 2
within one day of the due dates, you will not be allowed to move forward in this course.
Part 1: The Program
Write a program to analyze all integers contained in two text files.
Both text data input files will contain an unknown number of integers (in the range 1 999),
separated by whitespace. There may be duplicate integers in the files.
The program will:
- Read and organize all of the integers from the first data input file into two doubly linked lists,
based on whether the integer is odd or even.
- Search for all the integers in the second data input file, to determine which list they are in and
what their location is within that list.
The program must be modular and use correct parameter passing. Use of global variables will
NOT be allowed. And object-oriented constructs (classes, objects, templates, STL, etc) may NOT
be used.
Although we will not be using objects yet, we will begin introducing object-oriented concepts, via
Abstract Data Type data definitions and functions. Therefore, you will be required to implement the
following doubly linked list data structure and functions.
Data Structure Overview
This program will maintain a doubly linked list for odd integers, and a second doubly linked list for
even integers.
The individual nodes in each list should contain one integer and two pointers (one pointer pointing
forward to the next node and one pointer pointing backwards to the previous node) only.
Sample Node:
Комментариев нет:
Отправить комментарий