

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A programming project for computer science ii students in the fall 2008 semester. The project involves creating two classes, turndistset and turnlocset, to check proposed solutions for the turnpike problem. The turnpike problem is about determining the mile marker positions of interchanges given a list of distances between them. Students are required to write code for the constructors, destructors, functions, and methods called by the client code provided.
Typology: Study Guides, Projects, Research
1 / 2
This page cannot be seen from the preview
Don't miss anything!
CoSc 2030 5 December 2020 Computer Science II Fall 2008 page 1 of 2 Programming Project 9a Also consider Programming Project 9b. Due Friday, 5 December 2008 Check a Proposed Solution to an Instance of the Turnpike Problem The Interstate Commerce Commission needs a program that solves the following Turnpike Problem. The solution will be used to monitor the work of the Wyoming Department of Transportation, thereby simplifying the tasks of both governmental entities. This will improve our quality of life and lower our taxes at the federal and state level. So do good work! The Turnpike Problem: Given a list of all distances between turnpike interchanges, determine the mile marker positions of each of the interchanges. Assume one of the interchanges is positioned at mile marker zero. An initial step toward solving the problem is to check proposed solutions. This is the task of this programming project. Write code for two classes, TurnDistSet and TurnLocSet. TurnDistSet stores and manipulates a list of distances between turnpike interchanges. TurnLocSet stores and manipulates a list of turnpike interchange locations. Here is the client code that must be supported by your classes: int main() { TurnDistSet distances; cin >> distances; TurnLocSet mileMarkers; while( cin >> mileMarkers ) { cout << endl << "Locations set" << endl; cout << mileMarkers << endl; if( TurnDistSet( mileMarkers ) == distances )
CoSc 2030 5 December 2020 Computer Science II Fall 2008 page 2 of 2 { cout << " is a solution for Distances set" << endl; } else { cout << " is NOT a solution for Distances set" << endl; } cout << distances << endl; } return 0; } Your classes must implement the constructors, destructors, functions, and methods called by this client code. Turn in a typed report in class on Friday. Your printed report will include: