Map Application - Data Structures I - Homework 10 | COMP 385, Assignments of Data Structures and Algorithms

Material Type: Assignment; Class: DATA STRUCTURES II; Subject: Computer Science; University: Wentworth Institute of Technology; Term: Fall 2007;

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-tlm
koofers-user-tlm 🇺🇸

5

(1)

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Wentworth Institute of Technology
Division of Professional and Continuing Studies
COMP385 Section 71 - Data Structures II - Fall, 2007
Homework 10 – Map Application
Instructor: Bob Goldstein (617) 912-2512
http://home.comcast.net/~goldsteinr/Courses/index.html
http://goldstein.eri.harvard.edu/courses/index.html
http://myweb.wit.edu/goldsteinr/Courses/index.html
Due Date: November 27, 2007
Hand In: Printout of program code and dialogue of how it runs.
Purpose: Make an application that uses a Map structure
Description:
A good use of a map is to read in parameter-value pairs for a complex simulation.
For example, in a simulation of a building elevator system, the parameters to be loaded are:
numElevators
elevatorCapacity
numFloors
peoplePerHour
The datafile that is loaded has the parameter-value pairs separated by an equal sign, with one parameter-value pair
per line as follows:
numElevators=3
elevatorCapacity=6
numFloors=20
peoplePerHour=30
Make a program that reads in such a file, and builds a Map that relates the parameter name to it’s value. The
program should read in the file and then enter a loop where the user types in a parameter name and the program
gives it’s value. Make the parameter names case Insensitive. Remember, the object is to use a Map data structure,
so construct this program in such a way, even though you can do it with other structures.
/app/work/qkd68t-397338-2765064-homework10-doc.doc 1 12/5/2020 12/5/2020

Partial preview of the text

Download Map Application - Data Structures I - Homework 10 | COMP 385 and more Assignments Data Structures and Algorithms in PDF only on Docsity!

Wentworth Institute of Technology

Division of Professional and Continuing Studies

COMP385 Section 71 - Data Structures II - Fall, 2007

Homework 10 – Map Application

Instructor: Bob Goldstein (617) 912- [email protected] [email protected] http://home.comcast.net/~goldsteinr/Courses/index.html http://goldstein.eri.harvard.edu/courses/index.html http://myweb.wit.edu/goldsteinr/Courses/index.html Due Date: November 27, 2007 Hand In: Printout of program code and dialogue of how it runs. Purpose: Make an application that uses a Map structure Description: A good use of a map is to read in parameter-value pairs for a complex simulation. For example, in a simulation of a building elevator system, the parameters to be loaded are: numElevators elevatorCapacity numFloors peoplePerHour The datafile that is loaded has the parameter-value pairs separated by an equal sign, with one parameter-value pair per line as follows: numElevators= elevatorCapacity= numFloors= peoplePerHour= Make a program that reads in such a file, and builds a Map that relates the parameter name to it’s value. The program should read in the file and then enter a loop where the user types in a parameter name and the program gives it’s value. Make the parameter names case Insensitive. Remember, the object is to use a Map data structure, so construct this program in such a way, even though you can do it with other structures. /app/work/qkd68t-397338-2765064-homework10-doc.doc 1 12/5/2020 12/5/