Kapitulli 8 Dizenjimi i klasave. Alda KIKA

Size: px
Start display at page:

Download "Kapitulli 8 Dizenjimi i klasave. Alda KIKA"

Transcription

1 Kapitulli 8 Dizenjimi i klasave Alda KIKA

2 Qellimet Te kuptohet shtrirja per variablat lokale dhe variablat e instances Te mesohet rreth paketave

3 Shtrirja e variablave lokale Shtrirja e variablit: Rajoni i programit ne te cilen variabli mund te aksesohet. Shtrirja e variablit lokal zgjerohet nga deklarimi i variablave deri ne fund te bllokut qe e mbyll ate.

4 Shtrirja e variablave lokale Ndonjehere i njejti emer variabli perdoret ne te dy metodat: public class RectangleTester public static double area(rectangle rect) double r = rect.getwidth() * rect.getheight(); return r; public static void main(string[] args) Rectangle r = new Rectangle(5, 10, 20, 30); double a = area(r); System.out.println(r); Keto variabla jane te pavarura nga njeri tjetri

5 Shtrirja e variablave lokale Shtrirja e variablave lokale nuk mund te permbaje deklarimin e nje variabli tjeter me te njejtin emer: Rectangle r = new Rectangle(5, 10, 20, 30); if (x >= 0) double r = Math.sqrt(x); // Error - can't declare another variable // called r here...

6 Shtrirja e variablave lokale Megjithate, mund te kemi variabla lokale me te njejtin emer nese rajonet e shtrirjes nuk priten: if (x >= 0) double r = Math.sqrt(x);... // Scope of r ends here else Rectangle r = new Rectangle(5, 10, 20, 30); // OK - it is legal to declare another r here...

7 Mbivendosja e shtrirjeve Nje variabel lokal mund te erresoje nje variabel instance me te njejtin emer Shtrirja lokale fiton kundrejt shtrirjes se klases: public class Coin... public double getexchangevalue(double exchangerate) double value; // Local variable... return value; private String name; private double value; // variable with the same name

8 Mbivendosja e shtrirjeve Mund te aksesoni variablat e erresuara duke perdorur referencen this : value = this.value * exchangerate;

9 Mbivendosja e shtrirjeve Pergjithesisht, erresimi i nje variabli instance gjeneron gabime dhe eshte e veshtire per tu lexuar Perjashtim: kur implementohen konstruktoret ose metodat setter, mund te jete e bezdisshme te gjenden emra te ndryshem per variablat e instances dhe parametrat OK: public Coin(double value, String name) this.value = value; this.name = name;

10 Pyetje Konsideroni programin e meposhtem qe perdor dy variabla te emeruara r. A eshte legale? public class RectangleTester public static double area(rectangle rect) double r = rect.getwidth() * rect.getheight(); return r; public static void main(string[] args) Rectangle r = new Rectangle(5, 10, 20, 30); double a = area(r); System.out.println(r); Pergjigje: Po. Shtrirjet jane te shkeputura.

11 Pyetje Cila eshte shtrirja e variablit balance te klases BankAccount? Pergjigje: Ajo fillon nga fillimi i klases dhe perfundon ne fund te klases.

12 Paketat Package: Bashkesi e klasave qe kane lidhje Disa paketa te rendesishme te Javes: Package Purpose Sample Class java.lang Language support Math java.util Utilities Random java.io Input and output PrintStream java.awt Abstract Windowing Toolkit Color java.applet Applets Applet java.net Networking Socket java.sql Database Access ResultSet javax.swing Swing user interface JButton omg.w3c.dom Document Object Model for XML documents Document

13 Organizimi i klasave qe kane lidhje ne paketa Per te vendosur klasat ne pakete, duhet te vendosni nje rresht package packagename; si instruksioni i pare ne skedarin burim qe permban klasat Emri i paketes perbehet nga nje ose me shume identifikues te ndare nga pikat

14 Organizimi i klasave qe kane lidhje ne paketa Per shembull, per te vendosur klasen Financial class ne nje pakete te quajtur com.horstmann.bigjava, skedari Financial.java duhet te filloje si: package com.horstmann.bigjava; public class Financial... Paketat default nuk kane emra dhe as instruksionin package

15 Sintakse Specifikimi i Package

16 Importimi i Paketave Mund te perdorin gjithmone klasat pa import: java.util.scanner in = new java.util.scanner(system.in); Import ju lejon te perdorni emra klasash me te shkurtra: import java.util.scanner;... Scanner in = new Scanner(System.in) Mund te importoni te gjitha klasat ne paketa: import java.util.*; Nuk ka nevoje te importoni java.lang Nuk eshte e nevojshme te importoni klasat ne te njejten pakete

17 Emrat e paketave Perdorni paketat per te evituar perplasjet e emrave java.util.timer kundrejt javax.swing.timer Emrat e paketave duhet te jene te qarta Rekomandim: filloni me nje domain name te kthyer mbrapsht: com.horstmann.bigjava edu.sjsu.cs.walters: per klasat e Britney Walters (walters@cs.sjsu.edu) Emri i pathit duhet te perputhet me emrin e skedarit: com/horstmann/bigjava/financial.java

18 Paketat dhe skedaret burim Direktoria baze: mban skedaret e programit tuaj Emri i Path-it, relative me direktorine e bazes, duhet te perputhet me emrin e paketes: com/horstmann/bigjava/financial.java

19 Pyetje Cila nga te meposhtmet jane paketa? a. java b. java.lang c. java.util d. java.lang.math Pergjigje: a.jo b.po c.po d.jo

