semester programming project for cs 356 george blank university lecturer

14
Semester Programming Project for CS 356 George Blank University Lecturer

Upload: hilary-ferguson

Post on 26-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Semester Programming Project for CS 356 George Blank University Lecturer

Semester Programming Projectfor CS 356

George BlankUniversity Lecturer

Page 2: Semester Programming Project for CS 356 George Blank University Lecturer

Semester Long Project• This is the specification for the programming

project for CS 356.

• The final project will require four programs running separately over a network, emulating four routers with predefined connections and route costs, that communicate with each other to update Distance Vector Routing Tables at each router, while displaying changes and resulting tables for Router 0.

Page 3: Semester Programming Project for CS 356 George Blank University Lecturer

Implementation Options

• You may choose the programming language to implement the project from C++, C, Java and Python. NJIT Computer Science majors are strongly encouraged to use C or C++, and will receive a reduced grade for Java or Python.

• The first deliverable requires the use of sockets. You may choose datagram or stream sockets. If you are using Java, you may switch to RMI for parts two and three. If you are using C, you may switch to RPC.

Page 4: Semester Programming Project for CS 356 George Blank University Lecturer

Special Requirements for NJIT Computer Science Majors

• You are strongly encouraged to use C or C++, and will receive a reduced grade for Java or Python.

• The final deliverable should be multi-threaded.

• These requirements are optional for non-CS majors, such as IS, BIS, CIS, and IT. They also optional for students from Rutgers. CS majors are expected to be able to program in C, C++ and Java by graduation.

Page 5: Semester Programming Project for CS 356 George Blank University Lecturer

Network and Costs to be used

Stage 1 and 2: Client is Router 0 Server is Router 1Final Project: Each Router is represented by a separate program running independently and communicating across a network.

Page 6: Semester Programming Project for CS 356 George Blank University Lecturer

Initial Values for Router 0Destination Router

Interface Link Cost

0 Local 0

1 0 1

2 1 3

3 2 7This table represents the initial least cost known path from Router 0 to each of the other three routers. Initially, each router knows only thedirect cost on each of its directly connected interfaces.The initial table for each of the other routers can be obtained byexamining the network diagram on the preceding page.After routers exchange information, new paths will be discovered andthe tables will be updated with new least costs using the Bellman –Ford distance vector algorithm.

Page 7: Semester Programming Project for CS 356 George Blank University Lecturer

Stage One Functionality

• Create a client and a server, communicating over a network, and pass the following information.

• Client displays its initial known least cost to each other router.

• Client sends its own Router number, and its initial known least cost to each other router.

• Server sends its own Router number, and its initial known least cost to each other router.

• Client displays information received from server.

Page 8: Semester Programming Project for CS 356 George Blank University Lecturer

Stage One Deliverables

• Listings of all code• Screen shots that prove code compiled and

ran correctly without errors• Output from client, as specified.• If possible, a screen shot from Wireshark

showing the socket data passing across the network. Otherwise, use screen shots of client and server to prove that information was on different hosts and passed across a network.

Page 9: Semester Programming Project for CS 356 George Blank University Lecturer

Stage Two Functionality• Routers 0 and 1 will maintain a least cost

table to all routers (0, 1, 2, 3).• Router 0 will display the initial table.• Routers 0 and 1 represented by separate

communicating programs will exchange information as specified in stage one.

• Using the information received from the other program, the least cost to the other routers will be updated using the Bellman-Ford distance vector algorithm.

• Router 0 will display its updated table.

Page 10: Semester Programming Project for CS 356 George Blank University Lecturer

Stage Two Deliverables

• Listings of all code• Screen shots that prove code compiled and ran

correctly without errors• Before and after tables for Router 0, as

specified.• If possible, a screen shot from Wireshark

showing the data passing across the network. Otherwise, use screen shots of each router program to prove that information was on different hosts and passed across a network.

Page 11: Semester Programming Project for CS 356 George Blank University Lecturer

Stage 3: Final Functionality• Extend the functionality of stage two to four

separate programs, representing routers 0, 1, 2, and 3 on the network diagram and communicating across the network.

• Exchange data between routers 0 and 1, as in stage two. But this time, every time a router changes the data in its table, it sends its entire table to all directly connected routers, which also do the same.

• Display the initial data table and the new tale after each change for router 0.

• Find a way to terminate the program when complete.

Page 12: Semester Programming Project for CS 356 George Blank University Lecturer

Final Deliverables

• Listings of code for Router 0 and one other router.

• Screen shots that prove code compiled and ran correctly without errors

• Initial and each changed table for Router 0, as specified. (Should be three separate tables.)

• Proof that router programs were on at least two different hosts (four preferred) and passed across a network.

Page 13: Semester Programming Project for CS 356 George Blank University Lecturer

Verification of final output

• If your programs are working correctly, router 0 will have an initial cost of 7 to get to router 3.

• After the first update, that cost should be 5.• After the second update, the cost should be

4.

Page 14: Semester Programming Project for CS 356 George Blank University Lecturer

Resources on Moodle

• PowerPoint Presentation on Java Socket programming. The sample programs can easily be adopted to stage one.

• PowerPoint Presentation on C Socket programming. The sample programs can easily be adopted to stage one.

• Sample Python programs. These can be adapted or converted to C, C++ or Java to provide ideas for implementing stages one, two, and three.