Object Oriented Programming: Diferență între versiuni

De la WikiLabs
Jump to navigationJump to search
(Pagină nouă: == Lab Design and Purpose == The purpose of the Object Oriented Programming lab is to teach to the student the concepts of object oriented paradigm, the assimilation of a new program...)
 
 
(Nu s-au afișat 25 de versiuni intermediare efectuate de alți 3 utilizatori)
Linia 1: Linia 1:
== Lab Design and Purpose ==
== Lab Design and Purpose ==


The purpose of the Object Oriented Programming lab is to teach to the student the concepts of object oriented paradigm, the assimilation of a new programming language, Java, as well as the familiarization with specific programming techniques.
The purpose of the Object Oriented Programming lab is to teach to the student the concepts of object oriented paradigm, assimilation of a new programming language, Java, as well as familiarization with specific programming techniques.


<div class="regula"><font color="#ff0000">Attention:</font> All the tasks in this lab start from the premises that you are already familiar with the C language synatx.</div>
<div class="regula"><font color="#ff0000">Attention:</font> All the tasks in this lab start from the premises that you are already familiar with the C language synatx.</div>
Linia 10: Linia 10:
== Tutorials and Documentation ==
== Tutorials and Documentation ==


# [[The Object Oriented Paradigm; Classes and Objects]]. [[Notions About the Java Language]]. [[Writing and Executing a Java Program]]. [[Java Syntax; A Program's Lexical Structure]]. [[Coding Conventions]].
# [[The Object Oriented Paradigm; Classes and Objects]]. [[Notions About the Java Language]]. [[Writing and Executing a Java Program]]. [[Java Syntax; A Program's Lexical Structure]]. [[Java Coding Conventions]].
# [[Advanced Notions About Object Oriented Programming]]. [[Java Application Programming Interface (API) (EN)|Java Application Programming Interface (API)]]
# [[Advanced Notions About Object Oriented Programming]]. [[Java Application Programming Interface (API) (EN)|Java Application Programming Interface (API)]]
# [[Exception Handling]]. [[Input/Output Streams]].
# [[Exception Handling]]. [[Input/Output Streams]].
# [[Serialization]]. [[Network Sockets]].
# [[Serialization]]. [[Network Sockets]].
# [[Concurrent Programming - Threads]].
# [[Concurrent Programming - Threads]].
# [[Graphical User Interface (GUI) - Java Swing and JavaFX]].
# [[Graphical User Interface (GUI) - Java Swing]].


== Lab Tasks ==
== Lab Tasks ==
# [[OOP Lab Task 1]]
# [[OOP Lab Task 1]]
# [[OOP Lab Task 2]]
# [[OOP Lab Task 2]]
Linia 32: Linia 31:
=== Windows Installation ===
=== Windows Installation ===


For Windows, the file downloaded during the previous step should have an ''.exe'' extension. Run this executable file as you would do any other (with Administrator rights), select the default options and wait for the installation to finish.  
For Windows, the file downloaded during the previous step should have an ''.exe'' extension. Run this executable file as you would do any other (with Administrator rights), select the default options and wait for the installation to finish. You can safely dismiss the installation of any browser plugins like "Ask Toolbar" or similar ad-ware.
 
Pentru Windows, fișierul descărcat la pasul anterior trebuie să aiba extensia ''.exe''. Rulați executabilul ca orice alt program (cu drepturi de administrator), selectați opțiunile implicite și așteptați să se termine instalarea.
 


Mai departe, căutați folder-ul unde a fost instalat JDK-ul și intrați în sub-folder-ul numit '''bin''', dați click dreapta pe calea curentă și selectați '''''Copy''''' sau '''''Copy address as text'''''. Aceasta ar trebui să arate similar cu: ''C:\Program Files\Java\jdk1.7.0_05\bin''. În continuare, din Control Panel, selectați opțiunea '''View advanced system settings''', iar în fereastra care se deschide, dați click pe butonul '''Environment Variables...''' În categoria ''System variables'', căutați variabila '''Path''', selectați-o și dați click pe '''Edit...''' În câmpul ''Variable value'', duceți cursorul la finalul liniei, tastați caracterul ";" și apoi ''paste'' folosind combinația de taste '''Ctrl + v'''. Click apoi pe '''OK''' până se închid toate ferestrele.
Next, look for the directory in which the JDK has been installed and enter the '''bin''' sub-directory. Right-click on the current path and select '''''Copy''''' or '''''Copy address as text'''''. This should look similar to ''C:\Program Files\Java\jdk1.7.0_05\bin''. Next, from Control Panel, select '''View advanced system settings''', and in the window that opens, click '''Environment variables...'''. In ''System variables'', look for '''Path''', select it, then click '''Edit...'''. In the field ''Variable value'', move the cursor to the end on the line, add a semicolon (;), then ''paste'' the path copied in the previous step. Click '''OK''' until all windows close.


To verify the installation, open a console (Start, type "cmd" then enter, or Start -> Run -> "cmd" <enter> for Windows XP) and type '''javac -version'''. If the reply is similar to ''javac 1.7.0_05'', then the installation was successful, but if is instead '' 'javac' is not recognized as an internal or external command, operable program or batch file.'', then start over the previous steps and try again.


