OCA(1z0-803_OCA1.7)MockExamPI

Author:

Access: Public Instant Grading

Start FlashCards Quiz Series Learn

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now
The objective of this session is to introduce the subject of software engineering. When you have read this session you will understand what software engineering is and why it is important, know the answers to key questions which provide an introduction to software engineering, understand ethical and professional issues which are important for software engineers.

Introduction

Virtually all countries now depend on complex computer-based systems. More and more products incorporate computers and controlling software in some form. The software in these systems represents a large and increasing proportion of the total system costs. Therefore, producing software in a cost-effective way is essential for the functioning of national and international economies.

Software engineering is an engineering discipline whose goal is the cost-effective development of software systems. Software is abstract and intangible. It is not constrained by materials, governed by physical laws or by manufacturing processes. In some ways, this simplifies software engineering as there are no physical limitations on the potential of software. In other ways, however, this lack of natural constraints means that software can easily become extremely complex and hence very difficult to understand.

Software engineering is still a relatively young discipline. The notion of ‘software engineering’ was first proposed in 1968 at a conference held to discuss what was then called the ‘software crisis’. This software crisis resulted directly from the introduction of powerful, third generation computer hardware. Their power made hitherto unrealisable computer applications a feasible proposition. The resulting software was orders of magnitude larger and more complex than previous software systems.

Early experience in building these systems showed that an informal approach to software development was not good enough. Major projects were sometimes years late. They cost much more than originally predicted, were unreliable, difficult to maintain and performed poorly. Software development was in crisis. Hardware costs were tumbling whilst software costs were rising rapidly. New techniques and methods were needed to control the complexity inherent in large software systems.

These techniques have become part of software engineering and are now widely although not universally used. However, there are still problems in producing complex software which meets user expectations, is delivered on time and to budget. Many software projects still have problems and this has led to some commentators (Pressman, 1997) suggesting that software engineering is in a state of chronic affliction.

As our ability to produce software has increased so too has the complexity of the software systems required. New technologies resulting from the convergence of computers and communication systems place new demands on software engineers. For this reason and because many companies do not apply software engineering techniques effectively, we still have problems. Things are not as bad as the doomsayers suggest but there is clearly room for improvement.

Hi Guys,

You have to finish this exam in 60 minutes. This exam pattern is same as original exam except timeout per question validation.

Best Regards,

Pankaj Kalra (Java Trainer)

Mobile No: 9654083668

Email Address: mca.pankajkalra@gmail.com

"Life is all about the next step"




Sample Questions from the OCA(1z0-803_OCA1.7)MockExamPI Quiz

Question: public static void main(String[] args) { int []xx = null; for (int i : xx) { System.out.println(i); } }

Choices:

null

0

compilation fails

Java.lang.NullPointerException

Question: package ocjp; import java.util.ArrayList; interface Universe{ public void doStuff(); } class Star{ public void doStuff(){ System.out.println("twinkling star"); } } class Sun extends Star implements Universe{ public void doStuff(){ System.out.println("Shinning sun"); } } public class Test { public static void main(String[] args) { ArrayList<String> arrayList = new ArrayList<String>(); Sun obj2 = new Sun(); Star obj3 = obj2; ((Sun) obj3 ).doStuff(); ((Star)obj2 ).doStuff(); ((Universe)obj2).doStuff(); } }

Choices:

Shining Sun Shining Sun Shining Sun

Shining Sun Twinkling Star Shining Sun

Compilation fails

A ClassCastException is thrown at runtime

Question: public class Marklist { int num; public static void graceMarks(Marklist obj4) { obj4.num += 10; } public static void main(String[] args) { MarkList obj1 = new MarkList(); MarkList obj2 = obj1; MarkList obj1 = null; obj2.num = 60; graceMarks(obj2); } } How many objects are created in the memory runtime?

Choices:

1

2

3

4

Question: Which statement initializes a stringBuilder to a capacity of 128? A. StringBuilder sb = new String ("128"); B. StringBuilder sb = StringBuilder.setCapacity (128); C. StringBuilder sb = StringBuilder.getInstance (128); D. StringBuilder sb = new StringBuilder (128);

