460 likes | 675 Views
The Sun’s Java Certification and its Possible Role in the Joint Teaching Material. Nataša Ibrajter Faculty of Science Department of Mathematics and Informatics Novi Sad. Contents. Kinds of Sun Certified Exams Why Become Java 2 Certified? Developer's Certification Exam (SCJD)
E N D
The Sun’s Java Certification and its Possible Role in the Joint Teaching Material Nataša Ibrajter Faculty of Science Department of Mathematics and Informatics Novi Sad
Contents • Kinds of Sun Certified Exams • Why Become Java 2 Certified? • Developer's Certification Exam (SCJD) • The Programmer’s Exam (SCJP) • Some Characteristic Questions • A Proposal for the Joint Java Course • The NS Experience • Impact on the Joint Material
Kinds of Sun Certified Exams • Sun Certified Programmer (SCJP) • CX-310-035 Programmer’s Exam • Sun Certified Developer (SCJD) • CX-310-252A Developer’s Programming Assignment • CX-310-027 Developer’s Essay Exam
Why Become Java 2 Certified? • It provides proof of professional achievement. • It increases one’s marketability. • It provides greater opportunity for advancement in one’s field. • It is increasingly found as a requirement for some types of advanced training. • It raises customer confidence in you and your company’s services.
Developer's Certification Exam (SCJD) • It consists of two parts: • a project assignment and • a follow-up exam • The assignment describes a task that starts with some code supplied with a project description. Person who takes the exam is supposed to finish the project.
Developer's Certification Exam (SCJD) • The follow-up exam has at least three aspects: • Java's features and libraries, • knowledge and understanding of one's own classes, • defending the choices one made writing code.
I/O streams Swing The AWT event model Object serialization RMI javadoc Packages Threads Interfaces Developer's Certification Exam (SCJD)
The Programmer’s Exam (SCJP) • Language fundamentals • Source files • Keywords and identifiers • Primitive data types • Literals • boolean literals • char literals
The Programmer’s Exam (SCJP) • integral literals • floating-point literals • string literals • Arrays • Class fundamentals • the main() method • variables and initialization • Argument passing: by reference or by value • Garbage collection
The Programmer’s Exam (SCJP) • Operators and assignments • Evaluation order • The unary operators • ++ and -- • + and - • ~ • ! • cast operator
The Programmer’s Exam (SCJP) • The arithmetic operators • * and / • % • + and - • arithmetic error conditions • The shift operators: >>, << and >>> • fundamentals of shifting • shifting negative numbers • arithmetic promotion of operands • reduction of the right operand
The Programmer’s Exam (SCJP) • The comparison operators • <, <=, > and >= • the instanceof operator • the equality comparison operators: == and != • Logical operators: &&, || and ! • Short-circuiting • Bitwise operators: &, |, ^ and ~ • The conditional operator: ? : • The assignment operator
The Programmer’s Exam (SCJP) • Modifiers • Modifier overview • The access modifiers • public • private • default • protected • subclasses and method privacy
The Programmer’s Exam (SCJP) • Other modifiers • final • abstract • static • static initilalizers • native • transient • synchronized • volatile • Modifiers and features
The Programmer’s Exam (SCJP) • Converting and casting • Explicit and implicit type changes • Primitives and conversion • primitive conversion: assignment • assignment conversion, narrower primitives and literal values • primitive conversion: method call • primitive conversion: arithmetic promotion • Primitives and casting
The Programmer’s Exam (SCJP) • Object reference conversion • object reference assignment conversion • object method-call conversion • Object reference casting • Flow control, assertions and exception handling • The loop constructs • while • do • for • break and continue statements in loops
The Programmer’s Exam (SCJP) • Selection statements • if-else construct • switch construct • Exceptions • flow of control in exception conditions • throwing exceptions • Assertions • assertions and compilation • runtime enabling of assertions • using assertions
The Programmer’s Exam (SCJP) • Objects and classes • Benefits of object-oriented implementation • encapsulation • re-use • Implementing OO relationships • Overloading and overriding • overloading method names • method overriding • Constructors and subclassing • overloading constructors
The Programmer’s Exam (SCJP) • Inner classes • the enclosing this reference and construction of inner classes • member classes • classes defined inside methods • Threads • Thread fundamentals • what a thread executes • when execution ends • thread states • thread priorities
The Programmer’s Exam (SCJP) • Controlling threads • yielding • suspending • sleeping • blocking • monitor states • scheluduling implementation • Monitors, wait and notify • the object lock and synchronization
The Programmer’s Exam (SCJP) • wait and notify • the class lock • beyond the pure model • deadlock • another way to synchronize • java.lang and java.util packages • The Object class • The Math class • The wrapper classes
The Programmer’s Exam (SCJP) • Strings • the String class • the StringBuffer class • string concatenation easy way • The collections API • collection types • collections, equality and sorting • the hashCode method • collection implementations in the API • collections and code maintenance
Some Characteristic Questions • Language fundamentals • Consider the following line of code: int[] x = new int[25]; After execution, which statements are true? Choose all that apply. • x[24] is 0. • x[24] is undefined. • x[25] is 0. • x[0] is null. • x.length is 25.
Some Characteristic Questions • Operators and assignments • What results from the following fragment of code? 1. int x = 1; 2. String [] names = {“Fred”, “Jim”, “Sheila”}; 3. names[--x] += “.”; 4. for(int i =0; i<names.length; i++){ 5. System.out.println(names[i]); 6. }
Some Characteristic Questions • The output includes Fred. with a trailing period. • The output includes Jim. with a trailing period. • The output includes Sheila. with a trailing period. • None of the outputs show a trailing period. • An ArrayIndexOutOfBoundsException is thrown.
Some Characteristic Questions • Modifiers • Given the following code and making no other changes, which combination of access modifiers (public, protected or private) can legally be placed before aMethod() on line 2 and be placed before aMethod() on line 6? 1. class SuperDuper{ 2. void aMethod(){} 3. } 4. 5. class Sub extends SuperDuper{ 6. void aMethod(){} 7. }
Some Characteristic Questions • line 2: public; line 6: private • line 2: protected; line 6: private • line 2: default; line 6: private • line 2: private; line 6: protected • line 2: public; line 6: protected
Some Characteristic Questions • Converting and casting • Will the following code compile? 1. byte b = 2; 2. byte b1 = 3; 3. b = b * b1; • Yes • No
Some Characteristic Questions class hierarchy for next question Animal Mammal Cat implements Washer Raccoon implements Washer SwampThing Dog
Some Characteristic Questions • Consider the following code: 1. Dog rover, fido; 2. Animal anim; 3. 4. rover = new Dog(); 5. anim = rover; 6. fido = (Dog)anim; Which of the following statements are true? Choose one.
Some Characteristic Questions • Line 5. will not compile. • Line 6. will not compile. • The code will compile but will throw an exception at line 6. • The code will compile and run. • The code will compile and run, but the cast in line 6 is not required and can be eliminated
Some Characteristic Questions • Flow control, assertions and exception handling Consider the following code: 1. for(int i=0; i<2; i++){ 2. for(int j=0; j<3; j++){ 3. if(i == j){ 4. continue; 5. } 6. System.out.println(“i = ”+i+” j = ”+j); 7. } 8. }
Some Characteristic Questions Which lines would be part of the output? Choose all that apply. • i =0 j = 0 • i =0 j = 1 • i =0 j = 2 • i =1 j = 0 • i =1 j = 1 • i =1 j = 2
Some Characteristic Questions • Objects and classes • Considering this class: 1. public class Test1{ 2. public float aMethod(float a, float b){} 3. 4. } Which of the following methods would be legal if added (individually) at line 3? Choose all that apply.
Some Characteristic Questions • public int aMethod(int a, int b){} • public float aMethod(float a, float b){} • public float aMethod(float a, float b, int c) throws Exception{} • public float aMethod(float c, float d){} • private float aMethod(int a, int b, int c){}
Some Characteristic Questions • Threads • A Java monitor must either extend Thread or implement Runnable. • True • False • The java.lang and java.util packages • In the following code fragment, line 4 is executed.
1. String s1 = “xyz”; 2. String s2 = “xyz”; 3. if (s1 == s2) 4. System.out.println(“4”); True False 1. String s1 = “xyz”; 2. String s2 = new String(s1); 3. if (s1 == s2) 4. System.out.println(“4”); True False Some Characteristic Questions
A Proposal for the Joint Java Course • Part I - Imperative Java programming • Introduction (in case that Java is the first programming language) • The language overview (elements of Java) • Simple data types • Expressions and control structures • Structured data types: arrays • Methods • Recursion • Complex examples with arrays (searching and sorting)
A Proposal for the Joint Java Course • Part II - OOP in Java and advanced topics • Introduction to OOP (OOP in general, place of Java, its development...) • Basic notations of OOP • Classes and objects. Class methods and variables. Object creation • Inheritance and polymorphism • Concatenated list structures • Trees • Packages • Interfaces
A Proposal for the Joint Java Course • Abstract classes • Introduction to UML • Exceptions • GUI development • Class libraries, Java Collection Framework • Reflection in Java • Threads • Basic notions of WWW • Applets • Remote Method Invocation
A Proposal for the Joint Java Course • Part III - Environments for Java programming • Usage of J2SE JDK 1.xx • Part IV - Java programming at large • Introducing SE principles in Java programming
The NS Experience • Our students are obliged to take part in not less than 70% of practical exercises, not less than 50% of exercises and not less than 30% of lectures. • The exam consists of the practical part (which is taken during the practical exercises) and of the test. • The Java certification is used as a template for the test.
The NS Experience • Students mostly show weakness in understanding how Java solves OOP issues like overriding, overloading, program flow etc, not in understanding theoretical basics of OOP. • The test tests practical knowledge in Java, not the theoretical knowledge in OOP. • If the students missed to study some aspect of a problem taking practical part of the exam, the test forces them to restudy the problem.
The NS Experience • 70% of Programmer’s Exam questions covered by our course • More than 90% excluding major sections like threads and assertions • Therefore, we cannot ‘blindly’ use any of the questions • Should we change our course to cover more questions? • Suggestion: No • However, some compatibility useful
Impact on the Joint Material • From our experience: without references to the Java Certification we cover about 70%/90% of the questions • For the creation of the Joint Material, occasional references to Java Certification exam questions are useful to • see what the industry thinks is important • check for omissions