Pentru verificare, deschideți o consolă (Start, tastați "cmd" apoi enter, sau Start -> Run -> "cmd" enter pentru Windows XP) și tastați '''javac -version'''. Dacă răspunsul este similar cu ''javac 1.7.0_05'' atunci instalarea s-a făcut cu succes, dacă în schimb este '' 'javac' is not recognized as an internal or external command, operable program or batch file.'' atunci reluați pașii anteriori și încercați din nou.
=== Linux Installation ===


=== Instalare Linux ===
For Ubuntu based Linux distributions, open a terminal and type the following commands:
 
Pentru Ubuntu 12.04, deschideți un terminal și tastați următoarele comenzi:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo add-apt-repository ppa:webupd8team/java
sudo add-apt-repository ppa:webupd8team/java
Linia 51: Linia 46:
</syntaxhighlight>
</syntaxhighlight>


== Tutorial Instalare Netbeans IDE ==
== Netbeans IDE Installation Tutorial==
 
For all operating systems, follow the instruction on [http://netbeans.org/community/releases/74/install.html official website]. Choose the Java SE installer for downloading.
<!--
== Results ==
 
* 2014 - 2015
** [https://docs.google.com/spreadsheets/d/1iElXyQjwazNC0uETGqmmClMtmIjgc874s1wRlbiE9y4/edit?usp=sharing Series G]
 
== Project Presentation ==
 
The lab project presentation will take place on Saturday and Sunday (7 and 8 of February), according to the table below. People who sign up and participate in the presentation must be present ten minutes before the scheduled time so they can download the code from e-mail, compile and run the application.
 
 
In the table there are two slots for each time, because there will be two lab assistants evaluating the projects. Try and fill up the times and slots in order. The Sunday slots will be made available only after the Saturday ones are completely filled up.
 
 
Sign-ups [https://docs.google.com/spreadsheets/d/1-o4SYpKb9ZduKfSp6-LW-yLbSpT6Wd9iuXFIGJauBE8/edit?usp=sharing here].
 
== Project for Lab Regrading 2014-2015 ==


Pentru toate sistemele de operare, urmăriți instrucțiunile prezentate pe [http://netbeans.org/community/releases/72/install.html site-ul oficial]. Pentru descărcare selectați installer-ul Java SE.
The subject for the [[OOP Project 2014-2015]] has been published.
-->

Versiunea curentă din 22 decembrie 2016 13:49

Lab Design and Purpose

The purpose of the Object Oriented Programming lab is to teach to the student the concepts of object oriented paradigm, assimilation of a new programming language, Java, as well as familiarization with specific programming techniques.

Attention: All the tasks in this lab start from the premises that you are already familiar with the C language synatx.


Attention: All of the files/ programs developed during each lab must be saved, either by e-mail or an USB stick.

Tutorials and Documentation

  1. The Object Oriented Paradigm; Classes and Objects. Notions About the Java Language. Writing and Executing a Java Program. Java Syntax; A Program's Lexical Structure. Java Coding Conventions.
  2. Advanced Notions About Object Oriented Programming. Java Application Programming Interface (API)
  3. Exception Handling. Input/Output Streams.
  4. Serialization. Network Sockets.
  5. Concurrent Programming - Threads.
  6. Graphical User Interface (GUI) - Java Swing.

Lab Tasks

  1. OOP Lab Task 1
  2. OOP Lab Task 2
  3. OOP Lab Task 3
  4. OOP Lab Task 4
  5. OOP Lab Task 5
  6. OOP Lab Task 6

Installation Tutorial for Java Developer's Kit

The installation kit required for compiling and executing a Java program can be downloaded from the Oracle website. Select Java Platform (JDK), in the next page select Accept License Agreement and then your operating system.

Windows Installation

For Windows, the file downloaded during the previous step should have an .exe extension. Run this executable file as you would do any other (with Administrator rights), select the default options and wait for the installation to finish. You can safely dismiss the installation of any browser plugins like "Ask Toolbar" or similar ad-ware.

Next, look for the directory in which the JDK has been installed and enter the bin sub-directory. Right-click on the current path and select Copy or Copy address as text. This should look similar to C:\Program Files\Java\jdk1.7.0_05\bin. Next, from Control Panel, select View advanced system settings, and in the window that opens, click Environment variables.... In System variables, look for Path, select it, then click Edit.... In the field Variable value, move the cursor to the end on the line, add a semicolon (;), then paste the path copied in the previous step. Click OK until all windows close.

To verify the installation, open a console (Start, type "cmd" then enter, or Start -> Run -> "cmd" <enter> for Windows XP) and type javac -version. If the reply is similar to javac 1.7.0_05, then the installation was successful, but if is instead 'javac' is not recognized as an internal or external command, operable program or batch file., then start over the previous steps and try again.

Linux Installation

For Ubuntu based Linux distributions, open a terminal and type the following commands:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Netbeans IDE Installation Tutorial

For all operating systems, follow the instruction on official website. Choose the Java SE installer for downloading.