Objektorienteeritud programmeerimine
|
|
- Ada Knight
- 5 years ago
- Views:
Transcription
1 Objektorienteeritud programmeerimine 15. loeng 20. mai Eno Tõnisson 1
2 Kasutatud H. Heina loengumaterjalid J. Kiho Väike Java leksikon J. Kiho Java Programmeerimise aabits Y. D. Liang Introduction to Java Programming Java tutorial. Java kodulehel 2
3 Eelmisel nädalal loeng i18n praktikum kontrolltöö, lõimed 3
4 Umbes mitu tundi tegelesite eelmisel nädalal selle ainega (loeng+praktikum+iseseisvalt)? 1. paariline tundi tundi tundi tundi tundi tundi tundi 8. üle 14 tunni 0% 0% 0% 0% 0% 0% 0% 0%
5 Kuivõrd olete selle ainega graafikus? 1. Isegi ees 2. Täiesti graafikus 1. paariline 3. Veidi maas, aga saan ise hakkama 4. Kõvasti maas, vajan abi 5. Ei oska öelda 0% 0% 0% 0% 0%
6 Umbes mitu tundi tegelesite eelmisel nädalal selle ainega (loeng+praktikum+iseseisvalt)? 2. paariline tundi tundi tundi tundi tundi tundi tundi 8. üle 14 tunni 0% 0% 0% 0% 0% 0% 0% 0%
7 Kuivõrd olete selle ainega graafikus? 1. Isegi ees 2. Täiesti graafikus 2. paariline 3. Veidi maas, aga saan ise hakkama 4. Kõvasti maas, vajan abi 5. Ei oska öelda 0% 0% 0% 0% 0%
8 Täna Võrguprogrammeerimine Eksamist 8
9 Edasi irge.html 9
10 Järelvastamine Loengute järelvastamine, kui punkte vähem kui 5 kuni 31. mai punktid lähevad kirja ainult eksamile pääsu arvestamiseks, hinnet määravasse üldsummasse ei lähe Praktikumide järelvastamine, kui punkte vähem kui 32 kuni 16. nädala praktikumini punktid lähevad kirja ainult eksamile pääsu arvestamiseks, hinnet määravasse üldsummasse ei lähe 10
11 Korduseksam Korduseksamieelne 1. KT järeltöö Korduseksamieelne 2. KT järeltöö Korduseksam 20. juuni 11
12 Punktid Eksamile pääsemiseks peab olema praktikumidest (sh. rühmatööd) kogutud vähemalt 32 punkti, loengutest vähemalt 5 punkti. Eksamitöö 35 punkti. Eksami eel kõik punktid kogutud. Väljaarvatud 27. mai eksami puhul kolmapäevaste praktikumirühmade rühmatööde lõpuesitlus. 12
13 Võrguprogrammeerimine 13
14 Host Internetti ühendatud seade: enamasti arvuti, kuid võib olla ka ruuter, printer, faks jne. IP (Internet Protocol) aadress Kasutatakse punktidega eraldatud neli märgita täisarvu 0 kuni 255 nt Domeeninimi IP aadressiks
15 Klass java.net.inetaddress Isendi loomiseks public static InetAddress getbyname(string host) throws UnknownHostException public static InetAddress[] getallbyname(string host) throws UnknownHostException public static InetAddress getlocalhost() throws UnknownHostException 15
16 import java.net.inetaddress; import java.net.unknownhostexception; public class Võrk { public static void main (String[] args) throws UnknownHostException { InetAddress me = InetAddress.getLocalHost(); System.out.println("Minu nimi on: " + me.gethostname()); System.out.println("Minu aadress on: " + me.gethostaddress()); InetAddress address = InetAddress.getByName(" System.out.println("Hosti nimi: " + address.gethostname()); System.out.println("IP aadress: "+ address.gethostaddress()); } } Minu nimi on: aurelius Minu aadress on: Hosti nimi: IP aadress:
17 Pordid Tavaliselt on hostil ainult üks Interneti aadress. See aadress jagatakse pordi vahel. Pordid on loogilised abstraktsioonid, mis lubavad ühel hostil suhelda samaaegselt paljude teiste hostidega. Osa teenuseid on seotud kindlate pordinumbritega (0 1023), nt. HTTP 80, telnet 23, finger 79, SMTP 25, 17
18 Protokollid Protokoll defineerib, kuidas kaks hosti omavahel suhtlevad. Protokoll määrab: andmetihendusmeetodid; kuidas saatev seade annab teada, et sõnumi edastamine on lõpetatud; kuidas vastuvõtja teavitab saatjat; IP Internet Protocol internetiaadresside tasemel UDP User Datagram Protocol reeglid sõnumite vahetamiseks teiste internetipunktidega andmepakettide tasemel TCP Transmission Control Protocol 18
19 Protokollid rakenduse tasemel http hüperteksti edastamise protokoll HyperText Transfer Protocol; telnet kaugterminaliga suhtlemise protokoll; ftp, ftp-data failide ülekande protokollid (file transfer protocol); smtp kirjavahetuse protokoll (simple mail transfer protocol); nntp võrguuudiste edastamise protokoll (network news transfer protocol); finger protokoll lühiinformatsiooni edastamiseks kasutaja või süsteemi kohta; rpc hajussüsteemide tööks vajalik kaugprotseduuri väljakutse protokoll (remote procedure call); snmp võrgu teeninduseks vajalik protokoll (simple network management protocol); ntp ajateenistusprotokoll (network time protocol); nfs protokoll hajusa välismäluga töötamiseks (network file system); 19
20 URL Uniform Resource Locator URL on ressursi identifitseerimiseks Internetis e. Internetiaadress. Igale dokumendile või muule ressursile Internetis vastab oma unikaalne internetiaadress. Internetiaadressi esimene osa näitab ära kasutatava protokolli (näit. HTTP), sellele järgneb domeeninimi, alamkataloogi nimi ja failinimi. ftp://ftp.info.apple.com/pub/ telnet://utoopia.pol.edu 20
21 Klass java.net.url Klass java.net.url sisaldab meetodeid: uue URL loomiseks; URL-ist osade eraldamiseks; sisendvoo saamiseks URL-ist (andmete lugemine serverist) Serverist sisu saamiseks Java objektina. Toetab protokolle: http, https, ftp, file, 21
22 Klass java.net.url Konstruktoreid: URL(String spec) URL(String protocol, String host, int port, String file) URL(String protocol, String host, String file) Meetodeid: public String getprotocol() public String gethost() public int getport() public String getfile() 22
23 import java.net.*; import java.io.*; public class Veebilugeja { public static void main(string[] args) { String url; if (args.length > 0) url = args[0]; else url = " try { URL u = new URL(url); InputStream in = u.openstream(); InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedReader(isr); String rida; while ((rida = br.readline())!= null) { System.out.println(rida); } } catch (IOException e) {System.err.println(e);} } } 23
24 Veebilehe näitamine JEditorPane võimaldab näidata struktureeritud teksti Pakub tuge tekstile, RTF ja HTML JEditorPane sisu täitmine meetodiga setpage(), milles URL sõne kujul argumendina JEditorPane toetab hüperlingi klikkimise sündmusi hyperlinkupdate() {...} Sündmuste töötlemine HyperlinkEvent actionperformed() {...} 24
25 Veebilehitseja näide 25
26 import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; import javax.swing.*; import javax.swing.event.*; public class Veebilehitseja extends JFrame { private JTextField enter; private JEditorPane contents; public Veebilehitseja() { super("lihtne veebilehitseja"); enter = new JTextField("Sisesta URL siia"); enter.addactionlistener(new ActionListener() { public void actionperformed(actionevent e ){ getpage(e.getactioncommand()); }}); add(enter, BorderLayout.NORTH); contents = new JEditorPane(); contents.seteditable(false); 26
27 contents.addhyperlinklistener(new HyperlinkListener() { public void hyperlinkupdate(hyperlinkevent e){ if(e.geteventtype() == HyperlinkEvent.EventType.ACTIVATED) getpage(e.geturl().tostring()); }}); add(new JScrollPane(contents), BorderLayout.CENTER); setdefaultcloseoperation(jframe.exit_on_close); setsize(400, 300); setvisible(true); }//siiani konstruktor private void getpage(string location){ try { contents.setpage(location); enter.settext(location); } catch (IOException io) { JOptionPane.showMessageDialog(this, "Viga URL lugemisel","bad URL", JOptionPane.ERROR_MESSAGE); } setcursor(cursor.getpredefinedcursor( Cursor.DEFAULT_CURSOR)); } 27
28 } public static void main(string args[]) { new Veebilehitseja(); } 28
29 Eksamitöö aines Objektorienteeritud programmeerimine Eksamitööks on aega 90 minutit. Arvutit, materjale jms. kasutada ei ole lubatud. Maksimaalselt on võimalik saada 35 punkti. Lahendustes tuleb lisaks lõppvastusele anda ka selgitusi. Kõrgelt hinnatakse õigeid vastuseid ja selgitusi. Samas omavad väärtust ka selgitused, mis näitavad mõistlikku mitmevahelolekut ning kus õige vastuse juurde viiks näiteks mõne detaili vaatamine (mida aga käesoleva eksamiformaadiga teha ei saa). 29
30 Eksamist Teemad Loenguteemad Näiteprogrammid slaididel Vajadusel lisatakse ülesandele selgitavat materjali (API, lõike loengu- või praktikumimaterjalidest) 30
31 Ülesannetest Mis ilmub ekraanile? ilma etteantud vastusteta valikvastustega selgitada Mida teeb järgmine meetod? Leida viga (aga siis tõesti viga on) Klikkeriküsimustel põhinevaid Milline järgnevatest vastustest kirjeldab kõige paremini Mis on ja milleks on kasulik? 31
32 Klassi- ja isendi Jalgrattanäide paberil 32
33 Vood 33
34 Lõime seisundid NEW A thread that has not yet started is in this state. RUNNABLE A thread executing in the Java virtual machine is in this state. BLOCKED A thread that is blocked waiting for a monitor lock is in this state. WAITING A thread that is waiting indefinitely for another thread to perform a particular action is in this state. TIMED_WAITING A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state. TERMINATED A thread that has exited is in this state. 34
35 35
36 Millise hindega oleksite rahul? 1. A 2. B 3. C 4. D 5. E 6. F 0% 0% 0% 0% 0% 0%
37 Kertu-Kertu Ceki Dening Trim Sutija kertu-kertu ceki iki aja dirampas maneh saka tanganku amarga ya mung kari kuwi woding uripku dalanku tekan sabrang marang donyaku sing wis ilang ing kasunyatan marang donyaku, donya khayali Ceki kaardid Olge peidus mu paremas käes nagu pimestav helk kaob minevikku. Istuge vaikselt, õlad põlvedel, suruge ennast mu südamesse. Tundke, kuidas te nurgad kaevuvad sügavalt mu peopessa. Tõuse jalgadele, koer! Ta hoiab midagi käes Raske on kätte saada Käes! Mis need on? Ainult kaardid Võta need ära! Hasartmäng on kriminaalne tegevus. Tühjade kätega, jälle vaikselt.
38 Edelaraudtee edel.ee 38
39 Suur tänu osalemast! Kohtumiseni! 39
Objektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 8. loeng 26. märts Eno Tõnisson 1 Kasutatud H. Heina loengumaterjalid J. Kiho Väike Java leksikon Y. D. Liang Introduction to Java Programming 2 Eelmisel nädalal loeng
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 7. loeng 25. märts Eno Tõnisson 1 Kasutatud H. Heina loengumaterjalid J. Kiho Väike Java leksikon Y. D. Liang Introduction to Java Programming 2 Eelmisel nädalal loeng
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 2. loeng 19. veebruar 2018 Marina Lepp 1 Möödunud nädalal Loeng Sissejuhatus Praktikum Paaristöö, algus Vastlapäev Sõbrapäev Hiina uusaasta 2 Umbes mitu tundi tegelesite
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 2. loeng 18. veebruar Eno Tõnisson kasutatud ka Helle Heina ja Jüri Kiho materjale 1 Eelmisel nädalal loeng sissejuhatus praktikum paaristööna Asteroid 2012 DA14 möödus
More informationObjektorienteeritud programmeerimine. 5. märts, 4. loeng Marina Lepp
Objektorienteeritud programmeerimine 5. märts, 4. loeng Marina Lepp 1 Loeng Möödunud nädalal Klassid. Isendid. Konstruktorid. Sõned. Mähisklassid Praktikum Objektid ja klassid. Muutujate skoobid. Objektide
More informationMSDE Upgrade platvormile SQL 2005 Server Express SP4
MSDE Upgrade platvormile SQL 2005 Server Express SP4 NB! Windos XP puhul peab veenduma, et masinas oleks paigaldatud.net Framework vähemalt versioon 2.0!!! NB! Muutke oma SA parool turvaliseks ( minimaalne
More informationNetworking and Security
Chapter 03 Networking and Security Mr. Nilesh Vishwasrao Patil Government Polytechnic Ahmednagar Socket Network socket is an endpoint of an interprocess communication flow across a computer network. Sockets
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 10. loeng 15. aprill Eno Tõnisson 1 Kasutatud H. Heina loengumaterjalid J. Kiho Väike Java leksikon J. Kiho Java Programmeerimise aabits Y. D. Liang Introduction to
More informationJava Help Files. by Peter Lavin. May 22, 2004
Java Help Files by Peter Lavin May 22, 2004 Overview Help screens are a necessity for making any application user-friendly. This article will show how the JEditorPane and JFrame classes, along with HTML
More informationWD My Net N600 juhend:
WD My Net N600 juhend: 1) Kui WD My Net N600 seade on ühendatud näiteks Elioni Thomsoni ruuteriga (TG789vn või TG784) või Elioni Inteno DG301a ruuteriga, kus üldiselt on ruuteri Default Gateway sama, nagu
More informationVea haldus ja logiraamat hajutatud süsteemides Enn Õunapuu.
Vea haldus ja logiraamat hajutatud süsteemides Enn Õunapuu enn.ounapuu@ttu.ee Millest tuleb jutt? Kuidas ma näen, millises sammus erinevad protsessid parasjagu on? Kuidas ma aru saan, kas protsess töötab
More informationBasic Java Network Programming. CS211 July 30 th, 2001
Basic Java Network Programming CS211 July 30 th, 2001 The Network and OSI Model IP Header TCP Header TCP/IP: A Paradox TCP Connection Oriented and Connectionless Protocols Reliable: no loss, or duplication,
More informationNAS, IP-SAN, CAS. Loeng 4
NAS, IP-SAN, CAS Loeng 4 Tunniteemad Network Attached Storage IP Storage Attached Network Content Addressed Storage Network Attached Storage Tehnoloogia, kus andmed on jagatud üle võrgu Salvestusvahendile
More informationTP-Link TL-WR743ND Juhend
TP-Link TL-WR743ND Juhend 1) Ühenda oma arvuti TP-Link ruuteriga üle kaabli (LAN). 2) Kui arvuti ja ruuter said omavahel ühendatud, siis võid minna seadme koduleheküljele (interneti brauseri otsingu reasse
More informationAndmebaasid (6EAP) I praktikum
Andmebaasid (6EAP) I praktikum Mõisteid Server on arvutisüsteem või selles töötav tarkvara, mis pakub teatud infoteenust sellega ühenduvatele klientidele. Klient on tarkvara, mis võimaldab suhelda serveriga.
More informationSocket Programming(TCP & UDP) Sanjay Chakraborty
Socket Programming(TCP & UDP) Sanjay Chakraborty Computer network programming involves writing computer programs that enable processes to communicate with each other across a computer network. The endpoint
More informationTabelid <TABLE> Koostanud: Merike Hein
Tabelid Tabelite kasutusvõimalus on HTML'is olemas juba pikka aega. Tabelimärgendite esmaseks kasutusalaks oli muidugi mõista tabelkujul info kuvamine. tähendab siis tabelite joonistamist.
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 10. loeng 9. aprill Eno Tõnisson 1 Kasutatud H. Heina loengumaterjalid J. Kiho Väike Java leksikon J. Kiho Java Programmeerimise aabits Y. D. Liang Introduction to
More informationSIDE (IRT 3930) Põhipunktid. Loeng 11 Transpordiprotokollid Teema - infotransport. Teenuse (lingi) demultipleks. Infotransport kliendilt serverini
SIDE (IRT 3930) Loeng 11 Transpordiprotokollid Teema - infotransport Klient- mudel Teenuste jaotus Infotransport klient- seoses Töökindel infoülekanne võrgukihi kaudu ja transpordiprotokollid Põhipunktid
More informationPrevious lecture: threads G51PRG: Introduction to Programming Second semester Lecture 12 URL
Previous lecture: threads G51PRG: Introduction to Programming Second semester Lecture 12 What is a thread Why use multiple threads Issues and problems involved Java threads Natasha Alechina School of Computer
More informationCOMP 213. Advanced Object-oriented Programming. Lecture 20. Network Programming
COMP 213 Advanced Object-oriented Programming Lecture 20 Network Programming Network Programming A network consists of several computers connected so that data can be sent from one to another. Network
More informationNetworking Basics. network communication.
JAVA NETWORKING API Networking Basics When you write Java programs that communicate over the network, you are programming at the application layer. Typically, you don't need to concern yourself with the
More informationIntroduction to Java.net Package. CGS 3416 Java for Non Majors
Introduction to Java.net Package CGS 3416 Java for Non Majors 1 Package Overview The package java.net contains class and interfaces that provide powerful infrastructure for implementing networking applications.
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 11. loeng, 23. aprill Marina Lepp 1 Eelmisel nädalal Loeng vood, erindid 1. kontrolltöö järeltöö Praktikum vood Ülemaailmne maapäev (22.04) 2 Umbes mitu tundi tegelesite
More informationIPv6 harjutused. Aadressi kuju, kirjaviis, osad, liigid Aadressi saamise viisid
IPv6 harjutused Aadressi kuju, kirjaviis, osad, liigid Aadressi saamise viisid IPv6 aadressi kuju IPv4 32 bitti (4 baidi kaupa) Kuju kümnendarvud 4 kaupa punktidega eraldatud 192.168.252.200 IPv6 128 bitti
More informationJava for Interfaces and Networks
Java for Interfaces and Networks Threads and Networking Federico Pecora School of Science and Technology Örebro University federico.pecora@oru.se Federico Pecora Java for Interfaces and Networks Lecture
More informationJAVA - NETWORKING (SOCKET PROGRAMMING)
JAVA - NETWORKING (SOCKET PROGRAMMING) http://www.tutorialspoint.com/java/java_networking.htm Copyright tutorialspoint.com The term network programming refers to writing programs that execute across multiple
More informationJava for Interfaces and Networks (DT3029)
Java for Interfaces and Networks (DT3029) Lecture 3 Threads and Networking Federico Pecora federico.pecora@oru.se Center for Applied Autonomous Sensor Systems (AASS) Örebro University, Sweden Capiscum
More informationMIT AITI Swing Event Model Lecture 17
MIT AITI 2004 Swing Event Model Lecture 17 The Java Event Model In the last lecture, we learned how to construct a GUI to present information to the user. But how do GUIs interact with users? How do applications
More informationSQL Server 2005 Expressi paigaldamine
SQL Server 2005 Expressi paigaldamine Laadige alla.net Framework 2.0 http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d- 8edd-aab15c5e04f5 Avage http://www.microsoft.com/express/2005/sql/download/default.aspx
More informationJava Networking (sockets)
Java Networking (sockets) Rui Moreira Links: http://java.sun.com/docs/books/tutorial/networking/toc.html#sockets http://www.javaworld.com/javaworld/jw-12-1996/jw-12-sockets_p.html Networking Computers
More informationJava.net Package and Classes(Url, UrlConnection, HttpUrlConnection)
Java.net Package and Classes(Url, UrlConnection, HttpUrlConnection) Sisoft Technologies Pvt Ltd SRC E7, Shipra Riviera Bazar, Gyan Khand-3, Indirapuram, Ghaziabad Website: www.sisoft.in Email:info@sisoft.in
More informationCSCD 330 Network Programming Spring 2018
CSCD 330 Network Programming Spring 2018 Lecture 6 Application Layer Socket Programming in Java Reading for Java Client/Server see Relevant Links Some Material in these slides from J.F Kurose and K.W.
More informationAssignment 1. Due date February 6, 2007 at 11pm. It must be submitted using submit command.
Assignment 1 Due date February 6, 2007 at 11pm. It must be submitted using submit command. Note: submit 4213 a1 . Read the manpages ("man submit") for more details on the submit command. It is
More informationRAIK 183H Examination 2 Solution. November 10, 2014
RAIK 183H Examination 2 Solution November 10, 2014 Name: NUID: This examination consists of 5 questions and you have 110 minutes to complete the test. Show all steps (including any computations/explanations)
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 9. loeng, 9. aprill Marina Lepp 1 Loeng Eelmisel nädalal sündmused, omadused Lisapraktikum Praktikum graafiline kasutajaliides 1. rühmatöö Rahvusvaheline spordipäev
More informationTopic 10: Network Programming
Topic 10: Network Programming Client-Server Model Host and Port Socket Implementing Client Implementing Server Implementing Server for Multiple Clients Client-Server Model Clients Request a server to provide
More informationOBJECT ORIENTED PROGRAMMING
1 OBJECT ORIENTED PROGRAMMING Lecture 14 Networking Basics Outline 2 Networking Basics Socket IP Address DNS Client/Server Networking Class & Interface URL Demonstrating URL Networking 3 Java is practically
More informationXmlHttpRequest asemel võib olla vajalik objekt XDomainRequest
1 2 3 XmlHttpRequest asemel võib olla vajalik objekt XDomainRequest 4 5 6 7 8 https://www.trustwave.com/global-security-report http://redmondmag.com/articles/2012/03/12/user-password-not-sophisticated.aspx
More informationJava (Networking) 40.1 Introduction HTTP protocol
40 Java (Networking) 40.1 Introduction Java is one of the fastest growing development languages and has the great advantage that it was developed after the Internet and WWW were created and thus has direct
More informationon. Interneti aadressid
Interneti aadressid Internetis on igal arvutil oma unikaalne aadress, mille abil teda eristatakse teistest arvutitest. Aadressid on kirjutatud: a) numbrilisel kujul või b) tähekombinatsioonidena. On kasutusel
More informationRAIK 183H Examination 2 Solution. November 11, 2013
RAIK 183H Examination 2 Solution November 11, 2013 Name: NUID: This examination consists of 5 questions and you have 110 minutes to complete the test. Show all steps (including any computations/explanations)
More informationPuudub protseduur. Protseduuri nimi võib olla valesti kirjutatud. Protseduuri (või funktsiooni) poole pöördumisel on vähem argumente kui vaja.
Puudub protseduur. Protseduuri nimi võib olla valesti kirjutatud. Sub prog1() Msgox "Tere" Sub prog2() a = si(1) Protseduuri (või funktsiooni) poole pöördumisel on vähem argumente kui vaja. a = Sin() Protseduuri
More informationJAVA SOCKET PROGRAMMING
JAVA SOCKET PROGRAMMING WHAT IS A SOCKET? Socket The combination of an IP address and a port number. (RFC 793 original TCP specification) The name of the Berkeley-derived application programming interfaces
More informationAJP: Chapter 2 Networking: 18 marks
AJP: Chapter 2 Networking: 18 marks Syllabus 2.1 Basics Socket overview, client/server, reserved sockets, proxy servers, internet addressing. 2.2 Java & the Net The networking classes & interfaces 2.3
More informationAdvanced Java Programming. Networking
Advanced Java Programming Networking Eran Werner and Ohad Barzilay Tel-Aviv University Advanced Java Programming, Spring 2006 1 Overview of networking Advanced Java Programming, Spring 2006 2 TCP/IP protocol
More informationSIDE (IRT 3930) Infotransport Teema - sõnumid. Avo Ots. telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst.
SIDE (IRT 3930) Loeng 8/2014 {20. okt.} Infotransport Teema - sõnumid Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo.ots@ttu.ee 281 Infoülekanne Rakendus (teenus) Transporditeenus
More informationMulti-threaded Web Server (Assignment 1) Georgios Georgiadis
Multi-threaded Web Server (Assignment 1) Georgios Georgiadis Overview Multi-threaded Web Server What to do and how to do it HTTP messages Processes and threads ComputerComm '09 2 Multi-threaded Web Server
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 8. loeng, 2. aprill Marina Lepp 1 Eelmisel nädalal Loeng graafiline kasutajaliides tunnikontroll Praktikum 1. kontrolltöö Ülestõusmispühad Naljapäev 2 1. kontrolltöö
More informationObjektorienteeritud programmeerimine
Objektorienteeritud programmeerimine 10. loeng, 16. aprill Marina Lepp 1 Eelmisel nädalal Loeng vood Lisapraktikum Praktikum sündmused Künnipäev (12.04) 2 Umbes mitu tundi tegelesite eelmisel nädalal selle
More informationInfo 408 Distributed Applications programming 2 nd semester of 2017/2018 Credits: 5 Lecturer: Dr. Antoun Yaacoub
Lebanese University Faculty of Science I Master 1 degree Computer Science Info 408 Distributed Applications programming 2 nd semester of 2017/2018 Credits: 5 Lecturer: Dr. Antoun Yaacoub Starting Network
More information2
1 2 3 4 5 St. seotud grupid 6 7 Soovitused: Vältida sidusgruppide tähtsuse järgi järjestamist. Minimeerige üksikute sidusgruppide esiletõstmist. 8 9 10 11 12 Päästeameti avalik veebileht (www.päästeamet.ee)
More informationIntroduction to Graphical User Interfaces (GUIs) Lecture 10 CS2110 Fall 2008
Introduction to Graphical User Interfaces (GUIs) Lecture 10 CS2110 Fall 2008 Announcements A3 is up, due Friday, Oct 10 Prelim 1 scheduled for Oct 16 if you have a conflict, let us know now 2 Interactive
More informationNetwork Programming. Powered by Pentalog. by Vlad Costel Ungureanu for Learn Stuff
Network Programming by Vlad Costel Ungureanu for Learn Stuff Java Network Protocols 2 Java Network Protocols 3 Addresses Innet4Address (32-bit) 85.122.23.145 - numeric pentalog.com symbolic Innet6Address
More informationDistributed Systems COMP 212. Lecture 8 Othon Michail
Distributed Systems COMP 212 Lecture 8 Othon Michail HTTP Protocol Hypertext Transfer Protocol Used to transmit resources on the WWW HTML files, image files, query results, Identified by Uniform Resource
More informationMultiple Choice Questions: Identify the choice that best completes the statement or answers the question. (15 marks)
M257 MTA Spring2010 Multiple Choice Questions: Identify the choice that best completes the statement or answers the question. (15 marks) 1. If we need various objects that are similar in structure, but
More informationInternet Protocol. Chapter 5 Protocol Layering. Juho Kim Graduate School of Information & Technology Sogang University
Internet Protocol Chapter 5 Protocol Layering Juho Kim Graduate School of Information & Technology Sogang University Department of of Computer Science and and Engineering, Sogang University Page 1 CAD
More informationPrinciples, Models and Applications for Distributed Systems M
Università degli Studi di Bologna Facoltà di Ingegneria Principles, Models and Applications for Distributed Systems M Lab assignment 2 (worked-out) Connectionless Java Sockets Luca Foschini 2010/2011 Exercise
More informationUDP Sockets TCP guarantees the delivery of packets and preserves their order on destination. Sometimes these features are not required, since they do
UDP Sockets TCP guarantees the delivery of packets and preserves their order on destination. Sometimes these features are not required, since they do not come without performance costs, it would be better
More informationLõimed. Lõime mõiste. Lõimede mudelid. Probleemid lõimedega seoses. Pthreads. Solarise lõimed. Windowsi lõimed. FreeBSD lõimed.
Lõimed Lõime mõiste Lõimede mudelid Probleemid lõimedega seoses Pthreads Solarise lõimed Windowsi lõimed FreeBSD lõimed Linuxi lõimed MEELIS ROOS 1 Ühe- ja mitmelõimelised protsessid code data files code
More informationErik Jõgi. twitter.com/erikjogi twitter.com/codeborne
Disain Erik Jõgi erik@codeborne.com twitter.com/erikjogi twitter.com/codeborne Disain? Miks? Bad code Clean Code A Handbook of Agile Software Craftsmanship Robert C. Martin, 2008 Uncle Bob You know you
More informationJava Programming Language Advance Feature
Java Programming Language Advance Feature Peter.Cheng founder_chen@yahoo.com.cn http://www.huihoo.com 2004-04 Huihoo - Enterprise Open Source http://www.huihoo.com 1 Course Goal The main goal of this course
More informationJRadioButton account_type_radio_button2 = new JRadioButton("Current"); ButtonGroup account_type_button_group = new ButtonGroup();
Q)Write a program to design an interface containing fields User ID, Password and Account type, and buttons login, cancel, edit by mixing border layout and flow layout. Add events handling to the button
More informationAssignment 2 CISC 650 Computer Networks Fall 2016 Due Date: 10/9/ :59PM ET Total Points: 100
Nova Southeastern University College of Engineering and Computing Assignment 2 CISC 650 Computer Networks Fall 2016 Due Date: 10/9/2016 11:59PM ET Total Points: 100 Note: Please include your name and the
More informationNetworking. Lecture 25 ish? COP 3252 Summer July 11, 2017
Networking Lecture 25 ish? COP 3252 Summer 2017 July 11, 2017 Open-Read/Write-Close The Unix I/O system follows a paradigm usually referred to as Open-Read/Write-Close. Before a program/process can perform
More informationEach command-line argument is placed in the args array that is passed to the static main method as below :
1. Command-Line Arguments Any Java technology application can use command-line arguments. These string arguments are placed on the command line to launch the Java interpreter after the class name: public
More informationCSE 143 Lecture 25. I/O Streams; Exceptions; Inheritance. read 9.3, 6.4. slides adapted from Marty Stepp
CSE 143 Lecture 25 I/O Streams; Exceptions; Inheritance read 9.3, 6.4 slides adapted from Marty Stepp http://www.cs.washington.edu/143/ Input and output streams stream: an abstraction of a source or target
More informationJAVA Network API. 2 - Connection-Oriented vs. Connectionless Communication
JAVA Network API To be discussed 1 - java.net... 1 2 - Connection-Oriented vs. Connectionless Communication... 1 3 - Connectionless:... 1 4 - Networking Protocols... 2 5 - Sockets... 2 6 - Multicast Addressing...
More informationCS108, Stanford Handout #22. Thread 3 GUI
CS108, Stanford Handout #22 Winter, 2006-07 Nick Parlante Thread 3 GUI GUIs and Threading Problem: Swing vs. Threads How to integrate the Swing/GUI/drawing system with threads? Problem: The GUI system
More informationLecture 3. Java Socket Programming. TCP, UDP and URL
Lecture 3 TCP, UDP and URL 1 Java Sockets Programming The package java.net provides support for sockets programming (and more). Typically you import everything defined in this package with: import java.net.*;
More informationHomeWork 3. In this homework, an ArchJava application that allows one to query one s scores in a networked environment is presented.
HomeWork 3 In this homework, an ArchJava application that allows one to query one s scores in a networked environment is presented. [1] Acme Description The architecture that has been implemented using
More informationPrinciples of Software Construction. Introduction to networks and distributed systems School of Computer Science
Principles of Software Construction Introduction to networks and distributed systems Josh Bloch Charlie Garrod School of Computer Science 1 Administrivia Homework 5 Best Frameworks available tonight Or
More informationCSE 143 Lecture 22. I/O Streams; Exceptions; Inheritance. read 9.3, 6.4. slides created by Marty Stepp
CSE 143 Lecture 22 I/O Streams; Exceptions; Inheritance read 9.3, 6.4 slides created by Marty Stepp http://www.cs.washington.edu/143/ Input and output streams stream: an abstraction of a source or target
More informationCSE 143 Lecture 21. I/O Streams; Exceptions; Inheritance. read 9.3, 6.4. slides created by Marty Stepp
CSE 143 Lecture 21 I/O Streams; Exceptions; Inheritance read 9.3, 6.4 slides created by Marty Stepp http://www.cs.washington.edu/143/ Input and output streams stream: an abstraction of a source or target
More informationCSIS 10A Assignment 7 SOLUTIONS
CSIS 10A Assignment 7 SOLUTIONS Read: Chapter 7 Choose and complete any 10 points from the problems below, which are all included in the download file on the website. Use BlueJ to complete the assignment,
More informationSQL Serveri paigaldus. Laadimine:
SQL Serveri paigaldus Laadimine: http://msdn.microsoft.com/vstudio/express/sql/download/ Tasub paigaldada kõige lihtsam versioon (SQL Server 2005 Express Edition SP2). Samalt lehelt saab laadida ka Sql
More informationScheme G Sample Question Paper Unit Test 2
Scheme G Sample Question Paper Unit Test 2 Course Name: Computer Engineering Group Course Code: CO/CD/CM/CW/IF Semester: Sixth Subject Title: Advanced Java Programming Marks: 25 Marks 17625 ---------------------------------------------------------------------------------------------------------------------------
More informationH212 Introduction to Software Systems Honors
Introduction to Software Systems Honors Lecture #19: November 4, 2015 1/14 Third Exam The third, Checkpoint Exam, will be on: Wednesday, November 11, 2:30 to 3:45 pm You will have 3 questions, out of 9,
More information1.00/1.001 Introduction to Computers and Engineering Problem Solving Fall (total 7 pages)
1.00/1.001 Introduction to Computers and Engineering Problem Solving Fall 2002 (total 7 pages) Name: TA s Name: Tutorial: For Graders Question 1 Question 2 Question 3 Total Problem 1 (20 points) True or
More informationInADS infopäev Villem Vannas Maarja Mahlapuu Janno Tetsmann
www.datel.ee InADS infopäev Villem Vannas Maarja Mahlapuu Janno Tetsmann Millest räägime Mis on InADS, kasutusjuhud Villem InADS visard keskkond Maarja Arendaja vaade: InADS API Janno Põhiline vajadus
More informationChapter 2 Applications and
Chapter 2 Applications and Layered Architectures Sockets Socket API API (Application Programming Interface) Provides a standard set of functions that can be called by applications Berkeley UNIX Sockets
More informationInterprocess Communication
Interprocess Communication Nicola Dragoni Embedded Systems Engineering DTU Informatics 4.2 Characteristics, Sockets, Client-Server Communication: UDP vs TCP 4.4 Group (Multicast) Communication The Characteristics
More informationURL Kullanımı Get URL
Networking 1 URL Kullanımı Get URL URL info 2 import java.io.*; import java.net.*; public class GetURL { public static void main(string[] args) { InputStream in = null; OutputStream out = null; // Check
More informationLab 1 : Java Sockets
Lab 1 : Java Sockets 1. Goals In this lab you will work with a low-level mechanism for distributed communication. You will discover that Java sockets do not provide: - location transparency - naming transparency
More informationObject-Oriented Programming Design. Topic : Streams and Files
Electrical and Computer Engineering Object-Oriented Topic : Streams and Files Maj Joel Young Joel Young@afit.edu. 18-Sep-03 Maj Joel Young Java Input/Output Java implements input/output in terms of streams
More informationChapter 11. Application-Layer Elements Ports
Chapter 11 Application-Layer Elements 11.1 Ports........................... 93 11.2 Sockets.......................... 95 11.2.1 Socket Domains, Types and Protocols....... 95 11.2.2 Operations on Sockets................
More informationPart 1: Investigative Research To investigate Socket Programming and its application
Part 1: Investigative Research To investigate Socket Programming and its application Abstract: Using the concept of sockets, communication between hosts and processes within the same computer are allowed.
More informationIT101. File Input and Output
IT101 File Input and Output IO Streams A stream is a communication channel that a program has with the outside world. It is used to transfer data items in succession. An Input/Output (I/O) Stream represents
More informationSystems Programming. Bachelor in Telecommunication Technology Engineering Bachelor in Communication System Engineering Carlos III University of Madrid
Systems Programming Bachelor in Telecommunication Technology Engineering Bachelor in Communication System Engineering Carlos III University of Madrid Leganés, 21st of March, 2014. Duration: 75 min. Full
More informationUnit 1 Java Networking
Q1. What is Server Socket? Discuss the difference between the Socket and ServerSocket class. The ServerSocket class (java.net) can be used to create a server socket. This object is used to establish communication
More informationIntroduction This assignment will ask that you write a simple graphical user interface (GUI).
Computing and Information Systems/Creative Computing University of London International Programmes 2910220: Graphical Object-Oriented and Internet programming in Java Coursework one 2011-12 Introduction
More informationMis on tõene? Tsüklid, failihaldus. if - näited. unless - näited. unless. Merle Sibola. if ($arv > $suur) { #leitakse suurim arv $suur=$arv; } #if
Mis on tõene? Tsüklid, failihaldus Merle Sibola iga string on tõene, välja arvatud "" ja "0" iga number on tõene, v.a. number 0 Iga viide (reference) on tõene Iga defineerimata muutuja on väär. if if (EXPR)
More informationWeb Server Project. Tom Kelliher, CS points, due May 4, 2011
Web Server Project Tom Kelliher, CS 325 100 points, due May 4, 2011 Introduction (From Kurose & Ross, 4th ed.) In this project you will develop a Web server in two steps. In the end, you will have built
More informationI/O STREAM (REQUIRED IN THE FINAL)
I/O STREAM (REQUIRED IN THE FINAL) STREAM A stream is a communication channel that a program has with the outside world. It is used to transfer data items in succession. An Input/Output (I/O) Stream represents
More informationCSCI 136 Written Exam #2 Fundamentals of Computer Science II Spring 2012
CSCI 136 Written Exam #2 Fundamentals of Computer Science II Spring 2012 Name: This exam consists of 6 problems on the following 8 pages. You may use your double- sided hand- written 8 ½ x 11 note sheet
More informationTP 2 : Application SnapTchat 20 février 2015
TP 2 : Application SnapTchat 20 février 2015 SnapTchat : cahier de charges L objectif de ce TP est de développer une simple application d échange de messages courts entre deux utilisateurs. Le cahier des
More informationA Simple Text Editor Application
CASE STUDY 7 A Simple Text Editor Application To demonstrate the JTextArea component, fonts, menus, and file choosers we present a simple text editor application. This application allows you to create
More informationDistributed Systems Recitation 2. Tamim Jabban
15-440 Distributed Systems Recitation 2 Tamim Jabban Project 1 Involves creating a Distributed File System (DFS) Released yesterday When/If done with PS1, start reading the handout Today: Socket communication!
More informationSocket 101 Excerpt from Network Programming
Socket 101 Excerpt from Network Programming EDA095 Nätverksprogrammering Originals by Roger Henriksson Computer Science Lund University Java I/O Streams Stream (swe. Ström) - A stream is a sequential ordering
More informationGetting Started in Java. Bill Pugh Dept. of Computer Science Univ. of Maryland, College Park
Getting Started in Java Bill Pugh Dept. of Computer Science Univ. of Maryland, College Park Hello, World In HelloWorld.java public class HelloWorld { public static void main(string [] args) { System.out.println(
More information