20 Pyetje A eshte nje program Java pa instruksione import i limituar per te perdorur vetem paketen java.lang? Pergjigje: Jo mund te perdorni emrin e plote te klasave si java.util.random dhe java.awt.rectangle.

21 Pyetje Supozoni se detyrat tuaja jane te vendosura ne direktorine /home/me/cs101 (c:\users\me\cs101 ne Windows). Instruktori juaj ju thote ti vendosni detyrat ne paketa. Ne cilen direktori do ta vendosnit klasen hw1.problem1.tictactoetester? Pergjigje: /home/me/cs101/hw1/problem1 ose, ne Windows, c:\users\me\cs101\hw1\problem1

Chapter Goals. Chapter 7 Designing Classes. Discovering Classes Actors (end in -er, -or) objects do some kinds of work for you: Discovering Classes

Chapter Goals. Chapter 7 Designing Classes. Discovering Classes Actors (end in -er, -or) objects do some kinds of work for you: Discovering Classes Chapter Goals Chapter 7 Designing Classes To learn how to discover appropriate classes for a given problem To understand the concepts of cohesion and coupling To minimize the use of side effects To document

More information

Chapter 8 Designing Classes. Big Java by Cay Horstmann Copyright 2009 by John Wiley & Sons. All rights reserved.

Chapter 8 Designing Classes. Big Java by Cay Horstmann Copyright 2009 by John Wiley & Sons. All rights reserved. Chapter 8 Designing Classes Chapter Goals To learn how to discover appropriate classes for a given problem To understand the concepts of cohesion and coupling To minimize the use of side effects To document

More information

Chapter 9. Designing Classes. Chapter Goals. Chapter Goals. Choosing Classes. Choosing Classes. Self Test

Chapter 9. Designing Classes. Chapter Goals. Chapter Goals. Choosing Classes. Choosing Classes. Self Test Chapter 9 Designing Classes Chapter Goals To learn how to choose appropriate classes to implement To understand the concepts of cohesion and coupling To minimize the use of side effects To document the

More information

Designing Classes Advanced Programming ICOM 4015 Lecture 8 Reading: Java Concepts Chapter 8

Designing Classes Advanced Programming ICOM 4015 Lecture 8 Reading: Java Concepts Chapter 8 Designing Classes Advanced Programming ICOM 4015 Lecture 8 Reading: Java Concepts Chapter 8 Fall 2006 Adapded from Java Concepts Slides 1 Chapter Goals To learn how to choose appropriate classes to implement

More information

Chapter Goals. Chapter Eight: Designing Classes Contined. Choosing Classes

Chapter Goals. Chapter Eight: Designing Classes Contined. Choosing Classes Chapter Goals To learn how to choose appropriate classes to implement To understand the concepts of cohesion and coupling To minimize the use of side effects To document the responsibilities of methods

More information

Baza te Infomatikes Leksioni 4

Baza te Infomatikes Leksioni 4 Baza te Infomatikes Leksioni 4 Elisa Reçi Universiteti Luigj Gurakuqi Fakulteti i Shkencave te Natyres Departamenti i Matematikes dhe Informatikes SHKODER MSc. Elisa Reci 1 Struktura e C++ // Ky eshte

More information

BAZAT E PROGRAMIMIT PJESA 3 PROF.DR. ERMIR ROGOVA

BAZAT E PROGRAMIMIT PJESA 3 PROF.DR. ERMIR ROGOVA BAZAT E PROGRAMIMIT PJESA 3 PROF.DR. ERMIR ROGOVA MATERIALI I SHTJELLUAR NE KËTË LIGJËRATË ËSHTË MARRË NGA LIBRI: BAZAT E PROGRAMIMIT NË C++, AGNI DIKA OPERATORËT LOGJIKË PËR KRAHASIMIN E MË SHUMË SHPREHJEVE

More information

Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kompjuterike. Gjuhë programuese C++ MSc. Vehbi NEZIRI

Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kompjuterike. Gjuhë programuese C++ MSc. Vehbi NEZIRI Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kompjuterike Gjuhë programuese C++ MSc. Vehbi NEZIRI 1 Aktivizimi i editorit 2 Aktivizimi i editorit 3 Hapja e projektit të ri 4 Struktura

More information

Blloqet e urdherave ne dege

Blloqet e urdherave ne dege Blloqet e urdherave ne dege Gjuhet programore www.shmk-negotine.edu.mk S. Latifi 1 Kushtet e shumëfishta krijohen duke i kombinuar disa kushte Kushtet e shumëfishta përmes operatorëve logjik: AND (Dhe),

More information

Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kompjuterike. Gjuhë programuese C++ MSc. Vehbi NEZIRI

Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kompjuterike. Gjuhë programuese C++ MSc. Vehbi NEZIRI Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kompjuterike Gjuhë programuese C++ MSc. Vehbi NEZIRI 1 Java e 13 Strukturat Definimi i strukturave të zakonshme Deklarimi i variablave të

More information

Mesimi Sema Foundation ICT Department

Mesimi Sema Foundation ICT Department Mesimi - 19 Sema Foundation Ç janë skedarët? Kur jemi duke: shkruajtur një tekst, duke bërë një vizatim, duke bërë një tabelë, duke përpunuar një foto, etj Në kompjuter krijojmë një objekt. Ky objekt i

More information

JavaScript/ ECMA Script

JavaScript/ ECMA Script JavaScript/ ECMA Script Ҫfarë është JavaScript? JavaScript përdoret për të shtuar interaktivitet në faqet HTML. JavaScript është një gjuhë skriptimi, pra një gjuhë e lehtë programimi. JavaScript është

