<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ro">
	<id>http://wiki.dcae.pub.ro/index.php?action=history&amp;feed=atom&amp;title=OOP_Lab_Task_6</id>
	<title>OOP Lab Task 6 - Revizia istoricului</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.dcae.pub.ro/index.php?action=history&amp;feed=atom&amp;title=OOP_Lab_Task_6"/>
	<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;action=history"/>
	<updated>2026-05-27T07:35:32Z</updated>
	<subtitle>Istoricul versiunilor pentru această pagină din wiki</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5044&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5044&amp;oldid=prev"/>
		<updated>2016-12-22T13:12:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 13:12&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l48&quot; &gt;Linia 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client &lt;/del&gt;file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame &lt;/ins&gt;file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To be able to send messages we need to do the text field responsive to the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key, so that when it is pressed, the text typed in this field is packaged as a message and sent over the connection. The packaging and send operation are already designed in the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; class, so you need only to couple the user operation on the GUI (pressing the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key) with the &amp;#039;&amp;#039;sendMessage&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To be able to send messages we need to do the text field responsive to the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key, so that when it is pressed, the text typed in this field is packaged as a message and sent over the connection. The packaging and send operation are already designed in the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; class, so you need only to couple the user operation on the GUI (pressing the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key) with the &amp;#039;&amp;#039;sendMessage&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In the constructor, call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;addActionListener&amp;lt;/code&amp;gt; method for the &amp;#039;&amp;#039;&amp;#039;JTextField&amp;#039;&amp;#039;&amp;#039; object. This method has a single argument, a reference to an object of type &amp;#039;&amp;#039;&amp;#039;ActionListener&amp;#039;&amp;#039;&amp;#039;, the object that actually does the necessary coupling. But you need a type derived from that class, specifically designed for this task, to call a method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; a.s.o. Instead of designing a new file for this class, you will define that class right at its instantiation! You need it only here, so it doesn&amp;#039;t need a name. This is an &amp;#039;&amp;#039;anonymous class&amp;#039;&amp;#039;. An anonymous class declared inside a method of some other class has the big advantage that it has access to all fields of the later class. Your anonymous class will have acces to &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s name, and to references to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; and the graphical objects. The body of this anonymous class has only one method, the overridden &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;public void actionPerformed(ActionEvent e)&amp;lt;/code&amp;gt; method of the &amp;#039;&amp;#039;&amp;#039;ActionListener&amp;#039;&amp;#039;&amp;#039;. This method is called automatically when the user presses the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key inside the graphical component to which this listener is attached (and you attach it to the text field). In this method you need to do the following:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In the constructor, call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;addActionListener&amp;lt;/code&amp;gt; method for the &amp;#039;&amp;#039;&amp;#039;JTextField&amp;#039;&amp;#039;&amp;#039; object. This method has a single argument, a reference to an object of type &amp;#039;&amp;#039;&amp;#039;ActionListener&amp;#039;&amp;#039;&amp;#039;, the object that actually does the necessary coupling. But you need a type derived from that class, specifically designed for this task, to call a method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; a.s.o. Instead of designing a new file for this class, you will define that class right at its instantiation! You need it only here, so it doesn&amp;#039;t need a name. This is an &amp;#039;&amp;#039;anonymous class&amp;#039;&amp;#039;. An anonymous class declared inside a method of some other class has the big advantage that it has access to all fields of the later class. Your anonymous class will have acces to &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s name, and to references to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; and the graphical objects. The body of this anonymous class has only one method, the overridden &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;public void actionPerformed(ActionEvent e)&amp;lt;/code&amp;gt; method of the &amp;#039;&amp;#039;&amp;#039;ActionListener&amp;#039;&amp;#039;&amp;#039;. This method is called automatically when the user presses the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key inside the graphical component to which this listener is attached (and you attach it to the text field). In this method you need to do the following:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5043&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5043&amp;oldid=prev"/>
		<updated>2016-12-22T13:11:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 13:11&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot; &gt;Linia 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;main&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;run&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the Client file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the Client file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To be able to send messages we need to do the text field responsive to the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key, so that when it is pressed, the text typed in this field is packaged as a message and sent over the connection. The packaging and send operation are already designed in the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; class, so you need only to couple the user operation on the GUI (pressing the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key) with the &amp;#039;&amp;#039;sendMessage&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To be able to send messages we need to do the text field responsive to the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key, so that when it is pressed, the text typed in this field is packaged as a message and sent over the connection. The packaging and send operation are already designed in the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; class, so you need only to couple the user operation on the GUI (pressing the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key) with the &amp;#039;&amp;#039;sendMessage&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5042&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5042&amp;oldid=prev"/>
		<updated>2016-12-22T13:09:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 13:09&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot; &gt;Linia 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# It&amp;#039;s time to add functionality to the GUI. It will be defined also in the constructor, in its second part:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# It&amp;#039;s time to add functionality to the GUI. It will be defined also in the constructor, in its second part:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the Client file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the Client file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5041&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5041&amp;oldid=prev"/>
		<updated>2016-12-22T13:07:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 13:07&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot; &gt;Linia 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* call somewhere in the constructor the parent method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;setDefaultCloseOperation&amp;lt;/code&amp;gt; whose argument tells the object what to do if the frame window is closed. We want the client application to end (so that it not remains active after the GUI interface dissapears, wasting computer resourses and needing the OS intervention to be killed). The argument value that defines this behavior is the constant value &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;EXIT_ON_CLOSE&amp;lt;/code&amp;gt; inherited from the parent class.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* call somewhere in the constructor the parent method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;setDefaultCloseOperation&amp;lt;/code&amp;gt; whose argument tells the object what to do if the frame window is closed. We want the client application to end (so that it not remains active after the GUI interface dissapears, wasting computer resourses and needing the OS intervention to be killed). The argument value that defines this behavior is the constant value &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;EXIT_ON_CLOSE&amp;lt;/code&amp;gt; inherited from the parent class.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# It&amp;#039;s time to add functionality to the GUI. It will be defined also in the constructor, in its second part:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# It&amp;#039;s time to add functionality to the GUI. It will be defined also in the constructor, in its second part:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5040&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5040&amp;oldid=prev"/>
		<updated>2016-12-22T12:54:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 12:54&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot; &gt;Linia 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* call somewhere in the constructor the parent method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;setDefaultCloseOperation&amp;lt;/code&amp;gt; whose argument tells the object what to do if the frame window is closed. We want the client application to end (so that it not remains active after the GUI interface dissapears, wasting computer resourses and needing the OS intervention to be killed). The argument value that defines this behavior is the constant value &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;EXIT_ON_CLOSE&amp;lt;/code&amp;gt; inherited from the parent class.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* call somewhere in the constructor the parent method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;setDefaultCloseOperation&amp;lt;/code&amp;gt; whose argument tells the object what to do if the frame window is closed. We want the client application to end (so that it not remains active after the GUI interface dissapears, wasting computer resourses and needing the OS intervention to be killed). The argument value that defines this behavior is the constant value &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;EXIT_ON_CLOSE&amp;lt;/code&amp;gt; inherited from the parent class.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# It&amp;#039;s time to add functionality to the GUI. It will be defined also in the constructor, in its second part:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# It&amp;#039;s time to add functionality to the GUI. It will be defined also in the constructor, in its second part:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039;&amp;#039;s constructor arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the Client file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the Client file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To be able to send messages we need to do the text field responsive to the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key, so that when it is pressed, the text typed in this field is packaged as a message and sent over the connection. The packaging and send operation are already designed in the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; class, so you need only to couple the user operation on the GUI (pressing the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key) with the &amp;#039;&amp;#039;sendMessage&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To be able to send messages we need to do the text field responsive to the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key, so that when it is pressed, the text typed in this field is packaged as a message and sent over the connection. The packaging and send operation are already designed in the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; class, so you need only to couple the user operation on the GUI (pressing the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key) with the &amp;#039;&amp;#039;sendMessage&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In the constructor, call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;addActionListener&amp;lt;/code&amp;gt; method for the &amp;#039;&amp;#039;&amp;#039;JTextField&amp;#039;&amp;#039;&amp;#039; object. This method has a single argument, a reference to an object of type &amp;#039;&amp;#039;&amp;#039;ActionListener&amp;#039;&amp;#039;&amp;#039;, the object that actually does the necessary coupling. But you need a type derived from that class, specifically designed for this task, to call a method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; a.s.o. Instead of designing a new file for this class, you will define that class right at its instantiation! You need it only here, so it doesn&amp;#039;t need a name. This is an &amp;#039;&amp;#039;anonymous class&amp;#039;&amp;#039;. An anonymous class declared inside a method of some other class has the big advantage that it has access to all fields of the later class. Your anonymous class will have acces to &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; name, and to references to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; and the graphical objects. The body of this anonymous class has only one method, the overridden &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;public void actionPerformed(ActionEvent e)&amp;lt;/code&amp;gt; method of the &amp;#039;&amp;#039;&amp;#039;ActionListener&amp;#039;&amp;#039;&amp;#039;. This method is called automatically when the user presses the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key inside the graphical component to which this listener is attached (and you attach it to the text field). In this method you need to do the following:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In the constructor, call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;addActionListener&amp;lt;/code&amp;gt; method for the &amp;#039;&amp;#039;&amp;#039;JTextField&amp;#039;&amp;#039;&amp;#039; object. This method has a single argument, a reference to an object of type &amp;#039;&amp;#039;&amp;#039;ActionListener&amp;#039;&amp;#039;&amp;#039;, the object that actually does the necessary coupling. But you need a type derived from that class, specifically designed for this task, to call a method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; a.s.o. Instead of designing a new file for this class, you will define that class right at its instantiation! You need it only here, so it doesn&amp;#039;t need a name. This is an &amp;#039;&amp;#039;anonymous class&amp;#039;&amp;#039;. An anonymous class declared inside a method of some other class has the big advantage that it has access to all fields of the later class. Your anonymous class will have acces to &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;s &lt;/ins&gt;name, and to references to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; and the graphical objects. The body of this anonymous class has only one method, the overridden &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;public void actionPerformed(ActionEvent e)&amp;lt;/code&amp;gt; method of the &amp;#039;&amp;#039;&amp;#039;ActionListener&amp;#039;&amp;#039;&amp;#039;. This method is called automatically when the user presses the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key inside the graphical component to which this listener is attached (and you attach it to the text field). In this method you need to do the following:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;getText&amp;lt;/code&amp;gt; for the &amp;#039;&amp;#039;&amp;#039;JTextField&amp;#039;&amp;#039;&amp;#039; object to read the typed string;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;getText&amp;lt;/code&amp;gt; for the &amp;#039;&amp;#039;&amp;#039;JTextField&amp;#039;&amp;#039;&amp;#039; object to read the typed string;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;sendMessage&amp;lt;/code&amp;gt; for the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039;, passing to it your name and the typed string;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;sendMessage&amp;lt;/code&amp;gt; for the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039;, passing to it your name and the typed string;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l58&quot; &gt;Linia 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 58:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Some classes used here are part of &amp;#039;&amp;#039;&amp;#039;java.awt.event&amp;#039;&amp;#039;&amp;#039; package.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Some classes used here are part of &amp;#039;&amp;#039;&amp;#039;java.awt.event&amp;#039;&amp;#039;&amp;#039; package.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To display messages in real time a separate thread is needed, so that the main thread that sends messages is not blocked by message reading when this last operation waits for a message to be received.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To display messages in real time a separate thread is needed, so that the main thread that sends messages is not blocked by message reading when this last operation waits for a message to be received.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Make the &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; class &amp;#039;&amp;#039;&amp;#039;Runnable&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Make the &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; class &amp;#039;&amp;#039;&amp;#039;Runnable&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Override the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;Runnable&amp;#039;&amp;#039;&amp;#039; interface. This method will loop forever (or until the connection is closed by the peer). In each iteration it:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Override the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;Runnable&amp;#039;&amp;#039;&amp;#039; interface. This method will loop forever (or until the connection is closed by the peer). In each iteration it:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** calls the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;readMessage&amp;lt;/code&amp;gt; for the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object to get the formatted version of the received message. This method waits until a message is received from the connection.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** calls the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;readMessage&amp;lt;/code&amp;gt; for the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object to get the formatted version of the received message. This method waits until a message is received from the connection.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** calls the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;append&amp;lt;/code&amp;gt; method for the &amp;#039;&amp;#039;&amp;#039;JTextArea&amp;#039;&amp;#039;&amp;#039; object to append the received message, together with a newline at its end.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** calls the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;append&amp;lt;/code&amp;gt; method for the &amp;#039;&amp;#039;&amp;#039;JTextArea&amp;#039;&amp;#039;&amp;#039; object to append the received message, together with a newline at its end.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** Because &amp;#039;&amp;#039;&amp;#039;readMessage&amp;#039;&amp;#039;&amp;#039; may throw an exception, enclose it in a &amp;#039;&amp;#039;&amp;#039;try&amp;#039;&amp;#039;&amp;#039;-&amp;#039;&amp;#039;&amp;#039;catch&amp;#039;&amp;#039;&amp;#039; block and catch the exception to break the loop.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** Because &amp;#039;&amp;#039;&amp;#039;readMessage&amp;#039;&amp;#039;&amp;#039; may throw an exception, enclose it in a &amp;#039;&amp;#039;&amp;#039;try&amp;#039;&amp;#039;&amp;#039;-&amp;#039;&amp;#039;&amp;#039;catch&amp;#039;&amp;#039;&amp;#039; block and catch the exception to break the loop.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In the &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; constructor instantiate a &amp;#039;&amp;#039;&amp;#039;Thread&amp;#039;&amp;#039;&amp;#039; object with the curent &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; object as the argument (use the &amp;#039;&amp;#039;&amp;#039;this&amp;#039;&amp;#039;&amp;#039; reference). For this &amp;#039;&amp;#039;&amp;#039;Thread&amp;#039;&amp;#039;&amp;#039; object call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;start&amp;lt;/code&amp;gt; method, that actually initiates the new thread which will execute the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In the &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;s &lt;/ins&gt;constructor instantiate a &amp;#039;&amp;#039;&amp;#039;Thread&amp;#039;&amp;#039;&amp;#039; object with the curent &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; object as the argument (use the &amp;#039;&amp;#039;&amp;#039;this&amp;#039;&amp;#039;&amp;#039; reference). For this &amp;#039;&amp;#039;&amp;#039;Thread&amp;#039;&amp;#039;&amp;#039; object call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;start&amp;lt;/code&amp;gt; method, that actually initiates the new thread which will execute the &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Everything is in place! Run the Server file, then run the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client &lt;/del&gt;file. You are able now to communicate between twese to client GUIs.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Everything is in place! Run the Server file, then run the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame &lt;/ins&gt;file. You are able now to communicate between twese to client GUIs.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# For more fun, run a server and ask a colleague to run a client on his computer, with the host address (set upon &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; instantiation in the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method) equal to your IP address.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# For more fun, run a server and ask a colleague to run a client on his computer, with the host address (set upon &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; instantiation in the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method) equal to your IP address.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note: If you want to declare an anonymous class derived from some class, named &amp;#039;&amp;#039;BaseClass&amp;#039;&amp;#039;, and to override the method &amp;#039;&amp;#039;baseMethod&amp;#039;&amp;#039;, use the following structure:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note: If you want to declare an anonymous class derived from some class, named &amp;#039;&amp;#039;BaseClass&amp;#039;&amp;#039;, and to override the method &amp;#039;&amp;#039;baseMethod&amp;#039;&amp;#039;, use the following structure:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l77&quot; &gt;Linia 77:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 77:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To stop correctly the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client &lt;/del&gt;some additional steps are needed at the end of the &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; constructor. A call to &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;join&amp;lt;/code&amp;gt; for the thread object will synchronize the constructor with the started thread. The constructor will wait for the thread to finish, and the thread finishes when the connection is closed or something exceptional happens. After that, you call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;close&amp;lt;/code&amp;gt; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object to close the streams. At the very end close the socket.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To stop correctly the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame &lt;/ins&gt;some additional steps are needed at the end of the &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; constructor. A call to &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;join&amp;lt;/code&amp;gt; for the thread object will synchronize the constructor with the started thread. The constructor will wait for the thread to finish, and the thread finishes when the connection is closed or something exceptional happens. After that, you call the &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;close&amp;lt;/code&amp;gt; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object to close the streams. At the very end close the socket.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Submitting ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Submitting ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5039&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5039&amp;oldid=prev"/>
		<updated>2016-12-22T12:51:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 12:51&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot; &gt;Linia 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* If you do not want the frame size to be explicitly defined, but you want it to adapt to the specified dimensions of the text area and text field, call the method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;pack&amp;lt;/code&amp;gt;, inherited from the parent &amp;#039;&amp;#039;&amp;#039;JFrame&amp;#039;&amp;#039;&amp;#039; class.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* If you do not want the frame size to be explicitly defined, but you want it to adapt to the specified dimensions of the text area and text field, call the method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;pack&amp;lt;/code&amp;gt;, inherited from the parent &amp;#039;&amp;#039;&amp;#039;JFrame&amp;#039;&amp;#039;&amp;#039; class.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In order to display the frame, call the parent class method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;setVisible&amp;lt;/code&amp;gt; with the proper argument value.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In order to display the frame, call the parent class method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;setVisible&amp;lt;/code&amp;gt; with the proper argument value.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Your frame is ready to be displayed. You need only to explicitly instantiate a &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Your frame is ready to be displayed. You need only to explicitly instantiate a &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Add to &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; class the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, and put a single statement inside, the instantiation of a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. Run the class and you will see a window like the one shown above.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Add to &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; class the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, and put a single statement inside, the instantiation of a &amp;#039;&amp;#039;&amp;#039;ClientFrame&amp;#039;&amp;#039;&amp;#039; object. Run the class and you will see a window like the one shown above.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Cosmeticize the GUI class as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Cosmeticize the GUI class as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot; &gt;Linia 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; object encapsulates a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object which manages the communication between clients. Instantiate a &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; in the constructor. Its instantiation needs two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; object. Change the &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; constructor declaration so that it accepts two arguments, the name and a reference to a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039;. These two arguments are passed to the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; instantiation. The reference to &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; needs to be an instance field too, in order to allow the ClientPeer to interact with the GUI.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Change the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method so that it instantiates a &amp;#039;&amp;#039;&amp;#039;Socket&amp;#039;&amp;#039;&amp;#039; connected to some peer host (try first with the local host, &amp;quot;127.0.0.1&amp;quot;), and then it instantiates a &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; with that socket.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Modify the class &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039; so that its &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, instead of instantiating and running a &amp;#039;&amp;#039;&amp;#039;ServerPeer&amp;#039;&amp;#039;&amp;#039; (which no longer exists in this project), instantiates a &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; object. The &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;s constructor &lt;/ins&gt;arguments are a string (the name of the client on the server side) and a socket returned by the &amp;#039;&amp;#039;&amp;#039;accept&amp;#039;&amp;#039;&amp;#039; method called for the &amp;#039;&amp;#039;&amp;#039;ServerSocket&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the Client file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* You are now ready to open a connection. Run first the Server file, then run the Client file. After the connection is established you will see two client GUIs on the screen. For the moment they do not communicate.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To be able to send messages we need to do the text field responsive to the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key, so that when it is pressed, the text typed in this field is packaged as a message and sent over the connection. The packaging and send operation are already designed in the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; class, so you need only to couple the user operation on the GUI (pressing the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key) with the &amp;#039;&amp;#039;sendMessage&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To be able to send messages we need to do the text field responsive to the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key, so that when it is pressed, the text typed in this field is packaged as a message and sent over the connection. The packaging and send operation are already designed in the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; class, so you need only to couple the user operation on the GUI (pressing the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key) with the &amp;#039;&amp;#039;sendMessage&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5038&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5038&amp;oldid=prev"/>
		<updated>2016-12-22T12:50:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 12:50&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot; &gt;Linia 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** The &amp;#039;&amp;#039;&amp;#039;close&amp;#039;&amp;#039;&amp;#039; method needs now to close both streams, the input stream and the output stream.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** The &amp;#039;&amp;#039;&amp;#039;close&amp;#039;&amp;#039;&amp;#039; method needs now to close both streams, the input stream and the output stream.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Remember! All fields are private, all methods are public.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Remember! All fields are private, all methods are public.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The client will be enclosed in a graphical user interface (GUI) frame, with two areas, one for typing the messages to be sent, and another area that displays in real time all messages. A message is sent the moment you press the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key. Also, when &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; is pressed the write area is emptied and your message is shown as the last message in the display area. All messages, sent and received, are displayed as formatted strings &amp;#039;&amp;#039;name&amp;#039;&amp;#039;:&amp;#039;&amp;#039;message&amp;#039;&amp;#039;. Add to your package a class named &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;lt;/code&amp;gt;, that will manage the GUI frame and the ClientPeer&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. You may reuse the &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; class from the previous package, but it needs to be thorougly modified, so it&amp;#039;s better to create it from scratch&lt;/del&gt;. This class will be designed in two steps. First, you design the GUI frame. Then you will add the functionality, coupling the GUI frame to the ClientPeer object. The GUI frame to design is the following:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The client will be enclosed in a graphical user interface (GUI) frame, with two areas, one for typing the messages to be sent, and another area that displays in real time all messages. A message is sent the moment you press the &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; key. Also, when &amp;#039;&amp;#039;Enter&amp;#039;&amp;#039; is pressed the write area is emptied and your message is shown as the last message in the display area. All messages, sent and received, are displayed as formatted strings &amp;#039;&amp;#039;name&amp;#039;&amp;#039;:&amp;#039;&amp;#039;message&amp;#039;&amp;#039;. Add to your &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;&amp;#039;labutil&amp;#039;&amp;#039;&amp;#039; &lt;/ins&gt;package a class named &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;lt;/code&amp;gt;, that will manage the GUI frame and the ClientPeer. This class will be designed in two steps. First, you design the GUI frame. Then you will add the functionality, coupling the GUI frame to the ClientPeer object. The GUI frame to design is the following:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#[[Fişier:lab6_client.png]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#[[Fişier:lab6_client.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; class extends the &amp;#039;&amp;#039;&amp;#039;JFrame&amp;#039;&amp;#039;&amp;#039; class from the &amp;#039;&amp;#039;&amp;#039;javax.swing&amp;#039;&amp;#039;&amp;#039; package. An object of JFrame type is a GUI frame, to be open as a separate window on your screen. The frame itself, with its three upper right buttons, is drawn automatically by the JFrame object on the screen upon JFrame instantiation. You need to design only the content of the framed window (the so called &amp;#039;&amp;#039;content pane&amp;#039;&amp;#039;), and all this may be done inside the constructor of the &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; class, so that the frame is fully drawn upon its instantiation.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; class extends the &amp;#039;&amp;#039;&amp;#039;JFrame&amp;#039;&amp;#039;&amp;#039; class from the &amp;#039;&amp;#039;&amp;#039;javax.swing&amp;#039;&amp;#039;&amp;#039; package. An object of JFrame type is a GUI frame, to be open as a separate window on your screen. The frame itself, with its three upper right buttons, is drawn automatically by the JFrame object on the screen upon JFrame instantiation. You need to design only the content of the framed window (the so called &amp;#039;&amp;#039;content pane&amp;#039;&amp;#039;), and all this may be done inside the constructor of the &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; class, so that the frame is fully drawn upon its instantiation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The content pane for the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client &lt;/del&gt;has two parts, the display area and the typing area. These areas will be handled by two objects, that you instantiate as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* The content pane for the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame &lt;/ins&gt;has two parts, the display area and the typing area. These areas will be handled by two objects, that you instantiate as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** a &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;JTextArea&amp;lt;/code&amp;gt; object, instantiated with two arguments, the number of lines and the length of a line in number of characters. Instantiate the display area to have 10 lines with 40 characters per line.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** a &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;JTextArea&amp;lt;/code&amp;gt; object, instantiated with two arguments, the number of lines and the length of a line in number of characters. Instantiate the display area to have 10 lines with 40 characters per line.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** a &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;JTextField&amp;lt;/code&amp;gt; object, instantiated with one argument, the length of the line in number of characters;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#** a &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;JTextField&amp;lt;/code&amp;gt; object, instantiated with one argument, the length of the line in number of characters;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot; &gt;Linia 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In order to display the frame, call the parent class method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;setVisible&amp;lt;/code&amp;gt; with the proper argument value.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* In order to display the frame, call the parent class method &amp;lt;code style=&amp;quot;color:green;&amp;quot;&amp;gt;setVisible&amp;lt;/code&amp;gt; with the proper argument value.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Your frame is ready to be displayed. You need only to explicitly instantiate a &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Your frame is ready to be displayed. You need only to explicitly instantiate a &amp;#039;&amp;#039;&amp;#039;Client&amp;#039;&amp;#039;&amp;#039; object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Add to &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; class the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, and put a single statement inside, the instantiation of a &amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Client&lt;/del&gt;&amp;#039;&amp;#039;&amp;#039; object. Run the class and you will see a window like the one shown above.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Add to &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; class the &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; method, and put a single statement inside, the instantiation of a &amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ClientFrame&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039; object. Run the class and you will see a window like the one shown above.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Cosmeticize the GUI class as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Cosmeticize the GUI class as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* declare the &amp;#039;&amp;#039;&amp;#039;JtextArea&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;JTextField&amp;#039;&amp;#039;&amp;#039; references as instance fields, so that they are accesible outside the constructor in this class. You will need them to couple the ClientPeer to user interface.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* declare the &amp;#039;&amp;#039;&amp;#039;JtextArea&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;JTextField&amp;#039;&amp;#039;&amp;#039; references as instance fields, so that they are accesible outside the constructor in this class. You will need them to couple the ClientPeer to user interface.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5037&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5037&amp;oldid=prev"/>
		<updated>2016-12-22T12:43:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 12:43&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;Linia 16:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 16:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# Create a new project, named &amp;#039;&amp;#039;&amp;#039;oop_lab6&amp;#039;&amp;#039;&amp;#039; and use the same package &amp;#039;&amp;#039;&amp;#039;labutil&amp;#039;&amp;#039;&amp;#039;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# For this task you need the previously designed classes &amp;#039;&amp;#039;&amp;#039;Message&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. They are inside the package &amp;#039;&amp;#039;&amp;#039;labutil&amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# For this task you need the previously designed classes &amp;#039;&amp;#039;&amp;#039;Message&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, from OOP Lab Task 5&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The class &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039;, which was used in the previous laboratory only to send messages, will manage a bidirectional connection, to send AND receive messages through it.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The class &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039;, which was used in the previous laboratory only to send messages, will manage a bidirectional connection, to send AND receive messages through it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Beside the &amp;#039;&amp;#039;&amp;#039;ObjectOutputStream&amp;#039;&amp;#039;&amp;#039; you need an input stream to read &amp;#039;&amp;#039;&amp;#039;Message&amp;#039;&amp;#039;&amp;#039; objects from. The following things need to be added to this class:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Beside the &amp;#039;&amp;#039;&amp;#039;ObjectOutputStream&amp;#039;&amp;#039;&amp;#039; you need an input stream to read &amp;#039;&amp;#039;&amp;#039;Message&amp;#039;&amp;#039;&amp;#039; objects from. The following things need to be added to this class:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5036&amp;oldid=prev</id>
		<title>Zhascsi: /* Requirements */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=5036&amp;oldid=prev"/>
		<updated>2016-12-22T12:40:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 22 decembrie 2016 12:40&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;Linia 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Requirements ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create a new project, named &amp;#039;&amp;#039;&amp;#039;oop_lab6&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create a new project, named &amp;#039;&amp;#039;&amp;#039;oop_lab6&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;&amp;#039; and use the same package &amp;#039;&amp;#039;&amp;#039;labutil&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# For this task you need the previously designed classes &amp;#039;&amp;#039;&amp;#039;Message&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039;, from OOP Lab Task 5&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. Copy their source .java files inside this package (letting NetBeans to refactor them or manually changing their package statement to make these classes part of this package)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# For this task you need the previously designed classes &amp;#039;&amp;#039;&amp;#039;Message&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Server&amp;#039;&amp;#039;&amp;#039;, from OOP Lab Task 5.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The class &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039;, which was used in the previous laboratory only to send messages, will manage a bidirectional connection, to send AND receive messages through it.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# The class &amp;#039;&amp;#039;&amp;#039;ClientPeer&amp;#039;&amp;#039;&amp;#039;, which was used in the previous laboratory only to send messages, will manage a bidirectional connection, to send AND receive messages through it.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Beside the &amp;#039;&amp;#039;&amp;#039;ObjectOutputStream&amp;#039;&amp;#039;&amp;#039; you need an input stream to read &amp;#039;&amp;#039;&amp;#039;Message&amp;#039;&amp;#039;&amp;#039; objects from. The following things need to be added to this class:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#* Beside the &amp;#039;&amp;#039;&amp;#039;ObjectOutputStream&amp;#039;&amp;#039;&amp;#039; you need an input stream to read &amp;#039;&amp;#039;&amp;#039;Message&amp;#039;&amp;#039;&amp;#039; objects from. The following things need to be added to this class:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=4914&amp;oldid=prev</id>
		<title>Zhascsi: /* Submitting */</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=OOP_Lab_Task_6&amp;diff=4914&amp;oldid=prev"/>
		<updated>2016-11-09T23:34:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Submitting&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ro&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versiunea anterioară&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versiunea de la data 9 noiembrie 2016 23:34&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l83&quot; &gt;Linia 83:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linia 83:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The assignment will be evaluated automatically by the [http://homework.dcae.pub.ro:/WebObjects/Web-CAT.woa Web-CAT] platform.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The assignment will be evaluated automatically by the [http://homework.dcae.pub.ro:/WebObjects/Web-CAT.woa Web-CAT] platform.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* You could access the Web-CAT platform using the username and the password with which you acces the &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;electronica.curs.pub.ro&amp;lt;/span&amp;gt; intranet.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* You could access the Web-CAT platform using the username and the password with which you acces the &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;electronica.curs.pub.ro&amp;lt;/span&amp;gt; intranet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Select the OOP &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Laboratory &lt;/del&gt;6 assignment.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Select the OOP &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Lab Task &lt;/ins&gt;6 assignment.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Submit your work as a single .zip archive (give it whatever name you choose) containing only the Java source code files.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Submit your work as a single .zip archive (give it whatever name you choose) containing only the Java source code files.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Attention&amp;#039;&amp;#039;&amp;#039;&amp;lt;/font&amp;gt; Any deviation from these instructions may lead to the loss of the entire amount of points.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Attention&amp;#039;&amp;#039;&amp;#039;&amp;lt;/font&amp;gt; Any deviation from these instructions may lead to the loss of the entire amount of points.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhascsi</name></author>
	</entry>
</feed>