views:

160

answers:

6

there is a quote from Algorithms for Java (sedgwick 2003) p. 135: "we commonly use driver programs when developing or debugging adt iplementations" what is meant by driver program? google just gives me loads of info about programming drivers, clearly not related

+5  A: 

In this contex a driver program is just a program that uses the class or algorithm that you're developing. It's primarily used for testing your code while it's still under development.

Bill the Lizard
ok, i knew it would be something simple and mundane, thanks for clarifying
Tom
A: 

It's simply a program designed to call various APIs and pieces of logic you are working with. E.g. if you have a library that reads XML files, does some sort of transform on it, and writes the transformed data into another file, to work with that library you create a driver program which does nothing but call those 3 APIs and does error handling - e.g. it drives/directs your API to do its work.

DVK
A: 

A driver is generally a (relatively) simple executable program designed to exercise some component that isn't directly executable, like a library or ADT or test suite, etc. For example you might have a Table class that supports reading in CSV, and supports outputting to CSV and HTML. You might write a simple program that takes on the command line the name of an input CSV file and a format to output to so you can confirm the Table class does what you expect. All the driver would do is construct an instance of the Table and read in the file and use it to write out in the specified format.

Logan Capaldo
A: 

it is a bum hole. none of these answers help me with my ICT homework!! write an answear which is easy to understand - please!!!

Your mother
+1  A: 

A Driver program, as I understand it, is just a simple class that instantiates the overall program you have created.

In University programs, we started learning Java by making very simple Drivers, that just passed in parameters to random classes and methods.

sm1991
A: 

people remember this? someone give an example, definitions are not important.

razr