More information

Leksion 5. Ushtrim 1 : Deklarimi i disa karaktereve speciale ne c++

Leksion 5. Ushtrim 1 : Deklarimi i disa karaktereve speciale ne c++ Leksion 5 Ushtrim 1 : Deklarimi i disa karaktereve speciale ne c++ cout

More information

Strukturat e kontrollit ne C++

Strukturat e kontrollit ne C++ Strukturat e kontrollit ne C++ Një program mund të procesohet në një nga këto mënyra: 1. Në sekuencë 2. Me përzgjedhje 3. Përsëritje (cikël) 4. Thirrje funksioni Strukturat e kontrollit sekuencë përzgjedhje

More information

Strukture te Dhenash Seminar 4

Strukture te Dhenash Seminar 4 Strukture te Dhenash Seminar 4 ELISA RECI Universiteti Luigj Gurakuqi Fakulteti i Shkencave te Natyres Departamenti i Matematikes dhe Informatikes SHKODER MSc. Elisa Reci 1 Bashkesite Permban elemente

More information

Programim ne Java. Pergatiti: Alda Kika

Programim ne Java. Pergatiti: Alda Kika Pergatiti: Alda Kika Instalohet nje trajtues perjashtimesh nepermjet blloqeve try/catch blloku try permban instruksione qe mund te shkaktojne nje perjashtim blloku catch permban trajtuesin per nje tip

More information

Klasat dhe abstragimi i te dhenave

Klasat dhe abstragimi i te dhenave Klasat dhe abstragimi i te dhenave Klasat Klasë Një koleksion atributesh dhe funksionesh të deklaruar si një njësi e vetme. Anetaret e nje klase perbejne variabla ose funksione Anëtarët e një klase Atribute

More information

Strukture te Dhenash Seminar 8

Strukture te Dhenash Seminar 8 Strukture te Dhenash Seminar 8 ELISA RECI Universiteti Luigj Gurakuqi Fakulteti i Shkencave te Natyres Departamenti i Matematikes dhe Informatikes SHKODER MSc. Elisa Reci 1 Skedaret Skedari eshte nje varg

More information

Insertimi i Fotografisë në Weebly.com

Insertimi i Fotografisë në Weebly.com Insertimi i Fotografisë në Weebly.com Së pari hapeni Web-faqen,www.weebly.com si më poshtë: Hapi 2. Klikoni me tstin e majtë në Sign in.. Këtu shënoni E-mail adresën të cilën e keni regjistruar në Weebly.

More information

Hyrje ne Informatike Seminar 5

Hyrje ne Informatike Seminar 5 Hyrje ne Informatike Seminar 5 Elisa Reçi Universiteti Luigj Gurakuqi Fakulteti i Shkencave te Natyres Departamenti i Matematikes dhe Informatikes SHKODER MSc. Elisa Reci 1 PROGRAM ProgramName; VAR VariableName

More information

Chap. 3. Creating Objects The String class Java Class Library (Packages) Math.random() Reading for this Lecture: L&L,

Chap. 3. Creating Objects The String class Java Class Library (Packages) Math.random() Reading for this Lecture: L&L, Chap. 3 Creating Objects The String class Java Class Library (Packages) Math.random() Reading for this Lecture: L&L, 3.1 3.6 1 From last time: Account Declaring an Account object: Account acct1 = new Account

More information

System.out.print(); Scanner.nextLine(); String.compareTo();

System.out.print(); Scanner.nextLine(); String.compareTo(); System.out.print(); Scanner.nextLine(); String.compareTo(); Starting Out with Java: From Control Structures Through Objects Sixth Edition Chapter 6 A First Look at Classes Chapter Topics 6.1 Objects and

More information

Struktura e të dhënave