Choices:

StringBuilder sb = new String ("128");

StringBuilder sb = new StringBuilder (128);

StringBuilder sb = StringBuilder.getInstance (128);

StringBuilder sb = StringBuilder.setCapacity (128);

Question: abstract class X{ public abstract void methodX(); } interface Y{ public void methodY(); } Which two code fragments are valid?

Choices:

class Z extends X implements Y{ public void methodz(){} }

abstract class Z extends X implements Y{ public void methodz(){} }

class Z extends X implements Y{ public void methodX(){} }

abstract class Z extends X implements Y{ }

class Z extends X implements Y{ public void methodY(){} }

Question: public class Tester { static void test(int[] a) { int[] b = new int[2]; a = b; System.out.print(b.length); System.out.print(a.length); } public static void main(String[] args) { int[] a = new int[5]; test(a); System.out.print(a.length); } }

Choices:

225

200

222

255

Question: Long var = (long) 999; // Line 3 long x1 = var.longValue(); // Line 5 double x2 = var.longValue(); // Line 7 double x3 = (double) var.longValue(); // Line 9 Double x4 = Long.valueOf("999"); // Line 11 Number x5 = Integer.parseInt("999"); // Line 13 Long x6 = Integer.parseInt("999"); // Line 15 Which lines are not valid and produce compile time exception ?

Choices:

Line 3

Line 5

Line 7

Line 11

Line 15

Question: int[] a = new int[0]; a[0] = 5; System.out.println(a[0]);

Choices:

5

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at ocjp.Test.main(Test.java:7)

Compilation error, arrays cannot be initialized to zero size

Compilation error, it is a.length() not a.length

Question: String[][] arra = new String[3][]; arra[0] = new String[]{"rose", "lily"}; arra[1] = new String[]{"apple", "berry","cherry","grapes"}; arra[0] = new String[]{"beans", "carrot","potato"}; // insert code fragment here Which code fragment when inserted at line '// insert code fragment here', enables the code to successfully change arra elements to uppercase?

Choices:

String[][] arra = new String[3][]; arra[0] = new String[]{"rose", "lily"}; arra[1] = new String[]{"apple", "berry","cherry","grapes"}; arra[0] = new String[]{"beans", "carrot","potato"}; for (int i = 0; i < arra.length; i++) { for (int j=0; j < arra[i].length; j++) { arra[i][j] = arra[i][j].toUpperCase(); } }

for (int i = 0; i < 3; i++) { for (int j=0; j < 4; j++) { arra[i][j] = arra[i][j].toUpperCase(); } }

for (String a[]: arra) { for (String x:a) { x = x.toUpperCase(); } }

for (int i:arra.length) { for (String x:arra) { arra[i].toUpperCase(); } }

No one

Question: package ocjp; public class Test { public static void main(String[] args) { Test p = new Test(); try { p.doPrint(); p.doList(); } catch (Exception e) { System.out.println("Caught: "+e); } } public void doList() throws Exception{ throw new Error("error"); } public void doPrint()throws Exception{ throw new RuntimeException("RuntimeException"); } }

Choices:

Caught: java.lang.RuntimeException: RuntimeException

Caught: java.lang.RuntimeException: RuntimeException Caught: java.lang.Error: error

Caught: java.lang.RuntimeException: RuntimeException Exception in thread "main" java.lang.Error: error at ocjp.Program136.doList(Program136.java:15) at ocjp.Program136.main(Program136.java:9)

java.lang.RuntimeException: RuntimeException at ocjp.Program136.doPrint(Program136.java:19) at ocjp.Program136.main(Program136.java:8)

Question: public static void main(String[] args) { StringBuilder sb1 = new StringBuilder("Duke"); String str1= sb1.toString(); // insert code here System.out.println(str1 == str2); }

Choices:

String str2 = str1;

String str2 = new string (str1);

String str2 = sb1.toString();

String str2 = “Duke”;

Start FlashCards Quiz Series Learn
Madison Christian
Start Exam
Tess Armstrong
Start Quiz
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/ocjp-1z0-803-oca1-7-mock-exam-quiz-by-pankaj-kalra" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>