.:For Network Programming ( SCN 4223 ) Purpose Only:.

AC990856 Page

--»Personel Details

 
Name : Muhammad Faizal Bin Arishah
NRIC : 800107045037
Matrix No. : AC 990856
Course & Year : 4 SCK
Section : 01
Contact No. : 012-7615174
E-mail : masalapang@hotmail.com
 

--»Subject Details

 
Subject : Network Programming
Code : SCN 4223
Assignments Assignment 1-3 below
  Assignment 4
  Assignment 5
  Research Paper
  RMI SQRT
  RMI Airline
  RMI Compare Two Number
  RMI Lab Question
  Multimedia Programming
  Streaming Video(montajb.mov)
 
--» Details Assignments

---Assigment 1: Example Of Layered System (Money Order System Using Post Office)

- Someone(sender) go to post office to make a money order to someone,the clerk in the post office will collect money and give the sender back the card that make the receipent chance it to the cash money.Then the sender post the card to the receipent an the receipent will change it to the cash money.

Sender make a money order card from the post office

Receiver change the money order card into cash money from the post office
| |
| |
| |
| |
Sender send the card to the receipent
Receiver received the card from the receipent
| |
| |
| |
| |
Post office will do it the posting
Post office will receive the posted card

Interface protocols is at the communication bettween layer at the same endpoint.
Peer-to-peer protocol means that it will communicate between peers at the same layer.For examples communication between post office sender an post office receiver.

---Assigment 2: TCP/IP - Test Question

1. Why is a 3-way handshake necessary ?

- To make sure the connection from 2 different node
can be established properly and the connection is reliable.

2. Who sends the first FIN - the server or the client ?

- Server send 1st. Its sending the FIN after send out all the data that requested by the
client.

3. Once the connection is established, what is the difference between the operation of the server's TCP layer and the client's TCP layer ?

- If client send the data to the server, it will wait for the server to send the ACK
to the client and same with to other way.This is the different.

4. What happens if a bad guy can guess ISNs ?

- This is very dangerous because the bad guy can steel the such important data such as
credit card balance or others.They will use this information to do the bad things.

 

---Assigment 3.1: HelloWorld.java

//Muhammad Faizal Bin Arishah
//AC990856
//800107045037

class HelloWorld
{
public static void main(String args[])
{
System.out.println("M691788 Shiow-yang Wu");
System.out.println("CSIE Department, NDHU, Taiwan");
System.out.println("+886-3-8662500 ext 22115");
}
}

---Assigment 3.2 : HelloWorldApplet.java

//fail HelloWorldApplet

import java.applet.Applet;
import java.awt.Graphics;

public class HelloWorldApplet extends Applet
{
public void paint(Graphics g)
{
g.drawString("M691788 Shiow-yang Wu",10,20);
g.drawString("CSIE Department, NDHU, Taiwan",10,35);
g.drawString("+886-3-8662500 ext 22115",10,50);
}
}

//fail HTML HelloWorldApplet

<HTML>
<HEAD><TITLE>Hello World</TITLE></HEAD>
<BODY>
<H1>Here is the applet:</H1>
<APPLET CODE="HelloWorldApplet.class" WIDTH=300
HEIGHT=300>
</BODY>
</HTML>

 

---Assigment 3.3 : Window Application.java

//fail WindowAPP

public class WindowApp extends javax.swing.JComponent {
public static void main(String[] args) {
javax.swing.JFrame f = new javax.swing.JFrame("WindowApp");
f.setSize(300, 300);
f.getContentPane().add(new WindowApp( ));
f.setVisible(true);
}
public void paintComponent(java.awt.Graphics g) {
g.drawString("M691788 Shiow-yang Wu",10,20);
g.drawString("CSIE Department, NDHU, Taiwan",10,35);
g.drawString("+886-3-8662500 ext 22115",10,50);
}
}

 

Copyright @2003 Ac990856
U6C3-9,Kolej Perdana.
Tel: 6012-7615174 ;
e-mail: masalapang@hotmail.com.my