Struktura e të dhënave Struktura e të dhënave Provimi përfundimtar, Forma: A Emri: ID (Nr. dosjes): Drejtimi: Data: 1. Është dhënë klasa import javax.swing.*; /** Numëron votat për kandidatët elektoralë. * input: një varg votash,

More information

Packages & Random and Math Classes

Packages & Random and Math Classes Packages & Random and Math Classes Quick review of last lecture September 6, 2006 ComS 207: Programming I (in Java) Iowa State University, FALL 2006 Instructor: Alexander Stoytchev Objects Classes An object

More information

GRUPI TEKNOLOGJIK I PRISHTINËS. Windows XP Professional

GRUPI TEKNOLOGJIK I PRISHTINËS.  Windows XP Professional GRUPI TEKNOLOGJIK I PRISHTINËS www.pr-tech.net Windows XP Professional WINDOWS XP PROFESSIONAL Instalimi i Windows XP Professional Besart Bajrami E-mail: besartbajrami@gmail.com besartbajrami@hotmail.com

More information

Ruajtja e Perkoheshme. Llojet e Memories DRAM. Memoria RAM 25/11/2012. Karakteristikat e Teknologjis se Memorjeve.

Ruajtja e Perkoheshme. Llojet e Memories DRAM. Memoria RAM 25/11/2012. Karakteristikat e Teknologjis se Memorjeve. Ruajtja e Perkoheshme Universiteti AAB Faculty of Computer Science and Technology Arkitektura e Kompjuterit Memorjet Primare Hapat e perpunimit te nje programi? Pse nuk mundemi me i mbajt te dhenat vetem

More information

Ushtrimi 1 & 2 HTML. Mr. Sc. Nexhibe Sejfuli

Ushtrimi 1 & 2 HTML. Mr. Sc. Nexhibe Sejfuli Ushtrimi 1 & 2 HTML Rreth HTML (Hyper Text Markup Language) HTML, i cili qëndron për HyperText Markup Language, është një gjuhë e shënuar që përdoret për të krijuar web faqe. Zhvilluesit e Web-it (Internetit)

More information

Programim në Java Kohezgjatja: 2 semestra 12 kredite Menyra e vleresimit: Testim, Detyra, Provim. Lektore e lendes: Suela Maxhelaku

Programim në Java Kohezgjatja: 2 semestra 12 kredite Menyra e vleresimit: Testim, Detyra, Provim. Lektore e lendes: Suela Maxhelaku Programim në Java Kohezgjatja: 2 semestra 12 kredite Menyra e vleresimit: Testim, Detyra, Provim Lektore e lendes: Suela Maxhelaku Programim ne Java Qëllimi i lendes është të njohë studentët me bazat e

More information

Interface Serial 0/1/0

Interface Serial 0/1/0 Testimi i EIGRP-se ne rastet e nderprerjeve ne rrjete Topologjia e rrjetes: Emri i Ruterit Interface Serial 0/0/0 Interface Serial 0/1/0 Fastethernet 0/0 Fastethernet 0/1 UBT-PR 172.16.224.2 172.16.224.6

More information

Strukture te Dhenash Seminar 7

Strukture te Dhenash Seminar 7 Strukture te Dhenash Seminar 7 ELISA RECI Universiteti Luigj Gurakuqi Fakulteti i Shkencave te Natyres Departamenti i Matematikes dhe Informatikes SHKODER MSc. Elisa Reci 1 Skedaret Skedari eshte nje varg

More information

Packet Switching. Një histori dixhitale, me shumë bytes

Packet Switching. Një histori dixhitale, me shumë bytes Packet Switching Një histori dixhitale, me shumë bytes Packet switching eshte nje metode komunikimi rrjeti dixhitale e cila grupon te gjitha te dhenat qe transmetohen pa marre parasysh permbajtjen, tipin

More information

CSE1720 Delegation Concepts (Ch 2)

CSE1720 Delegation Concepts (Ch 2) CSE1720 Delegation Concepts (Ch 2) Output (sec 2.2.5) Output to the console Output to a file (later section 5.3.2) Instead of System.out.println( Hi ); Use: output.println( Hi ); 1 2 Ready-Made I/O Components

More information

Analysis, Design and Implementation of the Albanian Post Management System,

Analysis, Design and Implementation of the Albanian Post Management System, Analysis, Design and Implementation of the Albanian Post Management System, e- Albanian Postal Services (e-aps) Adela Tufina BACHELORS DEGREE EPOKA UNIVERSITY 2014 Analysis, Design and Implementation of

More information

Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kompjuterike. Gjuhë programuese C++ MSc. Vehbi NEZIRI

Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kompjuterike. Gjuhë programuese C++ MSc. Vehbi NEZIRI Universiteti i Prishtinës Fakulteti i inxhinierisë elektrike dhe kmpjuterike Gjuhë prgramuese C++ MSc. Vehbi NEZIRI 1 Java e 10 Funksinet në fajlla/skedarë Makr funksinet Funksinet e mbingarkuara Sinnimet

More information

Biznesi dhe Interneti

Biznesi dhe Interneti Biznesi dhe Interneti Pjesa 2 Prof. Ass. Dr. Ermir Rogova Objektivat Shpjegimi se çka është Internet Service Provider (ISP) dhe cilat shërbime mund të presim prej tyre Diskutim për veglat që na duhet për

More information

FTESË PËR SHPREHJE TË INTERESIT PËR OFRUES TË TRAJNIMEVE PROFESIONALE

FTESË PËR SHPREHJE TË INTERESIT PËR OFRUES TË TRAJNIMEVE PROFESIONALE FTESË PËR SHPREHJE TË INTERESIT PËR OFRUES TË TRAJNIMEVE PROFESIONALE Numri ftesës për ofertim: ICK-CLF-2017/09 Data e publikimit 30 Gusht 2017 Data e mbylljes: 11 Shtator 2017 Titulli i kontratës: Trajnime

More information

Class Libraries and Packages

Class Libraries and Packages Class Libraries and Packages Wolfgang Schreiner Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria Wolfgang.Schreiner@risc.jku.at http://www.risc.jku.at Wolfgang

More information

Packages. Examples of package names: points java.lang com.sun.security drawing.figures

Packages. Examples of package names: points java.lang com.sun.security drawing.figures Packages To make classes easier to find and to use, to avoid naming conflicts, and to control access, programmers bundle groups of related classes and interfaces into packages. A package is a program module

More information

Programimi në C++ Leksion 1

Programimi në C++ Leksion 1 Programimi në C++ Leksion 1 Direktivat e paraprocesimit së bashku me shprehjet e programit përbëjnë kodin burim i cili duhet të ruhet në një skedar burim me prapashtesën.cpp Pas kompilimit të programit

More information

Code Listing H-1. (Car.java) H-2 Appendix H Packages

Code Listing H-1. (Car.java) H-2 Appendix H Packages APPENDIX H Packages NOTE: To use this appendix you must understand how your operating system uses directories, or folders. In addition, you must know how to set the value of an environment variable. The

More information

Ligjërata 9. Prof.Ass.Dr. Ermir Rogova

Ligjërata 9. Prof.Ass.Dr. Ermir Rogova Ligjërata 9 Prof.Ass.Dr. Ermir Rogova JavaScript Gjuhe skriptuese e cila përdoret për të shtuar funksionalitetin dhe dukjen e web faqeve. Të gjithë web shfletuesit përmbajnë interpretues të cilët i procesojnë

More information

Introduction to Computer Science I

Introduction to Computer Science I Introduction to Computer Science I String and Random Java Classes Janyl Jumadinova 12-13 February, 2018 Divide and Conquer Most programs are complex and involved. The best way to develop and maintain a

More information

Definimi i klasave të zakonshme

Definimi i klasave të zakonshme FIM-Mekatronika Strukturat e të dhënave dhe algoritmet Klasat detyrat P1 1 Kur flitet për programimin e orientuar në objekte (ang. object-oriented programming), ose shkurt - programimin me objekte, gjithnjë

More information

Rrjetat kompjuterike dhe WWW. Rrjetat dhe WWW. Kapitulli 3. (gjenerata 2017/18)

Rrjetat kompjuterike dhe WWW. Rrjetat dhe WWW. Kapitulli 3. (gjenerata 2017/18) Rrjetat kompjuterike dhe WWW Kapitulli 3 (gjenerata 2017/18) Përmbajtja Topologjitë e rrjetave Pajisjet kryesore të LAN-it Bazat e lëvizjes së shënimeve brenda LAN-it Pajisjet kryesore të LAN-it A mund

More information

TEZA E OLIMPIADES SE INFORMATIKES KLASA 10 FAZA I

TEZA E OLIMPIADES SE INFORMATIKES KLASA 10 FAZA I TEZA E OLIMPIADES SE INFORMATIKES KLASA 10 FAZA I 1.Kodi standart amerikan qe perfaqeson karakteret ne bite eshte: a) Binary digit b) ASCII c) WYSIWYG d) Gigabyte 2.Nese deshironi te kopjoni pamjet e ekranit

More information

ROUTER TRING WIRELESS MANUAL KONFIGURIMI

ROUTER TRING WIRELESS MANUAL KONFIGURIMI ROUTER TRING WIRELESS MANUAL KONFIGURIMI 1 1. HYRJA NË KONFIGURIMIN E ROUTERIT TRING WIRELESS 2. MENUJA NETWORK 3. MENUJA WIRELESS 4. KONFIGURIMI I PC PËR LIDHJEN ME RRJETIN WIRELESS 5. MENUJA ADVANCED

More information

Çfare eshte Software? Software-i i Kompjuterit i jep instruksione (komanda) Hardware-it dhe e ben ate te funksionoje.

Çfare eshte Software? Software-i i Kompjuterit i jep instruksione (komanda) Hardware-it dhe e ben ate te funksionoje. Kapitulli - 2 Mesimi - 9 OPERATING SYSTEMS Çfare eshte Software? Software-i i Kompjuterit i jep instruksione (komanda) Hardware-it dhe e ben ate te funksionoje. Llojet e Software-ve Kemi kater lloj software-sh

More information

Avantazhet e programimit ne Dot Net:

Avantazhet e programimit ne Dot Net: Programming Avantazhet e programimit ne Dot Net: 1. Nje nga karakteristikat kryesore eshte qe ti mund te perdoresh te gjitha gjuhet qe jane ne.net sebashku. Keshtu nese pjestaret e nje grupi kane aftesi

More information

THE COLLEGE BOARD PSAT 10 Test Directions Translated into ALBANIAN for Students Spring 2018 Testing Window Only

THE COLLEGE BOARD PSAT 10 Test Directions Translated into ALBANIAN for Students Spring 2018 Testing Window Only THE COLLEGE BOARD PSAT 10 Test Directions Translated into ALBANIAN for Students Spring 2018 Testing Window Only Notes to the Supervisor: This document should be printed and distributed once students are

More information

Ushtrim ne C++ (funksionet nenprogramet)

Ushtrim ne C++ (funksionet nenprogramet) Ushtrim ne C++ (funksionet nenprogramet) void text(); //deklarojme nenprogramin char a[10]; cout

More information

THE COLLEGE BOARD PSAT 8/9 Test Directions Translated into <ALBANIAN> for Students Only

THE COLLEGE BOARD PSAT 8/9 Test Directions Translated into <ALBANIAN> for Students Only THE COLLEGE BOARD PSAT 8/9 Test Directions Translated into for Students 2018-2019 Only Notes to the Proctor: This document should be printed and distributed once students are seated. Students

More information

Objectives of CS 230. Java portability. Why ADTs? 8/18/14

Objectives of CS 230. Java portability. Why ADTs?  8/18/14 http://cs.wellesley.edu/~cs230 Objectives of CS 230 Teach main ideas of programming Data abstraction Modularity Performance analysis Basic abstract data types (ADTs) Make you a more competent programmer

More information

Rrjetat dhe WWW.

Rrjetat dhe WWW. KAPITULLI 5 ElverBajrami elver.bajrami@uni-pr.edu Përmbajtja Mediumet më të shpeshta në LAN Krijimi i nje kablli UTP Komponentet dhe pajisjet e Shtresës 1 Mediumet më të shpeshta në LAN Shielded twisted-pair

More information

Java Libraries. Lecture 6 CGS 3416 Fall September 21, 2015

Java Libraries. Lecture 6 CGS 3416 Fall September 21, 2015 Java Libraries Lecture 6 CGS 3416 Fall 2015 September 21, 2015 Intro to Libraries We ve barely scratched the surface of Java, but before we proceed with programming concepts, we need to talk about the

More information

PLAN MESIMOR I PROGRAMIT TE STUDIMIT TE CIKLIT TE PARE

PLAN MESIMOR I PROGRAMIT TE STUDIMIT TE CIKLIT TE PARE REPUBLIKA E SHQIPËRISË UNIVERSITETI EQREM ÇABEJ FAKULTETI SHKENCAVE TE NATYRES DEPARTAMENTI I MATEMATIKES & INFORMATIKES GJIROKASTËR PLAN MESIMOR I PROGRAMIT TE STUDIMIT TE CIKLIT TE PARE TEKNOLOGJI INFORMACIONI

More information

Example packages from Java s standard class library:

Example packages from Java s standard class library: CBOP3203 A class library is a set of classes that supports the development of programs. Java contains an extensive library of prewritten classes you can use in your programs. These classes are divided

More information

Dokumentimi i API. Faton Berisha. Fakulteti i Shkencave Kompjuterike Universiteti i Prizrenit. Hyrje Dokumentimi i kodit burimor Përfundim

Dokumentimi i API. Faton Berisha. Fakulteti i Shkencave Kompjuterike Universiteti i Prizrenit. Hyrje Dokumentimi i kodit burimor Përfundim Dokumentimi i API Faton Berisha Fakulteti i Shkencave Kompjuterike Universiteti i Prizrenit Dokumentimi i API 1 Përmbajtja Hyrje 1 Hyrje 2 Dokumentimi i API 2 Hyrje Krijimi i referencave Përdorimi i veglës

More information

Përpiluar nga : Fatbardha Abazi

Përpiluar nga : Fatbardha Abazi Përpiluar nga : Fatbardha Abazi Përmbajtja Moduli 1: Hyrje në C#... 3 1.1. Çka është.net Platform-a?... 4 1.2. Çka është.net Framework?... 5 1.3. Puna me Programet zhvillimore... 6 1.4. Karakteristikat

More information

CSCE3193: Programming Paradigms

CSCE3193: Programming Paradigms CSCE3193: Programming Paradigms Nilanjan Banerjee University of Arkansas Fayetteville, AR nilanb@uark.edu http://www.csce.uark.edu/~nilanb/3193/s10/ Programming Paradigms 1 Java Packages Application programmer

More information

Packages: Putting Classes Together

Packages: Putting Classes Together Packages: Putting Classes Together 1 Introduction 2 The main feature of OOP is its ability to support the reuse of code: Extending the classes (via inheritance) Extending interfaces The features in basic

More information

CS 211: Existing Classes in the Java Library

CS 211: Existing Classes in the Java Library CS 211: Existing Classes in the Java Library Chris Kauffman Week 3-2 Logisitics Logistics P1 Due tonight: Questions? Late policy? Lab 3 Exercises Thu/Fri Play with Scanner Introduce it today Goals Class

More information

CS 335 Java Programming Controls. Fall 2007

CS 335 Java Programming Controls. Fall 2007 CS 335 Java Programming Controls Fall 2007 Java Control Structures Selection: If, If/Else, Switch Repetition (looping): While, For, Do/While Assignment: Expressions, increment/decrement Java Reserved Words

More information

Inheritance and Subclasses

Inheritance and Subclasses Software and Programming I Inheritance and Subclasses Roman Kontchakov / Carsten Fuhs Birkbeck, University of London Outline Packages Inheritance Polymorphism Sections 9.1 9.4 slides are available at www.dcs.bbk.ac.uk/

More information

CS 335 Lecture 02 Java Programming

CS 335 Lecture 02 Java Programming 1 CS 335 Lecture 02 Java Programming Programming in Java Define data Calculate using data Output result Java is object-oriented: Java program must: Merge data and functions into object Invoke functions

More information

CompSci 125 Lecture 05. Programming Style, String Class and Literals, Static Methods, Packages

CompSci 125 Lecture 05. Programming Style, String Class and Literals, Static Methods, Packages CompSci 125 Lecture 05 Programming Style, String Class and Literals, Static Methods, Packages Homework Update HW2 Due 9/13 Programming Assignment Update p1: Traffic Applet due Sept 21 Programming Style

More information

SIGURIA NË TI. Universiteti i Prizrenit Fakulteti i Shkencave Kompjuterike Dega: SD

SIGURIA NË TI. Universiteti i Prizrenit Fakulteti i Shkencave Kompjuterike Dega: SD SIGURIA NË TI Universiteti i Prizrenit Fakulteti i Shkencave Kompjuterike Dega: SD 20.10.2012 Nga ora e kaluar Përsëritje A ka sisteme të sigurta? Çfarë kuptimi ka të qenit i sigurt? Ç është siguria? Jepni

More information

Siguria në nivelin e rrjetit Qasja në distancë dhe sistemet e autentifikimit Analiza e trafikut. Universiteti i Prizrenit

Siguria në nivelin e rrjetit Qasja në distancë dhe sistemet e autentifikimit Analiza e trafikut. Universiteti i Prizrenit Siguria në nivelin e rrjetit Qasja në distancë dhe sistemet e autentifikimit Analiza e trafikut Siguria në TI Universiteti i Prizrenit Ligjërues: Ilir Bytyçi Përsëritje Për sigurinë në cilat shtresa OSI

More information

CS 302: INTRODUCTION TO PROGRAMMING IN JAVA. Lecture 16

CS 302: INTRODUCTION TO PROGRAMMING IN JAVA. Lecture 16 CS 302: INTRODUCTION TO PROGRAMMING IN JAVA Lecture 16 REVIEW What is aggregation? Object variables are what type of variables? What does null mean? How do you test for null? How is a tostring() method

More information

THE COLLEGE BOARD SAT Test Directions Translated into <Albanian> for Students Fall 2018 School Day Testing Only

THE COLLEGE BOARD SAT Test Directions Translated into <Albanian> for Students Fall 2018 School Day Testing Only THE COLLEGE BOARD SAT Test Directions Translated into for Students Fall 2018 School Day Testing Only Notes to the Proctor: This document should be printed and distributed once students are seated.

More information

Object Oriented Programming. Java-Lecture 1

Object Oriented Programming. Java-Lecture 1 Object Oriented Programming Java-Lecture 1 Standard output System.out is known as the standard output object Methods to display text onto the standard output System.out.print prints text onto the screen

More information

JavaScript shton ndëraktivitetin në website. JavaScript punon së bashku me HTML dhe CSS për krijimin e websiteve ndëraktive dhe tërheqëse.

JavaScript shton ndëraktivitetin në website. JavaScript punon së bashku me HTML dhe CSS për krijimin e websiteve ndëraktive dhe tërheqëse. Hyrje në JavaScript JavaScript shton ndëraktivitetin në website. JavaScript punon së bashku me HTML dhe CSS për krijimin e websiteve ndëraktive dhe tërheqëse. Para se të filloni të mësoni JavaScript rekomandohet

More information

Using Classes and Objects

Using Classes and Objects Using Classes and Objects CSC 1051 Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website: www.csc.villanova.edu/~map/1051/ Today

More information

1Z Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions

1Z Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions 1Z0-850 Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-850 Exam on Java SE 5 and 6, Certified Associate... 2 Oracle 1Z0-850 Certification Details:...

More information

COMP6700/2140 Std. Lib., I/O

COMP6700/2140 Std. Lib., I/O COMP6700/2140 Std Lib, I/O Alexei B Khorev and Joshua Milthorpe Research School of Computer Science, ANU February 2017 Alexei B Khorev and Joshua Milthorpe (RSCS, ANU) COMP6700/2140 Std Lib, I/O February

More information

CS 112 Introduction to Programming

CS 112 Introduction to Programming CS 112 Introduction to Programming Summary of Methods; User Input using Scanner Yang (Richard) Yang Computer Science Department Yale University 308A Watson, Phone: 432-6400 Email: yry@cs.yale.edu Admin

More information

Leksion 3. Frida GJERMENI

Leksion 3. Frida GJERMENI Leksion 3 Frida GJERMENI Protokolli SMTP MTA-te jane 2 llojeshe: MTA Client (MTA per Klientin) dhe_ MTA Server (MTA per Serverin) Protokolli qe perdoret nga MTA Client dhe MTA Server eshte SMTP (Simple

More information

Realizimi i Fotografive të Mira (apo Fotogazetaria) 28 Maj 2013 Prishtinë, Kosovë

Realizimi i Fotografive të Mira (apo Fotogazetaria) 28 Maj 2013 Prishtinë, Kosovë Realizimi i Fotografive të Mira (apo Fotogazetaria) 28 Maj 2013 Prishtinë, Kosovë PËRMBAJTJA o Është bërë tradicionale që njerëzit të bëjnë shumë fotografi në ngjarje të ndryshme (p.sh., punëtori apo konferenca).

More information

ECE 122. Engineering Problem Solving with Java

ECE 122. Engineering Problem Solving with Java ECE 122 Engineering Problem Solving with Java Lecture 4 Creating and Using Objects Outline Problem: How do I create multiple objects from a class Java provides a number of built-in classes for us Understanding

More information

ECE 122. Engineering Problem Solving with Java

ECE 122. Engineering Problem Solving with Java ECE 122 Engineering Problem Solving with Java Lecture 4 Creating and Using Objects Outline Problem: How do I create multiple objects from a class Java provides a number of built-in classes for us Understanding

More information

COMP-202 More Complex OOP

COMP-202 More Complex OOP COMP-202 More Complex OOP Defining your own types: Remember that we can define our own types/classes. These classes are objects and have attributes and behaviors You create an object or an instance of

More information

CS61BL. Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling

CS61BL. Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling CS61BL Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling About me Name: Edwin Liao Email: edliao@berkeley.edu Office hours: Thursday 3pm - 5pm Friday 11am - 1pm 611 Soda Or by

More information

1. An operation in which an overall value is computed incrementally, often using a loop.

1. An operation in which an overall value is computed incrementally, often using a loop. Practice Exam 2 Part I: Vocabulary (10 points) Write the terms defined by the statements below. 1. An operation in which an overall value is computed incrementally, often using a loop. 2. The < (less than)

More information

Using APIs. Chapter 3. Outline Fields Overall Layout. Java By Abstraction Chapter 3. Field Summary static double PI

Using APIs. Chapter 3. Outline Fields Overall Layout. Java By Abstraction Chapter 3. Field Summary static double PI Outline Chapter 3 Using APIs 3.1 Anatomy of an API 3.1.1 Overall Layout 3.1.2 Fields 3.1.3 Methods 3.2 A Development Walkthrough 3.2.1 3.2.2 The Mortgage Application 3.2.3 Output Formatting 3.2.4 Relational

More information

Third Year Diploma Courses in Computer Science & Engineering, Computer Engineering, Computer Technology & Information Technology Branch.

Third Year Diploma Courses in Computer Science & Engineering, Computer Engineering, Computer Technology & Information Technology Branch. Third Year Diploma Courses in Computer Science & Engineering, Computer Engineering, Computer Technology & Information Technology Branch. Java Programming Specific Objectives: Contents: As per MSBTE G Scheme

More information

Classes and Objects 3/28/2017. How can multiple methods within a Java class read and write the same variable?

Classes and Objects 3/28/2017. How can multiple methods within a Java class read and write the same variable? Peer Instruction 8 Classes and Objects How can multiple methods within a Java class read and write the same variable? A. Allow one method to reference a local variable of the other B. Declare a variable

More information

Students may use this document to read translations of the directions that are read aloud or printed in their test book.

Students may use this document to read translations of the directions that are read aloud or printed in their test book. THE COLLEGE BOARD SAT Test Directions Translated into ALBANIAN for Students Spring 2018 Testing Window Only Notes to the Supervisor: This document should be printed and distributed once students are seated.

More information

COMP 202. Built in Libraries and objects. CONTENTS: Introduction to objects Introduction to some basic Java libraries string

COMP 202. Built in Libraries and objects. CONTENTS: Introduction to objects Introduction to some basic Java libraries string COMP 202 Built in Libraries and objects CONTENTS: Introduction to objects Introduction to some basic Java libraries string COMP 202 Objects and Built in Libraries 1 Classes and Objects An object is an

More information

Java Intro 3. Java Intro 3. Class Libraries and the Java API. Outline

Java Intro 3. Java Intro 3. Class Libraries and the Java API. Outline Java Intro 3 9/7/2007 1 Java Intro 3 Outline Java API Packages Access Rules, Class Visibility Strings as Objects Wrapper classes Static Attributes & Methods Hello World details 9/7/2007 2 Class Libraries

More information

Programimi i Shpërndarë

Programimi i Shpërndarë Programimi i Shpërndarë Pjesa 1 Prof. Ass. Dr. Ermir Rogova 1 Agjenda Çfarë është një Sistem i Shpërndarë apo i Distribuar? Shembuj të Sistemeve të Distribuara! Avantazhet dhe disavantazhet! Çështjet e

More information

Tema: Programimi për Windows Mobile Në këtë leksion...net Framework dhe.net CF Ndërtimi i ndërfaqeve grafike për Windows Mobile

Tema: Programimi për Windows Mobile Në këtë leksion...net Framework dhe.net CF Ndërtimi i ndërfaqeve grafike për Windows Mobile Tema: Programimi për Windows Mobile Në këtë leksion....net Framework dhe.net CF Ndërtimi i ndërfaqeve grafike për Windows Mobile 1. Hyrje në platformën.net 1.1..Net Framework Microsoft.NET Framework është

More information

1 Shyam sir JAVA Notes

1 Shyam sir JAVA Notes 1 Shyam sir JAVA Notes 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write

More information

Programerja e parë Agusta Ada Byron

Programerja e parë Agusta Ada Byron Programerja e parë Agusta Ada Byron ME EMRIN E ALL-LLAHUT MËSHIRUESIT MËSHIRËBËRËSIT ********************** *************** ********** *** * 2 Parathënie Gjuha programuese është një vegël informatike e

More information

Methods (Deitel chapter 6)

Methods (Deitel chapter 6) Methods (Deitel chapter 6) 1 Plan 2 Introduction Program Modules in Java Math-Class Methods Method Declarations Argument Promotion Java API Packages Random-Number Generation Scope of Declarations Methods

More information

Methods (Deitel chapter 6)

Methods (Deitel chapter 6) 1 Plan 2 Methods (Deitel chapter ) Introduction Program Modules in Java Math-Class Methods Method Declarations Argument Promotion Java API Packages Random-Number Generation Scope of Declarations Methods

More information

Java: advanced object-oriented features

Java: advanced object-oriented features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Java: advanced object-oriented features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Packages

More information

JAVA: A Primer. By: Amrita Rajagopal

JAVA: A Primer. By: Amrita Rajagopal JAVA: A Primer By: Amrita Rajagopal 1 Some facts about JAVA JAVA is an Object Oriented Programming language (OOP) Everything in Java is an object application-- a Java program that executes independently

More information

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B 1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these 2. How many primitive data types are there in Java? A. 5 B. 6 C. 7 D. 8 3. In Java byte, short, int and long

More information

BLERJE LENOVO SERVER SYSTEM, IMB STORWIZE, IBM SAN SWICH, IBM SFF HDD

BLERJE LENOVO SERVER SYSTEM, IMB STORWIZE, IBM SAN SWICH, IBM SFF HDD UNION BANK DEPARTAMENTI I ADMINISTRATES KËRKESË PËR OFERTË BLERJE LENOVO SERVER SYSTEM, IMB STORWIZE, IBM SAN SWICH, IBM SFF HDD Tirane me, 20.04.2018 FTESA PËR OFERTË Union Bank Sha fton për të paraqitur

More information

UNIVERSITETI ALEKSANDËR MOISIU, DURRES JAVA LEKSION 1. Armela Habili Friday, November 02, 2012

UNIVERSITETI ALEKSANDËR MOISIU, DURRES JAVA LEKSION 1. Armela Habili Friday, November 02, 2012 UNIVERSITETI ALEKSANDËR MOISIU, DURRES JAVA LEKSION 1 Armela Habili Friday, November 02, 2012 Përmbajtja Leksion 1 1. Hyrje... 1 2. Historiku i Java... 2 3. Java, karakteristikat kryesore... 3 3.1 Java

More information

Informatika. Blerina Zanaj

Informatika. Blerina Zanaj Informatika Blerina Zanaj Software Nje program perbehet nga nje sekuenc instruksionesh qe specifikojne ate qe duhet te beje kompiuteri. Software eshte nje set programesh qe ofrohen nga prodhuesi i hardware

More information