Asking for code review

I am tryin to implement the following network and I need some advice and a someone to review the code I wrote
here is a pic of the network


here is the code I wrote so far