Marko Milošević.
|
|
- Laura Douglas
- 6 years ago
- Views:
Transcription
1 Marko Milošević
2 ESPB 8 Bodovanje Domaći Kolokvijumi 2x10 2x20 Završni ispit 40 Konsultacije sreda četvrtak 16-17
3 Šabloni dizajna (Design Patterns) Metrika softvera (Software Metrics) Testiranje softvera
4 Standardno rešenje nekog programerskog problema. Pojedini problemi se javljaju vrlo često. Potrebno je rešavati ih brzo i sigurno.
5 double sum(double[] a) { double s = 0; for (int i = 0; i < a.length; i++){ s += a[i]; return s;
6 double sum(elementliste root){ double s = 0; ElementListe temp = root; for( ;temp!= null; temp = temp.next()){ s += temp.value(); return s;
7 double sum(iterable<double> a){ double s = 0; Iterator<Double> i=a.iterator() for(; i.hasnext(); ){ s += i.next(); return s;
8 double sum(iterable<double> a){ double s = 0; for (Double el:a){ s += el; return s;
9 Omogućavaju bržu komunikaciju među programerima pri diskusiji dizajna softvera. Obezbeđuju rečnik za razmenu dizajnerskih koncepata među programerima, bilo verbalno ili u dokumentaciji, odnosno specifikaciji. Umesto ova klasa prolazi kroz kolekciju objekata i daje po jedan element, kažemo ova klasa je iterator.
10 Povećana sigurnost kod se piše prema nekom standardu ima više provere grešaka lakši je za testiranje i debug-ovanje Bolje performanse kod se brže piše objekti dele resurse, pa su memorijski zahtevi manji Povećana fleksibilnost kod se lakše menja jer se umanjuju ili odstranjuju veze između delova koda
11 Korišćenje pojedinih šablona je uvek dobra ideja. Program se brže razvija. Zahteva manje testiranja. Pouzdaniji je. U nekim slučajevima (npr. šabloni za optimizaciju ili povećanje fleksibilnosti) je bolje sačekati sa primenom. Prvo razviti nešto što funkcioniše. Zatim iskoristiti šablon za otklanjanje slabosti.
12 Većina ljudi koristi šablone kada primete problem u dizajnu ili impementaciji. npr. promena koju bi trebalo jednostavno izvršiti, ali nije tako, ili performanse sistema nisu na zahtevanom nivou.
13 Šabloni mogu povećati ili umanjiti razumljivost dizajna ili implementacije. Povećavaju količinu koda. Povećavaju modularnost. U početku mogu izgledati prilično apstraktni. Prave prednosti se ispoljavaju tek kada se radi na većim sistemima.
14 Osnovni šabloni Šabloni kreiranja (Creational Patterns) Šabloni sakupljanja (Collectional Patterns) Strukturni šabloni (Structural Patterns) Šabloni ponašanja (Behavioral Patterns) Paralelni šabloni (Concurrency Patterns)
15 Interfejsi Apstraktne klase Privatni metodi Pristupni metodi Menadžer konstantnih podataka Nepromenljivi objekti (Immutable objects) Monitori
16
17
18
19 public class CategoryA { private double basesalary; private double OT; public CategoryA(...){ public double salary(){ return basesalary + OT;
20 public class Employee { CategoryA salarycalc; String name; public Employee(String n, CategoryA c){ public void display(){ System.out.println( Name= + name); System.out.println( salary= + calarycalc.getsalary();
21 public class Main { public static void main(string[] args){ CategoryA c = new CategoryA(10000, 200); Employee e = new Employee( Mika, c); e.display();
22 public class CategoryB { private double salesamt; private double basesalary; private static final double commision=0.2; public double salary(){ return basesalary + commision * salesamt;
23
24 public interface SalaryCalculator { public double getsalary();
25 public class CategoryA implements SalaryCalculator public double getsalary(){...
26 public class Main{ public static void main(string[] args){ SalaryCalculator c = new CategoryA(10000, 200); Employee e = new Employee( Mika, c); e.display(); c = new CategoryB(20000, 800); e = new Employee( Zika, c); e.display();
27 public class Main{ public static void main(string[] args){ SalaryCalculator c = new CategoryA(10000, 200); Employee e = new Employee( Mika, c); e.display(); c = new CategoryB(20000, 800); e = new Employee( Zika, c); e.display();
28
29 public abstract class Employee { private String name; private String ID; public Employee(...){... public String getname(){... public String getid(){... public void save(){... public abstract String compute();
30
31
32 public class Account { public static final String ACCOUNT_DATA_FILE = "ACCOUNT.TXT"; public static final int VALID_MIN_LNAME_LEN = 2; public void save() { public class Address { public static final String ADDRESS_DATA_FILE = "ADDRESS.TXT"; public static final int VALID_ST_LEN = 2; public static final String VALID_ZIP_CHARS = " "; public static final String DEFAULT_COUNTRY = "USA"; public void save() {
33 public class ConstantDataManager { public static final String ACCOUNT_DATA_FILE = "ACCOUNT.TXT"; public static final int VALID_MIN_LNAME_LEN = 2; public static final String ADDRESS_DATA_FILE = "ADDRESS.TXT"; public static final int VALID_ST_LEN = 2; public static final String VALID_ZIP_CHARS = " "; public static final String DEFAULT_COUNTRY = "USA";
34 public class Card { public static final int PIK = 1; public static final int KARO = 2;... public static final int KEC = 1; public static final int DVOJKA = 2;...
35 Konstruktor public Card(int boja, int broj){... Poziv konstruktora Card c = new Card(Card.PIK, Card.DVOJKA); Problem Card c = new Card(Card.DVOJKA, Card.PIK); Ne radimo proveru tipa.
36 Rešenje je korišćenje enum tipa u C++ ili sličnih konstrukcija u Javi ili C# public class BojaKarte { public static final BojaKarte PIK = new BojaKarte("pik"); public static final BojaKarte KARO = new BojaKarte("karo"); public static final BojaKarte HERC = new BojaKarte("herc"); public static final BojaKarte TREF = new BojaKarte("tref"); private String boja; private BojaKarte(String boja){ this.boja = public String tostring() { return boja;
37 public class BrojKarte { public static final BrojKarte KEC = new BrojKarte("KEC"); public static final BrojKarte DVOJKA = new BrojKarte("DVOJKA"); //... private String broj; private BrojKarte(String s){ this.broj = public String tostring() { return broj;
38 public class Card { private BojaKarte boja; private BrojKarte broj; public Card(BojaKarte boja,brojkarte broj){ this.boja = boja; this.broj = public String tostring() { return "(" + broj + ", " + boja + ")";
39 Card c = new Card(BojaKarte.PIK, BrojKarte.KEC);
40 Privatni metodi Pristupni metodi Nepromenljivi objekti (Immutable objects) Monitori
41
PREDMET. Osnove Java Programiranja. Čas JAVADOC
PREDMET Osnove Java Programiranja JAVADOC Copyright 2010 UNIVERZITET METROPOLITAN, Beograd. Sva prava zadržana. Bez prethodne pismene dozvole od strane Univerziteta METROPOLITAN zabranjena je reprodukcija,
More informationpojedinačnom elementu niza se pristupa imeniza[indeks] indeks od 0 do n-1
NIZOVI Niz deklarišemo navođenjemtipa elemenata za kojim sledi par srednjih zagrada[] i naziv niza. Ako je niz višedimenzionalni između zagrada[] se navode zarezi, čiji je broj za jedan manji od dimenzija
More informationOsnove programskog jezika C# Čas 5. Delegati, događaji i interfejsi
Osnove programskog jezika C# Čas 5. Delegati, događaji i interfejsi DELEGATI Bezbedni pokazivači na funkcije Jer garantuju vrednost deklarisanog tipa. Prevodilac prijavljuje grešku ako pokušate da povežete
More informationOsnove programskog jezika C# Čas 4. Nasledjivanje 2. deo
Osnove programskog jezika C# Čas 4. Nasledjivanje 2. deo Nasledjivanje klasa Modifikator new class A { public virtual void F() { Console.WriteLine("I am A"); } } class B : A { public override void F()
More informationAspektno programiranje u Javi. AOP + AspectJ
1 Aspektno programiranje u Javi AOP + AspectJ Posledice nemodularnosti? slabo praćenje toka izvršavanja smanjenja produktivnost smanjen code reuse smanjen krajnji kvalitet celog sistema teško održavanje
More informationUčitati cio broj n i štampati njegovu recipročnu vrijednost. Ako je učitan broj 0, štampati 1/0.
Kontrolne naredbe Primjeri: Opšti oblik razgranate strukture (if sa ) if (uslov) Naredba 1 ili blok naredbi1 Naredba 2 ili blok naredbi2 Učitati broj x i štampati vrijednost double x, z; Scanner in=new
More informationVežbe - XII nedelja PHP Doc
Vežbe - XII nedelja PHP Doc Dražen Drašković, asistent Elektrotehnički fakultet Univerziteta u Beogradu Verzija alata JavaDoc za programski jezik PHP Standard za komentarisanje PHP koda Omogućava generisanje
More informationUvod u relacione baze podataka
Uvod u relacione baze podataka Ana Spasić 5. čas 1 Podupiti, operatori exists i in 1. Izdvojiti imena i prezimena studenata koji su položili predmet čiji je identifikator 2001. Rešenje korišćenjem spajanja
More informationb) program deljiv3; uses wincrt; var i:integer; begin i:=3; while i<100 do begin write(i:5); i:=i+3; end; end.
NAREDBA CIKLUSA SA PREDUSLOVOM WHILE 1.Odrediti vrednosti s i p nakon izvrsenja sledecih naredbi za dato a=43, a=34, a=105 program p1; var a,s,p:integer; write('unesite a:');readln(a); p:=a; s:=0; while
More informationUPUTSTVO ZA KORIŠĆENJE NOVOG SPINTER WEBMAIL-a
UPUTSTVO ZA KORIŠĆENJE NOVOG SPINTER WEBMAIL-a Webmail sistem ima podršku za SSL (HTTPS). Korištenjem ovog protokola sva komunikacija između Webmail sistema i vašeg Web čitača je kriptovana. Prilikom pristupa
More informationRačunarske osnove Interneta (SI3ROI, IR4ROI)
Računarske osnove terneta (SI3ROI, IR4ROI) Vežbe MPLS Predavač: 08.11.2011. Dražen Drašković, drazen.draskovic@etf.rs Autori: Dražen Drašković Naučili ste na predavanjima MPLS (Multi-Protocol Label Switching)
More informationPROGRAMIRANJE. Amir Hajdar
PROGRAMIRANJE Amir Hajdar Teme 2 Klase i objekti u Javi Primjer kroz klasu Krug Atributi i metode Inicijalizacija objekata (konstruktori) Polymorphism Statičke varijable i metode This Klase i objekti u
More informationSoftware and Programming 1
Software and Programming 1 Week 9 Lab - Use of Classes and Inheritance 8th March 2018 SP1-Lab9-2018.ppt Tobi Brodie (Tobi@dcs.bbk.ac.uk) 1 Lab 9: Objectives Exercise 1 Student & StudentTest classes 1.
More informationSvi Java tipovi imaju ekvivalentan tip u jeziku Scala Većina Scala koda se direktno preslikava u odgovarajući Java konstrukt
Funkcionalno programiranje Interoperabilnost jezika Scala i Java Prevođenje u Java bajt kod Svi Java tipovi imaju ekvivalentan tip u jeziku Scala Većina Scala koda se direktno preslikava u odgovarajući
More informationOBJEKTNO ORIJENTISANO PROGRAMIRANJE
OBJEKTNO ORIJENTISANO PROGRAMIRANJE PREDAVANJE 12: NASLEĐIVANJE Miloš Kovačević Đorđe Nedeljković 1 /17 OSNOVNI KONCEPTI - Statički i dinamički tipovi podataka - Prepisivanje metoda superklase - Polimorfizam
More informationCSS CSS. selector { property: value; } 3/20/2018. CSS: Cascading Style Sheets
CSS CSS CSS: Cascading Style Sheets - Opisuje izgled (appearance) i raspored (layout) stranice - Sastoji se od CSS pravila, koji defini[u skup stilova selector { property: value; 1 Font face: font-family
More informationUniversity of Palestine. Mid Exam Total Grade: 100
First Question No. of Branches (5) A) Choose the correct answer: 1. If we type: system.out.println( a ); in the main() method, what will be the result? int a=12; //in the global space... void f() { int
More informationMašinska vizija. Dr Nenad Jovičić tnt.etf.rs/~mv
Mašinska vizija Dr Nenad Jovičić 2017. tnt.etf.rs/~mv Linearne 2D geometrijske transformacije 2D geometrijske transformacije Pretpostavka: Objekti u 2D prostoru se sastoje iz tačaka i linija. Svaka tačka
More informationDogađaj koji se javlja u toku izvršenja programa i kvari normalno izvršenje. Kada se desi izuzetak, sistem pokušava da pronađe način da ga obradi.
Obrada izuzetaka Šta je izuzetak? Događaj koji se javlja u toku izvršenja programa i kvari normalno izvršenje. Kada se desi izuzetak, sistem pokušava da pronađe način da ga obradi. Prosleđuje izuzetak,
More information1- Differentiate between extends and implements keywords in java? 2- What is wrong with this code:
1- Differentiate between extends and implements keywords in java? 2- What is wrong with this code: public double getsalary() double basesalary = getsalary(); return basesalary + bonus; 3- What does the
More informationWindows Server 2012, VDI Licenciranje najprodavanijeg servera, što je novo, VDI licenciranje. Office 2013 / Office 365
Windows 8 Licenciranje, razlike u verzijama Windows Server 2012, VDI Licenciranje najprodavanijeg servera, što je novo, VDI licenciranje Serverski proizvodi Server 2012, System centar 2012, SQL 2012, Sharepoint
More informationPVC Eco. Eco Prozori i Balkonska Vrata Bela Boja Dezeni drveta su 40% skuplji
PVC Eco Eco Prozori i Balkonska Vrata Bela Boja Dezeni drveta su 40% skuplji PVC prozori i Balkonska vrata od 5-komornik profilanemačkog proizvođača Trocal 70.A5 Okovi za PVC stolariju nemačkog proizvođača
More informationNumerical Computation
GNU Octave Numerical Computation vrlo često u tehnici retko stvarni problemi imaju closed-form solution čak i kad imaju, pitanje upotrebljivosti mnogo detalja numerički pristup u početku tretirano kao
More informationVDSL modem Zyxel VMG1312-B10A/B30A
VDSL modem Zyxel VMG1312-B10A/B30A Default Login Details LAN IP Address http://192.168.2.1 User Name user Password 1234 Funkcionalnost lampica Power lampica treperi kratko vrijeme nakon uključivanja modema,
More informationJava. Ugnježdeni tipovi IMI PMF KG OOP 09 AKM. najveći deo teksta je preuzet sa slajdova Prof. Dragana Milićeva (ETF Bg) namenjenih pedmetu OOP2
Java IMI PMF KG OOP 0 AKM 1 Ugnježdeni tipovi najveći deo teksta je preuzet sa slajdova Prof. Dragana Milićeva (ETF Bg) namenjenih pedmetu OOP2 Ugneždeni tipovi IMI PMF KG OOP 0 AKM 2 Unutrašnje klase
More informationConversions and Overloading : Overloading
Conversions and Overloading : First. Java allows certain implicit conversations of a value of one type to a value of another type. Implicit conversations involve only the primitive types. For example,
More informationObjektno orjentirano programiranje. Predavanje 9 Postojani objekti, serijalizacija, marshaling, relacijske baze podataka
Objektno orjentirano programiranje Predavanje 9 Postojani objekti, serijalizacija, marshaling, relacijske baze podataka Postojani objekti - osnove eng. persistent objects Bez obzira na veličinu poslovne
More informationCase Study: Modelling using Objects
E H U N I V E R S I T Y T O H F R G Case Study: Modelling using Objects E D I N B U Murray Cole Modelling the world with data 1 Specifying systems is one of the hardest tasks in SE Key issues in object-oriented
More informationCS 132 Midterm Exam Spring 2004
Date:22-Jun-2004 Time:7:00-9:00p.m. Permitted Aids:None CS 132 Midterm Exam Spring 2004 Please complete this page in ink. Last Name: Signature: First Name: ID: Please check off your Practicum Section:
More informationUnit 10: Sorting/Searching/Recursion
Unit 10: Sorting/Searching/Recursion Exercises 1. If you search for the value 30 using a linear search, which indices of the 2. If you search for the value -18 using a binary search, which indices of the
More informationAP Computer Science Chapter 10 Implementing and Using Classes Study Guide
AP Computer Science Chapter 10 Implementing and Using Classes Study Guide 1. A class that uses a given class X is called a client of X. 2. Private features of a class can be directly accessed only within
More informationPVC Eco. Eco Prozori i Balkonska Vrata Bela Boja Dezeni drveta su 40% skuplji
PVC Eco Eco Prozori i Balkonska Vrata PVC prozori i Balkonska vrata od 5-komornik profilanemačkog proizvođača Trocal 70.A5 Niskoemisiono 2-slojno staklo 4+16+4mm, proizvođaća Guardian iz Luxemburga Profil:
More informationCMSC 132: Object-Oriented Programming II. Inheritance
CMSC 132: Object-Oriented Programming II Inheritance 1 Mustang vs Model T Ford Mustang Ford Model T 2 Interior: Mustang vs Model T 3 Frame: Mustang vs Model T Mustang Model T 4 Compaq: old and new Price:
More informationCS18000: Programming I
CS18000: Programming I Introduction to Concurrency January 20, 2010 Prof. Chris Clifton Today We Learn Functions as Abstractions A First View of Concurrency Threads 1/21/2010 CS18000 2 Prof. Chris Clifton
More informationProgramming Language Concepts: Lecture 2
Programming Language Concepts: Lecture 2 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 2, 19 January 2009 Classes and
More informationjavagently jg3e H:\ ProgTwo Programming II Lecture 7 A case study (class containing an array) and model diagrams. 02/02/2003 Dr Andy Brooks 1
H:\ jg3e javagently ProgTwo Lab3 Laboratory Programming II Lecture 7 A case study (class containing an array) and model diagrams. 02/02/2003 Dr Andy Brooks 1 Scope The scope of an identifier is the region
More informationProgramiranje III razred
Tehnička škola 9. maj Bačka Palanka Programiranje III razred Konverzija tipova Konverzija tipova Prilikom komunikacije aplikacije sa korisnikom, korisnik najčešće unosi ulazne podatke koristeći tastaturu.
More informationProgramiranje Programski jezik C. Sadržaj. Datoteke. prof.dr.sc. Ivo Ipšić 2009/2010
Programiranje Programski jezik C prof.dr.sc. Ivo Ipšić 2009/2010 Sadržaj Ulazno-izlazne funkcije Datoteke Formatirane datoteke Funkcije za rad s datotekama Primjeri Datoteke komunikacija između programa
More informationProgramiranje III razred
Tehnička škola 9. maj Bačka Palanka Programiranje III razred Naredbe ciklusa for petlja Naredbe ciklusa Veoma često se ukazuje potreba za ponavljanjem nekih naredbi više puta tj. za ponavljanjem nekog
More informationObject-Oriented Concepts
JAC444 - Lecture 3 Object-Oriented Concepts Segment 2 Inheritance 1 Classes Segment 2 Inheritance In this segment you will be learning about: Inheritance Overriding Final Methods and Classes Implementing
More informationSadržaj. Verzija 03/2017 Primjenjuje se od 20. novembra godine
Sadržaj 1 Web hosting 3 2 Registracija domena 3 3 Internet marketing 3 4 E mail paketi 4 5 Virtuoz 4 6 Internet Security servis 5 7 Kolokacija servera 6 8 Cloud usluge 6 9 Aktivni servisi koji nijesu u
More informationJava Memory Management
Java Memory Management Memory Allocation in Java When a program is being executed, separate areas of memory are allocated for each code (classes and interfaces) objects running methods 1-2 Memory Areas
More informationGUI - događaji (Events) i izuzeci. Bojan Tomić
GUI - događaji (Events) i izuzeci Bojan Tomić Događaji GUI reaguje na događaje (events) Događaj je neka akcija koju korisnik programa ili neko drugi izvrši korišćenjem perifernih uređaja (uglavnom miša
More informationBanaras Hindu University
Banaras Hindu University A Course on Software Reuse by Design Patterns and Frameworks by Dr. Manjari Gupta Department of Computer Science Banaras Hindu University Lecture 5 Basic Design Patterns Basic
More informationRekurzivne metode. Posmatrajmo rekurzivan metod kojim u objektu listbox1 klase ListBox upisujemo sve prirodne brojeve od 1 do datog n.
Rekurzivne metode Rekurzivan metod je onaj metod koji u nekoj svojoj instrukciji sadrži poziv samog sebe. Svakako prilikom kreiranja rekurzivnog metoda moramo voditi računa da ne dodje do beskonačne rekurzije
More informationpublic static void main(string []args) { System.out.println("Hello World"); /* prints Hello World */
Java Uvod Hello world primer Java program predstavlja skup objekata koji prozivaju jedni drugima metode i tako komuniciraju. Izvorni kod se uvek čuva u datotekama sa ekstenzijom.java. Ispod je predstavljen
More information1) Consider the following code segment, applied to list, an ArrayList of Integer values.
Advanced Computer Science Unit 7 Review Part I: Multiple Choice (12 questions / 4 points each) 1) What is the difference between a regular instance field and a static instance field? 2) What is the difference
More informationUputstvo za korišćenje logrotate funkcije
Copyright AMRES Sadržaj Uvod 3 Podešavanja logrotate konfiguracionog fajla 4 Strana 2 od 5 Uvod Ukoliko je aktivirano logovanje za RADIUS proces, može se desiti da posle određenog vremena server bude preopterećen
More informationName Return type Argument list. Then the new method is said to override the old one. So, what is the objective of subclass?
1. Overriding Methods A subclass can modify behavior inherited from a parent class. A subclass can create a method with different functionality than the parent s method but with the same: Name Return type
More informationNIZOVI.
NIZOVI LINKOVI ZA KONZOLNI C# OSNOVNO http://www.mycity.rs/net/programiranje-u-c-za-osnovce-i-srednjoskolce.html http://milan.milanovic.org/skola/csharp-00.htm Niz deklarišemo navođenjem tipa elemenata
More informationEncapsulation in C++
pm_jat@daiict.ac.in In abstract sense, it is all about information hiding Informally, you can call it as packaging of data and function together in a single entity called class such that you get implementation
More informationnamespace spojneice { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
Spojnice using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO;
More informationPASS4TEST IT 인증시험덤프전문사이트
PASS4TEST IT 인증시험덤프전문사이트 http://www.pass4test.net 일년동안무료업데이트 Exam : 1z0-809 Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z0-809 Exam's Question and Answers 1 from
More informationAbstract Classes and Interfaces
Abstract Classes and Interfaces Reading: Reges and Stepp: 9.5 9.6 CSC216: Programming Concepts Sarah Heckman 1 Abstract Classes A Java class that cannot be instantiated, but instead serves as a superclass
More informationKLASIFIKACIJA JELENA JOVANOVIĆ. Web:
KLASIFIKACIJA JELENA JOVANOVIĆ Email: jeljov@gmail.com Web: http://jelenajovanovic.net PREGLED PREDAVANJA Šta je klasifikacija? Binarna i više-klasna klasifikacija Algoritmi klasifikacije Mere uspešnosti
More informationWEEK 13 EXAMPLES MONDAY SECTION 2. Author class. public class Author { private static int ID=0; private String AuthorName;
WEEK 13 EXAMPLES MONDAY SECTION 2 Author class public class Author { private static int ID=0; private String AuthorName; private String DOB; public Author() { AuthorName = ""; DOB = ""; public Author(String
More informationUputa: Zabranjeno je koristiti bilo kakva pomagala. Rje²enja pi²ete desno od zadatka. Predajete samo ovaj list.
Ime i prezime: Asistent: Predava : Programiranje (C) 1. kolokvij 14. 4. 2003. 1. 2. 3. 4. 5. 6. 7. Uputa: Zabranjeno je koristiti bilo kakva pomagala. Rje²enja pi²ete desno od zadatka. Predajete samo ovaj
More informationIST311 Chapter 8: C# Collections - Index-Sequential Search List & Dictionary PROGRAM
IST311 Chapter 8: C# Collections - Index-Sequential Search List & Dictionary PROGRAM class Program static void Main(string[] args) //create a few employees Employee e1 = new Employee(1111111, "Tiryon",
More informationWhat property of a C# array indicates its allocated size? What keyword in the base class allows a method to be polymorphic?
What property of a C# array indicates its allocated size? a. Size b. Count c. Length What property of a C# array indicates its allocated size? a. Size b. Count c. Length What keyword in the base class
More informationimport org.simpleframework.xml.default; import org.simpleframework.xml.element; import org.simpleframework.xml.root;
C:/Users/dsteil/Documents/JavaSimpleXML/src/main/java/com/mycompany/consolecrudexample/Address.java / To change this template, choose Tools Templates and open the template in the editor. import org.simpleframework.xml.default;
More informationHighlights of Last Week
Highlights of Last Week Refactoring classes to reduce coupling Passing Object references to reduce exposure of implementation Exception handling Defining/Using application specific Exception types 1 Sample
More information/*#include <iostream> // Prvi zadatak sa integralnomg ispita
/*#include // Prvi zadatak sa integralnomg ispita 27.01.2015 #include using std::setw; using std::cout; const int red(5), kolona(4); void unos(int[]); void ispis(int[][kolona]); float
More informationWeek 14 Lab A Linked List of Integers Maximum Points = 10
Week 14 Lab A Linked List of Integers Maximum Points = 10 File IntList.java contains definitions for a linked list of integers. The class contains an inner class IntNode that holds information for a single
More informationCjenovnik usluga informacionog društva
Cjenovnik usluga informacionog društva Verzija: 01/2018 Sadržaj 1 Web hosting 3 2 Registracija domena 3 3 Internet marketing 3 4 E mail paketi 4 5 Virtuoz 4 6 Internet Security servis 5 7 Kolokacija servera
More information... ; ako je a n parno. ; ako je a n neparno
Zadaci vezani za ciklus sa preduslovom (WHILE) Zad. Napisati program za izračunavanje n_tog stepena broja a. Zad2. Napisati program za izračunavanje sume S kvadrata parnih i kubova neparnih prirodnih brojeva
More informationUNIVERZITET U BEOGRADU ELEKTROTEHNIČKI FAKULTET
UNIVERZITET U BEOGRADU ELEKTROTEHNIČKI FAKULTET Katedra za elektroniku Računarska elektronika Grupa br. 11 Projekat br. 8 Studenti: Stefan Vukašinović 466/2013 Jelena Urošević 99/2013 Tekst projekta :
More informationJezik Baze Podataka SQL. Jennifer Widom
Jezik Baze Podataka SQL SQL o Jezik koji se koristi u radu sa relacionim bazama podataka o Nije programski jezik i manje je kompleksan. o Koristi se isključivo u radu za bazama podataka. o SQL nije case
More informationObject Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming
Overview of OOP Object Oriented Programming is a programming method that combines: a) Data b) Instructions for processing that data into a self-sufficient object that can be used within a program or in
More informationNotes on Chapter Three
Notes on Chapter Three Methods 1. A Method is a named block of code that can be executed by using the method name. When the code in the method has completed it will return to the place it was called in
More informationPHP? PHP (recursive acronym "PHP: Hypertext Preprocessor") Open Source general-purpose scripting language Web development
Intro to PHP PHP? PHP (recursive acronym "PHP: Hypertext Preprocessor") Open Source general-purpose scripting language Web development Ugrađen u HTML. HTML script sa kodom koji nešto radi Izvršavanje na
More informationUMJETNA INTELIGENCIJA U INDUSTRIJI SIGURNOSTI. Antun Krešimir Buterin, Hikvision
UMJETNA INTELIGENCIJA U INDUSTRIJI SIGURNOSTI Antun Krešimir Buterin, Hikvision HIKVISION KRENIMO ROADSHOW NAPRIJED S UMJETNOM 2018 INTELIGENCIJOM UMJETNA INTELIGENCIJA TRADITIONAL ALGORITHM AI MEĐU NAJPOPULARNIJIM
More informationClasses and Inheritance Extending Classes, Chapter 5.2
Classes and Inheritance Extending Classes, Chapter 5.2 Dr. Yvon Feaster Inheritance Inheritance defines a relationship among classes. Key words often associated with inheritance are extend and implements.
More informationCS/ENGRD 2110 SPRING Lecture 5: Local vars; Inside-out rule; constructors
1 CS/ENGRD 2110 SPRING 2017 Lecture 5: Local vars; Inside-out rule; constructors http://courses.cs.cornell.edu/cs2110 Announcements 2 1. Writing tests to check that the code works when the precondition
More informationInfiniteGraph Manual 1
InfiniteGraph Manual 1 Installation Steps: Run the InfiniteGraph.exe file. Click next. Specify the installation directory. Click next. Figure 1: Installation step 1 Figure 2: Installation step 2 2 Select
More informationLab 08 Command Pattern, Undo, Redo
Lab 08 Command Pattern, Undo, Redo Q0: Introduction I - How users use Undo and Redo II - An array as a static field Q1 - Q6 Maintenance of Employee records with undo-redo commands Q1 : The start-up version
More informationTiming for Interfaces and Abstract Classes
Timing for Interfaces and Abstract Classes Consider using abstract classes if you want to: share code among several closely related classes declare non-static or non-final fields Consider using interfaces
More informationPITANJA ZA II KOLOKVIJUM KLASE I OBJEKTI
PITANJA ZA II KOLOKVIJUM KLASE I OBJEKTI 1. Enkapsulacija je podataka. skrivanje apstrakcija nasledivanje 2. Unutar deklaracije klase navode se: definicije funkcija clanica prototipovi (deklaracije) funkcija
More informationNasleđivanje i izvedene klase u jeziku C++
Tema 08 Nasleđivanje i izvedene klase u jeziku C++ dr Vladislav Miškovic vmiskovic@singidunum.ac.rs Fakultet za informatiku i računarstvo - Tehnički fakultet OBJEKTNO ORIJENTISANO PROGRAMIRANJE 2016/2017
More informationSorting and Searching
CHAPTER 13 Sorting and Searching The exercises in this chapter are a framework for comparing algorithms empirically. This approach provides students with a means for understanding the finer details of
More informationQuestions Answer Key Questions Answer Key Questions Answer Key
Benha University Term: 2 nd (2013/2014) Class: 2 nd Year Students Subject: Object Oriented Programming Faculty of Computers & Informatics Date: 26/4/2014 Time: 1 hours Exam: Mid-Term (C) Name:. Status:
More informationTopic 03 - Objects and Classes. I. Classes and Objects Casual Preview. Topic 03. VIII. Benefits of Encapsulation. XIII. Overloading methods, Signature
Contents Topic 03 - Objects and Classes I. Casual Preview Day, Employee, Initializing fields, Array of objects, tostring II. Introduction to OOP Terminologies: Instance, Instance fields, Methods, Object
More informationRačunarska grafika-vežbe. 3 JavaFX animacija i interakcija
Računarska grafika-vežbe 3 JavaFX animacija i interakcija Zadatak1: Spirala+ Kolokvijum K1 09/10, zadatak prerađen za JavaFX Napisati klasu koja sastavlja graf scene za crtanje centralno simetrične figure
More informationBirkbeck (University of London) Software and Programming 1 In-class Test Mar 2018
Birkbeck (University of London) Software and Programming 1 In-class Test 2.1 22 Mar 2018 Student Name Student Number Answer ALL Questions 1. What output is produced when the following Java program fragment
More informationCS18000: Problem Solving And Object-Oriented Programming
CS18000: Problem Solving And Object-Oriented Programming Class (and Program) Structure 31 January 2011 Prof. Chris Clifton Classes and Objects Set of real or virtual objects Represent Template in Java
More informationFall CS 101: Test 2 Name UVA ID. Grading. Page 1 / 4. Page3 / 20. Page 4 / 13. Page 5 / 10. Page 6 / 26. Page 7 / 17.
Grading Page 1 / 4 Page3 / 20 Page 4 / 13 Page 5 / 10 Page 6 / 26 Page 7 / 17 Page 8 / 10 Total / 100 1. (4 points) What is your course section? CS 101 CS 101E Pledged Page 1 of 8 Pledged The following
More informationWrapper Classes double pi = new Double(3.14); 3 double pi = new Double("3.14"); 4... Zheng-Liang Lu Java Programming 290 / 321
Wrapper Classes To treat values as objects, Java supplies standard wrapper classes for each primitive type. For example, you can construct a wrapper object from a primitive value or from a string representation
More informationClass definition. complete definition. public public class abstract no instance can be created final class cannot be extended
JAVA Classes Class definition complete definition [public] [abstract] [final] class Name [extends Parent] [impelements ListOfInterfaces] {... // class body public public class abstract no instance can
More informationVHDLPrimeri Poglavlje5.doc
5. VHDL opis kola koja obavljaju osnovne aritmetičke funkcije Sabirači Jednobitni potpuni sabirač definisan je tablicom istinitosti iz Tabele 5.1. Tabela 5.1. cin a b sum cout 0 0 0 0 0 0 0 1 1 0 0 1 0
More informationa) Answer all questions. b) Write your answers in the space provided. c) Show all calculations where applicable.
Name: Please fill in your Student Number and Name. Student Number : Student Number: University of Cape Town ~ Department of Computer Science Computer Science 1015F ~ 2008 January Exam Question Max Internal
More informationRyerson University Department of Electrical & Computer Engineering COE618 Midterm Examination February 26, 2013
Ryerson University Department of Electrical & Computer Engineering COE618 Midterm Examination February 26, 2013 Name: Student # : Time: 90 minutes Instructions This exam contains 6 questions. Please check
More informationInitializers: Array initializers can be used with class base types as well. The elements of the initializer can be expressions (not just constants).
CMSC 131: Chapter 15 (Supplement) Arrays II Arrays of Objects Array of Objects: The base type of an array can be a class object. Example: Array of Strings. String[ ] greatcities = new String[5]; greatcities[2]
More informationimport java.applet.applet; import java.applet.audioclip; import java.net.url; public class Vjesala2 {
import java.awt.color; import java.awt.flowlayout; import java.awt.font; import java.awt.gridlayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import javax.swing.jbutton;
More informationInheritance (Part 5) Odds and ends
Inheritance (Part 5) Odds and ends 1 Static Methods and Inheritance there is a significant difference between calling a static method and calling a non-static method when dealing with inheritance there
More informationITI Introduction to Computing II
ITI 1121. Introduction to Computing II Marcel Turcotte School of Information Technology and Engineering Iterator (part II) Inner class Implementation: fail-fast Version of March 20, 2011 Abstract These
More informationCS Week 14. Jim Williams, PhD
CS 200 - Week 14 Jim Williams, PhD This Week 1. Final Exam: Conflict Alternatives Emailed 2. Team Lab: Object Oriented Space Game 3. BP2 Milestone 3: Strategy 4. Lecture: More Classes and Additional Topics
More informationINTERFACE WHY INTERFACE
INTERFACE WHY INTERFACE Interfaces allow functionality to be shared between objects that agree to a contract on how the software should interact as a unit without needing knowledge of how the objects accomplish
More informationExploring the Java API, Packages & Collections
6.092 - Introduction to Software Engineering in Java Lecture 7: Exploring the Java API, Packages & Collections Tuesday, January 29 IAP 2008 Cite as: Evan Jones, Olivier Koch, and Usman Akeju, course materials
More informationPage 1 / 3. Page 2 / 18. Page 3 / 8. Page 4 / 21. Page 5 / 15. Page 6 / 20. Page 7 / 15. Total / 100. Pledge:
This pledged exam is open text book and closed notes. Different questions have different points associated with them. Because your goal is to maximize your number of points, we recommend that you do not
More informationHIBERNATE - SORTEDSET MAPPINGS
HIBERNATE - SORTEDSET MAPPINGS http://www.tutorialspoint.com/hibernate/hibernate_sortedset_mapping.htm Copyright tutorialspoint.com A SortedSet is a java collection that does not contain any duplicate
More informationHIBERNATE - INTERCEPTORS
HIBERNATE - INTERCEPTORS http://www.tutorialspoint.com/hibernate/hibernate_interceptors.htm Copyright tutorialspoint.com As you have learnt that in Hibernate, an object will be created and persisted. Once
More information