P2 - Project 2: Electric Wiring Bill is designing electric...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Project 2: Electric Wiring Bill is designing electric wiring for his new house. First of all, he has fixed the positions of several electrical outlets on the walls. To neatly connect any pair of outlets, he would make sure that the wire is always imbedded in the walls or the floor, and is parallel to at least one side of the wall. Naturally he wants to minimize the total length of wire he must buy to have all the outlets connected. By the way, do not forget that there is a door for every room. The wire must not cross the door. Figure 1 shows a possible setting in a room with 4 outlets. Input Specification: Your program must read test cases from a file “ input.txt ”. The input file consists of several test cases. For each test case, the first line contains 4 triples ( x 1 , y 1 , z 1 ) . .. ( x 4 , y 4 , z 4 ) which are the coordinates of the four corners of a rectangular door. The second line contains size of the room, (L x , L y , L z ), and a positive integer N (<=20). Then N lines of coordinates (
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

P2 - Project 2: Electric Wiring Bill is designing electric...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online