CS5233 Components Models and Engineering
|
|
- Darleen Holland
- 6 years ago
- Views:
Transcription
1 CS5233 Components Models and Engineering - Komponententechnologien Master of Science (Informatik) Java Services Seite 1
2 Services Services Build-in technology Java 6 build-in technology to load services dynamically Service definition = interface A service is defined by a (statically known) interface Service implementation = class The service implementation = service provider a class that implements the interface - is loaded at run-time Naming / locating services Java 6 supports finding and loading the service implementation through the directory META-INF/services from the Java classpath Relevant class java.util.serviceloader Seite 2
3 Services / Service Loader Service Loader java.util.serviceloader<s> class new with Java 1.6 Intention: extend an application by providing a jar-file as part of the classpath or in an application-specific directory Java build-in component technology may be used as advanced class.forname or simple Java-build-in component technology Seite 3
4 Services / Service Loader Service Loader / static factory methods ServiceLoader<S> is used to load Implementations of a Service S Factory methods of class ServiceLoader : Each method creates a service loader ( loads a service loader ) using a different class loader static <S> ServiceLoader<S> load(class<s> service) loads using the current thread context loader static <S> ServiceLoader<S> load(class<s> service, ClassLoader loader) loads using the given class loader static <S> ServiceLoader<S> loadinstalled( Class<S> service) loads using the extension class loader Usage Example: ServiceLoader<MyService> myserviceloader = ServiceLoader.load(MyService.class); Seite 4
5 Services / Service Loader Service Loader / iterator an instance of ServiceLoader<S> implements Iterable<S> Iterator<S> iterator() iterates over Implementations of S A call of next loads and returns an instance of a service provider Usage Example: ServiceLoader<MyService> myserviceloader = ServiceLoader.load(MyService.class); for (MyService s : myserviceloader) { use s Seite 5
6 Services / Example Service and Service Provider Service A set of interfaces and/or abstract classes Service provider Implementation / concrete subclasses of the service package accountservice; Example of a Service: interface AccountService create Accounts using a certain fixed currency interface Account deposit / withdraw get balance as string with currency symbol import java.util.currency; public interface AccountService { currency of all accounts */ Currency getaccountcurrency(); /** create account */ Account createaccount(); package accountservice; public interface Account { /** Enter the given amount */ void deposit(int amount); /** Withdraw the given amount */ void withdraw(int amount); /** Get a String-representation of the balance */ String getbalance(); An AccountService is bound to a fixed currency. There may be several Services each one using its currency. Seite 6
7 Services / Example Service and Service Provider package euroaccountservice ; Example of a Service Provider This provider may provide euro accounts. import java.util.currency; import accountservice.*; public class EuroAccountService implements AccountService { static final Currency currency = Currency.getInstance("EUR"); public Account createaccount () { return new Account() { int balance = 0; public void deposit(int amount) { balance += amount; public void withdraw(int amount) { balance -= amount; public String getbalance() { return balance + " " + currency.getsymbol(); ; public Currency getaccountcurrency () { return currency; Seite 7
8 Services / Example Service user loads service providers, checks them for appropriateness, uses an appropriate one import java.util.currency; import java.util.serviceloader; import accountservice.account; import accountservice.accountservice; public class Test { public static void main(string[] args) { ServiceLoader<AccountService> accservices = ServiceLoader.load(AccountService.class); // search for an euro account service and use it for (AccountService as : accservices) { if (as.getaccountcurrency().equals(currency. getinstance ("EUR"))) { Account account = as.createaccount (); account.deposit(100); account.withdraw(5); System. out.println(account. getbalance()); Seite 8
9 Services / Example Create jar file with services implementation Jar file must contain implementation classes a directory called META-INF within META-INF a directory called services directory services must contain the name of the provider classes Example: euroaccountservice.euroaccountservice Content of file accountservice.accountservice jar cf accserviceimpl.jar META-INF euroaccountservice Command to create jar file jar -tf accserviceimpl.jar META-INF/ META-INF/MANIFEST.MF META-INF/services/ META-INF/services/accountService.AccountService euroaccountservice/ euroaccountservice/euroaccountservice$1.class euroaccountservice/euroaccountservice.class java -cp.:accserviceimpl.jar servicetest.test Seite 9 Command to show the content of the jar file running the application
Project Jigsaw: Modular services
Project Jigsaw: Modular services Jigsaw team 12 June 2012 Copyright 2012 Oracle and/or its affiliates All rights reserved 1 Terms Service interface: An interface or class Service interface module: A module
More informationCOMPSCI 230 Threading Week8. Figure 1 Thread status diagram [http://www.programcreek.com/2009/03/thread-status/]
COMPSCI 230 Threading Week8 Figure 1 Thread status diagram [http://www.programcreek.com/2009/03/thread-status/] Synchronization Lock DeadLock Why do we need Synchronization in Java? If your code is executing
More informationObject-oriented basics. Object Class vs object Inheritance Overloading Interface
Object-oriented basics Object Class vs object Inheritance Overloading Interface 1 The object concept Object Encapsulation abstraction Entity with state and behaviour state -> variables behaviour -> methods
More informationCS5233 Components Models and Engineering
Prof. Dr. Th. Letschert CS5233 Components Models and Engineering - Komponententechnologien Master of Science (Informatik) Working with Jars (and other files using NIO) Seite 1 Jars http://download.oracle.com/javase/tutorial/deployment/jar/index.html
More informationMonitors CSCI 201 Principles of Software Development
Monitors CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline Monitors Program USC CSCI 201L Monitor Overview A monitor is an object with mutual exclusion and
More informationINF 212 ANALYSIS OF PROG. LANGS PLUGINS. Instructors: Crista Lopes Copyright Instructors.
INF 212 ANALYSIS OF PROG. LANGS PLUGINS Instructors: Crista Lopes Copyright Instructors. Modules as conceptual units Modules as physical components Software modules as physical components Source components
More informationClasses and Methods: Classes
Class declaration Syntax: [] Classes and Methods: Classes [] class [] [] [] When
More informationCS 617 Object Oriented Systems Lecture 5 Classes, Classless World:Prototypes, Instance Variables, Class Variables, This/Self 3:30-5:00 pm Thu, Jan 17
Objects, Interfaces and CS 617 Object Oriented Systems Lecture 5, Classless World:Prototypes, Instance Variables, Class Variables, This/Self 3:30-5:00 pm Thu, Jan 17 Rushikesh K Joshi Department of Computer
More informationCS5233 Components Models and Engineering
CS5233 Components Models and Engineering (Komponententechnologien) Master of Science (Informatik) Reflection Seite 1 Java Reflection Reflection Reflection is when you see yourself. Why would you like to
More informationChapter 4 Java Language Fundamentals
Chapter 4 Java Language Fundamentals Develop code that declares classes, interfaces, and enums, and includes the appropriate use of package and import statements Explain the effect of modifiers Given an
More informationBSc. (Hons.) Software Engineering. Examinations for / Semester 2
BSc. (Hons.) Software Engineering Cohort: BSE/04/PT Examinations for 2005-2006 / Semester 2 MODULE: OBJECT ORIENTED PROGRAMMING MODULE CODE: BISE050 Duration: 2 Hours Reading Time: 5 Minutes Instructions
More informationConcurrency CSCI 201 Principles of Software Development
Concurrency CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Synchronization Outline USC CSCI 201L Motivation for Synchronization Thread synchronization is used
More informationC C C C++ 2 ( ) C C++ 4 C C
# 7 11 13 C 4 8 11 20 C 9 11 27 C++ 1 10 12 4 C++ 2 11 12 11 C++ 3 12 12 18 C++ 4 C++ 5 13 1 8 ( ) 14 1 15 C++ 15 1 22 2 (D) ( ) C++ 3 6 Hello C++ 4 5 1. make Makefile.c (arithmetic.c) main main arithmetic
More informationClass 09 Slides: Polymorphism Preconditions. Table of Contents. Postconditions
Class 09 Slides: Polymorphism Preconditions Students are familiar with inheritance and arrays. Students have worked with a poorly written program in A08 that could benefit from polymorphism. Students have
More informationCMSC 132: Object-Oriented Programming II
CMSC 132: Object-Oriented Programming II Synchronization in Java Department of Computer Science University of Maryland, College Park Multithreading Overview Motivation & background Threads Creating Java
More informationSingleton. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 29
Singleton Computer Science and Engineering College of Engineering The Ohio State University Lecture 29 Preventing Instantiation Default (zero-argument) constructor Provided only if there is no explicit
More informationImperative Languages!
Imperative Languages! Java is an imperative object-oriented language. What is the difference in the organisation of a program in a procedural and an objectoriented language? 30 class BankAccount { private
More informationCS 2112 Lecture 20 Synchronization 5 April 2012 Lecturer: Andrew Myers
CS 2112 Lecture 20 Synchronization 5 April 2012 Lecturer: Andrew Myers 1 Critical sections and atomicity We have been seeing that sharing mutable objects between different threads is tricky We need some
More informationConfiguration for Microprofile. Mark Struberg, Emily Jiang 0.3,
Configuration for Microprofile Mark Struberg, Emily Jiang 0.3, 2017-01-18 Table of Contents Microprofile Config......................................................................... 2 Architecture................................................................................
More informationConfiguration for Microprofile. Mark Struberg, Emily Jiang, John D. Ament
Configuration for Microprofile Mark Struberg, Emily Jiang, John D. Ament 1.2, December 21, 2017 Table of Contents Microprofile Config.........................................................................
More informationCPSC 324 Topics in Java Programming
CPSC 324 Topics in Java Programming Lecture 24 Today Final exam review Java packages and jar files Reminder Group projects on Thursday! Reading Assignment Core: Ch. 10 pp. 493-500 (Jar files) Core: Ch.
More information<Insert Picture Here> Hudson Web Architecture. Winston Prakash. Click to edit Master subtitle style
Hudson Web Architecture Click to edit Master subtitle style Winston Prakash Hudson Plugin Architecture Hudson is an extendable Web Application. The basic platform is extended via
More informationMutating Object State and Implementing Equality
Mutating Object State and Implementing Equality 6.1 Mutating Object State Goals Today we touch the void... (sounds creepy right... see the movie, or read the book, to understand how scary the void can
More informationObjects and Classes. Lecture 10 of TDA 540 (Objektorienterad Programmering) Chalmers University of Technology Gothenburg University Fall 2017
Objects and Classes Lecture 10 of TDA 540 (Objektorienterad Programmering) Carlo A. Furia Alex Gerdes Chalmers University of Technology Gothenburg University Fall 2017 All labs have been published Descriptions
More informationCS 116 Week 8 Page 1
CS 116 Week 8: Outline Reading: 1. Dale, Chapter 11 2. Dale, Lab 11 Objectives: 1. Mid-term exam CS 116 Week 8 Page 1 CS 116 Week 8: Lecture Outline 1. Mid-term Exam CS 116 Week 8 Page 2 CS 116 Week 8:
More informationSingleton Pattern Creational
Singleton Pattern Creational Intent» Ensure a class has only one instance» Provide a global point of access Motivation Some classes must only have one instance file system, window manager Applicability»
More information3 CREATING YOUR FIRST JAVA APPLICATION (USING WINDOWS)
GETTING STARTED: YOUR FIRST JAVA APPLICATION 15 3 CREATING YOUR FIRST JAVA APPLICATION (USING WINDOWS) GETTING STARTED: YOUR FIRST JAVA APPLICATION Checklist: The most recent version of Java SE Development
More informationCSCI-1200 Data Structures Fall 2009 Lecture 25 Concurrency & Asynchronous Computing
CSCI-1200 Data Structures Fall 2009 Lecture 25 Concurrency & Asynchronous Computing Final Exam General Information The final exam will be held Monday, Dec 21st, 2009, 11:30am-2:30pm, DCC 308. A makeup
More informationConfiguration for Microprofile. Mark Struberg, Emily Jiang, John D. Ament 1.1,
Configuration for Microprofile Mark Struberg, Emily Jiang, John D. Ament 1.1, 2017-08-31 Table of Contents Microprofile Config......................................................................... 2
More informationClasses 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 informationCS-140 Fall 2017 Test 1 Version Practice Practie for Sept. 27, Name:
CS-140 Fall 2017 Test 1 Version Practice Practie for Sept. 27, 2017 Name: 1. (10 points) For the following, Check T if the statement is true, the F if the statement is false. (a) T F : In mathematics,
More informationExploring Dynamic Compilation Facility in Java
Exploring Dynamic Compilation Facility in Java Dingwei He and Kasi Periyasamy Computer Science Department University of Wisconsin-La Crosse La Crosse, WI 54601 kasi@cs.uwlax.edu Abstract Traditional programming
More informationCS1020 Data Structures and Algorithms I Lecture Note #8. Exceptions Handling exceptional events
CS1020 Data Structures and Algorithms I Lecture Note #8 Exceptions Handling exceptional events Objectives Understand how to use the mechanism of exceptions to handle errors or exceptional events that occur
More informationThe Singleton Pattern. Design Patterns In Java Bob Tarr
The Singleton Pattern Intent Ensure a class only has one instance, and provide a global point of access to it Motivation Sometimes we want just a single instance of a class to exist in the system For example,
More informationCS-140 Fall 2017 Test 1 Version Practice Practie for Sept. 27, Name:
CS-140 Fall 2017 Test 1 Version Practice Practie for Sept. 27, 2017 Name: 1. (10 points) For the following, Check T if the statement is true, the F if the statement is false. (a) T F : In mathematics,
More informationCS486: Tutorial on SOC, OSGi, and Knopflerfish. Ryan Babbitt (props to Dr. Hen-I Yang, CS415X) Feb. 3, 2011
CS486: Tutorial on SOC, OSGi, and Knopflerfish Ryan Babbitt (rbabbitt@iastate.edu) (props to Dr. Hen-I Yang, CS415X) Feb. 3, 2011 Basic Concepts Service-oriented computing (SOC) Service-oriented architectures
More informationANSI/IEEE POSIX Standard Thread management
Pthread Prof. Jinkyu Jeong( jinkyu@skku.edu) TA Jinhong Kim( jinhong.kim@csl.skku.edu) TA Seokha Shin(seokha.shin@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu The
More informationTHREADS. Laboratório - Java
THREADS Laboratório - Java class ABC {. public void main(..) {.. begin body end 2 A single threaded program class ABC {. public void main(..) {.. begin end body 3 A Multithreaded Program Main Thread start
More informationIntroduction to Java Threads
Object-Oriented Programming Introduction to Java Threads RIT CS 1 "Concurrent" Execution Here s what could happen when you run this Java program and launch 3 instances on a single CPU architecture. The
More informationpublic class Account { private int id; private static int nextaccountid = 0; private String name; private double balance;
public class Account { private int id; private static int nextaccountid = 0; private String name; private double balance; public double deposit(double amount) { public double withdraw(double amount) {
More informationRecitation: Loop Jul 7, 2008
Nested Loop Recitation: Loop Jul 7, 2008 1. What is the output of the following program? Use pen and paper only. The output is: ****** ***** **** *** ** * 2. Test this program in your computer 3. Use "for
More informationCSE 332: Locks and Deadlocks. Richard Anderson, Steve Seitz Winter 2014
CSE 332: Locks and Deadlocks Richard Anderson, Steve Seitz Winter 2014 1 Recall Bank Account Problem class BankAccount { private int balance = 0; synchronized int getbalance() { return balance; } synchronized
More informationMARATHWADA INSTITUTE OF TECHNOLOGY, AURANGABAD DEPARTMENT OF MASTER OF COMPUTER APPLICATIONS ADVANCE JAVA QUESTION BANK
MARATHWADA INSTITUTE OF TECHNOLOGY, AURANGABAD DEPARTMENT OF MASTER OF COMPUTER APPLICATIONS ADVANCE JAVA QUESTION BANK Second Year MCA 2013-14 (Part-I) Faculties: Prof. V.V Shaga Prof. S.Samee Prof. A.P.Gosavi
More informationCP122 CS I. Iteration
CP122 CS I Iteration Tech News! Pix2Pix: machine learning translation of images https://affinelayer.com/pixsrv/ Tech News! Pix2Pix: machine learning translation of images https://affinelayer.com/pixsrv/
More informationThe Singleton Pattern. Design Patterns In Java Bob Tarr
The Singleton Pattern Intent Ensure a class only has one instance, and provide a global point of access to it Motivation Sometimes we want just a single instance of a class to exist in the system For example,
More informationBasics of Java Programming. Hendrik Speleers
Hendrik Speleers Overview Building blocks of a Java program Classes Objects Primitives Methods Memory management Making a (simple) Java program Baby example Bank account system A Java program Consists
More informationLe L c e t c ur u e e 5 To T p o i p c i s c t o o b e b e co c v o e v r e ed e Exception Handling
Course Name: Advanced Java Lecture 5 Topics to be covered Exception Handling Exception HandlingHandlingIntroduction An exception is an abnormal condition that arises in a code sequence at run time A Java
More informationMore on Classes. 1 tostring
More on Classes 1 tostring Java allows us to supply an object wherever a string is expected. The run-time system will automatically apply a conversion function to create a string representation of the
More informationModular Applications and the Lookup API. David Štrupl Sun Microsystems
Modular Applications and the Lookup API David Štrupl Sun Microsystems The Need for Modular Applications Applications get more complex Assembled from pieces Developed by distributed teams Components have
More informationPackages and Information Hiding
Packages and Information Hiding Packages as a structuring concept Information hiding through acces specifiers OOAD 1999/2000 Claudia Niederée, Joachim W. Schmidt Software Systems Institute c.niederee@tu-harburg.de
More informationImplementing Classes
Implementing Classes Advanced Programming ICOM 4015 Lecture 3 Reading: Java Concepts Chapter 3 Fall 2006 Slides adapted from Java Concepts companion slides 1 Chapter Goals To become familiar with the process
More informationPractical Session 2 Correction Don't forget to put the InputValue.java file in each project
Practical Session 2 Correction Don't forget to put the InputValue.java file in each project Exercise 1 : Bank Account 1) BankAccount class A bank account is a financial account with a banking institution
More informationCS1083 Week 3: Polymorphism
CS1083 Week 3: Polymorphism David Bremner 2018-01-18 Polymorphic Methods Late Binding Container Polymorphism More kinds of accounts DecimalAccount BigDecimal -balance: BigDecimal +DecimalAccount() +DecimalAccount(initialDollars
More information엄현상 (Eom, Hyeonsang) School of Computer Science and Engineering Seoul National University COPYRIGHTS 2017 EOM, HYEONSANG ALL RIGHTS RESERVED
엄현상 (Eom, Hyeonsang) School of Computer Science and Engineering Seoul National University COPYRIGHTS 2017 EOM, HYEONSANG ALL RIGHTS RESERVED Outline - Questionnaire Results - Java Overview - Java Examples
More information1. Go to the URL Click on JDK download option
Download and installation of java 1. Go to the URL http://www.oracle.com/technetwork/java/javase/downloads/index.html Click on JDK download option 2. Select the java as per your system type (32 bit/ 64
More informationSoftware LEIC/LETI. Lecture 10
Software Engineering @ LEIC/LETI Lecture 10 Last Lecture Software Design Design as Structure Data source architectural patterns FénixFramework Today Software Design Design as Structure Design Principles
More informationGlobal variables and resources are shared between threads within the same process. Each thread has its own stack and program counter (see Fig 2-7).
Threads One way to reduce context switch time is to run lightweight processes within the same address space. This abstraction is often called a thread. Look at Figure 2-6. Global variables and resources
More informationOOP Lab Factory Method, Singleton, and Properties Page 1
OOP Lab Factory Method, Singleton, and Properties Page 1 Purpose What to Submit 1. Practice implementing a factory method and singleton class. 2. Enable the Purse application to handle different kinds
More informationWhy Exceptions? (1.1) Exceptions. Why Exceptions? (1.2) Caller vs. Callee. EECS2030 B: Advanced Object Oriented Programming Fall 2018
Why Exceptions? (1.1) Exceptions EECS2030 B: Advanced Object Oriented Programming Fall 2018 CHEN-WEI WANG 1 class Circle { 2 double radius; 3 Circle() { /* radius defaults to 0 */ 4 void setradius(double
More informationExceptions. EECS2030 B: Advanced Object Oriented Programming Fall 2018 CHEN-WEI WANG
Exceptions EECS2030 B: Advanced Object Oriented Programming Fall 2018 CHEN-WEI WANG Caller vs. Callee Within the body implementation of a method, we may call other methods. 1 class C1 { 2 void m1() { 3
More informationJava Security. Compiler. Compiler. Hardware. Interpreter. The virtual machine principle: Abstract Machine Code. Source Code
Java Security The virtual machine principle: Source Code Compiler Abstract Machine Code Abstract Machine Code Compiler Concrete Machine Code Input Hardware Input Interpreter Output 236 Java programs: definitions
More informationObject Oriented Design
Singleton Pattern Singleton Pattern Intent - Ensure that only one instance of a class is created. - Provide a global point of access to the object. Implementation The implementation involves a static member
More information1/9/2015. Intro to CS: Java Review Assignment Due Dates Chapter 7 7.1: while Loops 7.2: for Loops Ch7 Work Time. Chapter 7 Iteration WHILE LOOPS
Chapter 7 Iteration The Plan For Today Intro to CS: Java Review Assignment Due Dates Chapter 7 7.1: while Loops 7.2: for Loops Ch7 Work Time WHILE LOOPS Executes a block of code repeatedly A condition
More informationECE462Exam3. 08:10-09:20AM, November 20, 2009
ECE462Exam3 08:10-09:20AM, November 20, 2009 IcertifythatIwillnotreceivenorprovideaidtoanyotherstudentforthisexam. Signature: Youmustsignhere.Otherwise,theexamisnotgraded. This exam is printed double sides.
More informationECE 462 Exam 3. 11:30AM-12:20PM, November 17, 2010
ECE 462 Exam 3 11:30AM-12:20PM, November 17, 2010 I will not receive nor provide aid to any other student for this exam. Signature: You must sign here. Otherwise, the exam is not graded. This exam is printed
More informationThis exam is open book. Each question is worth 3 points.
This exam is open book. Each question is worth 3 points. Page 1 / 15 Page 2 / 15 Page 3 / 12 Page 4 / 18 Page 5 / 15 Page 6 / 9 Page 7 / 12 Page 8 / 6 Total / 100 (maximum is 102) 1. Are you in CS101 or
More informationSynchronization
Synchronization 10-28-2013 Synchronization Coming next: Multithreading in JavaFX (javafx.concurrent) Read: Java Tutorial on concurrency JavaFX Tutorial on concurrency Effective Java, Chapter 9 Project#1:
More informationCS/B.TECH/CSE(New)/SEM-5/CS-504D/ OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 GROUP A. (Multiple Choice Type Question)
CS/B.TECH/CSE(New)/SEM-5/CS-504D/2013-14 2013 OBJECT ORIENTED PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers
More informationOverview of Java s Support for Polymorphism
Overview of Java s Support for Polymorphism Douglas C. Schmidt d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Professor of Computer Science Institute for Software Integrated Systems Vanderbilt
More informationPackages & 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 informationWebLogic-real-Life Documentation
WebLogic-real-Life Documentation Release 0.1 Mathieu COAVOUX September 06, 2016 Startup and Shutdown 1 Startup WebLogic 3 1.1 Startup and Shutdown Classes...................................... 3 2 Java
More informationTake Control with AspectJ
Hermod Opstvedt Chief Architect DnB NOR ITUD Common components Hermod Opstvedt Slide 1 What is AspectJ? Aspect-oriented programming (AOP) is a technique for improving separation of concerns. Crosscutting
More informationChair of Software Engineering. Languages in Depth Series: Java Programming. Prof. Dr. Bertrand Meyer. Exercise Session 3
Chair of Software Engineering Languages in Depth Series: Java Programming Prof. Dr. Bertrand Meyer Exercise Session 3 Today s Exercise Session Assignment 2 Walkthrough the master solution (your solutions)
More information(A) 99 (B) 100 (C) 101 (D) 100 initial integers plus any additional integers required during program execution
Ch 5 Arrays Multiple Choice 01. An array is a (A) (B) (C) (D) data structure with one, or more, elements of the same type. data structure with LIFO access. data structure, which allows transfer between
More informationChapter 8 Threads Zindell Technologies, Ltd. Question 1: Which one statement below is true concerning the following code?
1 Chapter 8 Threads Question 1: Which one statement below is true concerning the following code? 1. class Hevron extends java.util.vector implements Runnable 2. 3. public void run(int counter) 4. 3. System.out.println("in
More informationAgenda. Announcements. Extreme Java G Session 2 - Main Theme Java Tools and Software Engineering Techniques
Extreme Java G22.3033-007 Session 2 - Main Theme Java Tools and Software Engineering Techniques Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical
More informationCS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70
CS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 2012 OBJECT ORIENTED PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers
More informationDynalink. Dynamic Linker Framework for Languages on the JVM. Attila Szegedi, Software Engineer, Twitter
Dynalink Dynamic Linker Framework for Languages on the JVM Attila Szegedi, Software Engineer, Twitter Inc. @asz 1 What s the problem? circle.color = 0xae17e3 class Circle def color=(value)... end end public
More informationCS506 today quiz solved by eagle_eye and naeem latif.mcs. All are sloved 99% but b carefull before submitting ur own quiz tc Remember us in ur prayerz
CS506 today quiz solved by eagle_eye and naeem latif.mcs All are sloved 99% but b carefull before submitting ur own quiz tc Remember us in ur prayerz Question # 1 of 10 ( Start time: 04:33:36 PM ) Total
More informationCHAPTER 6: CREATIONAL DESIGN PATTERNS
CHAPTER 6: CREATIONAL DESIGN PATTERNS SESSION III: BUILDER, PROTOTYPE, SINGLETON Software Engineering Design: Theory and Practice by Carlos E. Otero Slides copyright 2012 by Carlos E. Otero For non-profit
More informationInheritance. A mechanism for specialization A mechanism for reuse. Fundamental to supporting polymorphism
Inheritance A mechanism for specialization A mechanism for reuse Fundamental to supporting polymorphism 68 BankAccount class Account { protected: double fbalance; public: Account( double abalance ); void
More informationCS61B Lecture #7. Announcements:
Announcements: CS61B Lecture #7 New discussion section: Tuesday 2 3PM in 310 Soda. New lab section: Thursday 2 4PM in 273 Soda. Programming Contest coming up: 5 October (new date). Watch for details. Last
More information3/25/14. Lecture 25: Concurrency. + Today. n Reading. n P&C Section 6. n Objectives. n Concurrency
+ Lecture 25: Concurrency + Today n Reading n P&C Section 6 n Objectives n Concurrency 1 + Concurrency n Correctly and efficiently controlling access by multiple threads to shared resources n Programming
More informationIntroduction to Java
Introduction to Java Module 1: Getting started, Java Basics 22/01/2010 Prepared by Chris Panayiotou for EPL 233 1 Lab Objectives o Objective: Learn how to write, compile and execute HelloWorld.java Learn
More informationUnit 5 - Exception Handling & Multithreaded
Exceptions Handling An exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception occurs the normal flow of the program is disrupted and the program/application
More informationUsing the Xcode Debugger
g Using the Xcode Debugger J Objectives In this appendix you ll: Set breakpoints and run a program in the debugger. Use the Continue program execution command to continue execution. Use the Auto window
More informationModule - 4 Multi-Threaded Programming
Terminologies Module - 4 Multi-Threaded Programming Process: A program under execution is called as process. Thread: A smallest component of a process that can be executed independently. OR A thread is
More informationLife Without NetBeans
Life Without NetBeans Part C Web Applications Background What is a WAR? A Java web application consists a collection of Java servlets and regular classes, JSP files, HTML files, JavaScript files, images,
More informationParallel Code Smells: A Top 10 List
Parallel Code Smells: A Top 10 List Luc Bläser Hochschule für Technik Rapperswil Multicore@Siemens 8 Feb. 2017, Nuremberg Code Smells Symptoms in code Indicators of potential design flaws Partly curable
More informationCS 211: Potpourri Enums, Packages, Unit Tests, Multi-dimensional Arrays Command Line Args
CS 211: Potpourri Enums, Packages, Unit Tests, Multi-dimensional Arrays Command Line Args Chris Kauffman Week 9-1 Front Matter This Week Mon: Potpourri Wed: Exceptions Thu: Lab 09 Task Today P4 Packages
More informationGlassFish V3. Jerome Dochez. Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID YOUR LOGO HERE
YOUR LOGO HERE GlassFish V3 Jerome Dochez Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net Session ID 1 Goal of Your Talk What Your Audience Will Gain Learn how the GlassFish V3 groundbreaking
More information(A) 99 ** (B) 100 (C) 101 (D) 100 initial integers plus any additional integers required during program execution
Ch 5 Arrays Multiple Choice Test 01. An array is a ** (A) data structure with one, or more, elements of the same type. (B) data structure with LIFO access. (C) data structure, which allows transfer between
More informationIntroduction to the coursework for CI228
Introduction to the coursework for CI228 It is very unlikely that you would be able to complete this coursework without attending lectures and tutorials and following the suggested completion deadlines.
More informationApache Felix Framework Launching and Embedding
Apache Felix Framework Launching and Embedding Apache Felix Framework Launching and Embedding [This document describes framework launching introduced in Felix Framework 2.0.0 and continuing with the latest
More informationInformation Science. No. For each question, choose one correct answer and write its symbol (A E) in the box.
For each question, choose one correct answer and write its symbol (A E) in the box. (A E) Q16. When compiling the program below, the name of which is prog.c, the following error is reported. Which program
More informationInheritance: Definition
Inheritance 1 Inheritance: Definition inheritance: a parent-child relationship between classes allows sharing of the behavior of the parent class into its child classes one of the major benefits of object-oriented
More informationQuiz on Tuesday April 13. CS 361 Concurrent programming Drexel University Fall 2004 Lecture 4. Java facts and questions. Things to try in Java
CS 361 Concurrent programming Drexel University Fall 2004 Lecture 4 Bruce Char and Vera Zaychik. All rights reserved by the author. Permission is given to students enrolled in CS361 Fall 2004 to reproduce
More informationEJB Development Using Borland JBuilder 6 and Borland Enterprise Server 5
EJB Development Using Borland JBuilder 6 and Borland Enterprise Server 5 A step-by-step tutorial Original paper by Todd Spurling Updated and enhanced by Hartwig Gunzer, Sales Engineer, Borland Audience
More informationJava GUI Programming Revision Tour-III Type A: Very Short Answer Questions
Java GUI Programming Revision Tour-III Type A: Very Short Answer Questions 1 Fill in the blanks (i) In java, methods reside in. (ii) The number and type of arguments of a method are known as. (iii) The
More informationEvolving mutation from objects to the cloud
Evolving mutation from objects to the cloud MUTATION workshop, Berlin, March 2011 Benoit Baudry 1 Outline A perspective on testing in evolving software construction paradigms A methodological pattern:
More information