Circuit Board Design: Implementation and Analysis of Paths

Verified

Added on  2019/09/16

|2
|287
|312
Project
AI Summary
This project involves designing and implementing a circuit board, along with analyzing paths within the board. The program should handle command-line arguments, construct a CircuitBoard from an input file, and search for optimal trace paths. The project requires the use of stacks and queues, and should support both console and GUI modes. The program should handle input errors through exception handling, and provide clear usage messages. In GUI mode, the program should display the board layout and highlight the shortest paths. The assignment requires the creation of a CircuitBoard class to parse the input file and a CircuitTracer class to handle command-line arguments, find optimal paths, and report the results. The project also requires the use of conditional checks and exception handling to appropriately deal with input errors from the command line and the input file.
Document Page
To code your project:
a. Complete the CircuitBoard constructor.
o The constructor should parse the input file and
populate the char[][] board class variable.
o Any formatting problems with the input file
should cause an InvalidFileFormatException to be
thrown, with appropriate messages to the user
about the cause of the exception.
b. Complete the CircuitTracer class.
i. The class should:
handle the command-line arguments
construct a CircuitBoard from the input file
search for all optimal trace paths
report the results according to the specified
display mode
ii. The program requires three command-line
arguments:
11 First argument:
-s -- use a stack for storage
-q -- use a queue for storage
1
1 Second argument:
-c -- run program in console mode
-g -- run program in GUI mode .
1
1 Third argument: name of the input file
ii. Use conditional checks and exception handling to
appropriately deal with input errors from the
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
command line and the input file. These example
input files include a variety of valid and invalid
input files to use for testing.
Give clear usage messages for invalid
command line arguments.
Throw InvalidFileFormatExceptions for any issues
encountered while parsing the input file.

b. In GUI mode, the program should display the original board layout as a grid of labels and
a list of all the shortest paths found. If the user selects a path from the list, the positions
on the board that formed the path should be somehow highlighted in the grid. For an
example, refer to these screenshots.
chevron_up_icon
1 out of 2
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]