Professional Documents
Culture Documents
Test Report
Test Report
Question-wise Details
Section #1
What will be the output of the following Java code? Assume that all classes are present in the same package.
class Account {
int balance;
public void createAccount() {
System.out.println("Account created");
balance = 500;
n
}
tio
}
class SavingsAccount extends Account {
ca
public void createAccount() {
System.out.println("Savings account created");
balance = 1000;
du
}
}
public class ApplicationTester{
4E
account.createAccount();
System.out.println("Balance: "+account.balance);
o
}
}
Sh
Account created
Balance: 500
Account created
Balance: null
Shout4Education
2 / 47
Shout4Education
n
}
tio
public class DemoTriangle {
public static void main(String args[]){
ca
Triangle triangle = new Triangle();
triangle.calculateArea();
}
du
}
4E
null
o
Shout4Education
3 / 47
Shout4Education
You are working on a critical project. Due to some project requirement you are asked to share sensitive information with others.
Which among the following actions you will perform?
Only (b)
Only (a)
n
Only ( c )
tio
ca
Question 4: Time: 2 Min 1 Sec Marks: 1/ 1
du
Refer the class declarations given below:
4E
class A{ }
ut
class B extends A{ }
o
class C extends B{ }
Sh
class D extends C{ }
A a = new D();
B b=new D();
C c=new C();
C c=new B();
Shout4Education
4 / 47
Shout4Education
n
7 abstract public void createAccount();
8 public double getAmount(){
tio
9 return this.amount;
10 }
11 }
12
ca
13 public class MyBank extends Bank{
14 public MyBank(){
15 this.amount = 2000.0;
16 }
du
17 }
18
4E
o ut
The above code with respect to MyBank class has compilation error. Identify the CORRECT method to be included in MyBank
Sh
Shout4Education
5 / 47
Shout4Education
Options Response Answer
n
tio
ca
du
1 public void createAccount(){
2 System.out.println("Account Created");
3 }
4
4E
o ut
1 void createAccount(){
2 System.out.println("Account Created");
Sh
3 }
4
Shout4Education
6 / 47
Shout4Education
Which testing technique tests the functionality of the application without looking at the internal structure of the code?
Assembly Testing
n
Product Testing
tio
ca
Question 7: Time: 2 Min 39 Sec Marks: 1/ 1
du
4E
o ut
Sh
Shout4Education
7 / 47
Shout4Education
What will be the output of the following Java code?
MyInterface1.java
MyInterface2.java
MyClass.java
n
tio
public class MyClass implements MyInterface1, MyInterface2{
public void method1(){
System.out.print ("1 ");
ca
}
void method2(){
System.out.print ("2");
du
}
}
4E
InterfaceTester.java
ut
reference.method1();
reference.method2();
}
}
Shout4Education
8 / 47
Shout4Education
Options Response Answer
1 2
n
tio
Question 8: Time: 1 Min 33 Sec Marks: 1/ 1
ca
What will be the output of the following Java code?
interface A{
du
void display(); // Line X
}
4E
class B implements A{
void display(){ // Line Y
ut
System.out.println("B");
}
o
}
Sh
Shout4Education
9 / 47
Shout4Education
Options Response Answer
n
Question 9: Time: 30 Sec Marks: 1/ 1
tio
Which of the following statement(s) is/are TRUE?
ca
du
1) JavaScript is case sensitive
4E
1,2,3 and 4
3 and 4 only
Shout4Education
10 / 47
Shout4Education
What will be the output of the following Java code?
n
tio
Choose the most appropriate option.
ca
Program will display “Twenty” du
Program will display “Ten Zero”
Consider table Account(customerid, accountid, accounttype,balance) has been created with customerid as primary key.
Identify ALTER statement which executes successfully on account table. [Note: Table has no records]
Shout4Education
11 / 47
Shout4Education
Options Response Answer
n
tio
Question 12: Time: 6 Min 17 Sec
ca
Marks: 1/ 1
du
John and Peter are working on a Java project. John is using Windows platform and Peter is using Unix platform. In order for
Peter to execute John's Java code which file John should share with Peter?
4E
Shout4Education
12 / 47
Shout4Education
Choose the CORRECT statement(s) with respect to aggregate functions
c and d only
n
c only
tio
d only
ca
a and b only
du
Question 14: Time: 26 Sec Marks: 1/ 1
4E
Which is the CORRECT SQL query to display the details of items whose price is in the range 5000 to 10000 (both exclusive);
o
Sh
(i) SELECT ItemCode,ItemName,Price FROM Item WHERE Price BETWEEN 5000 AND 10000;
(ii) SELECT ItemCode,ItemName,Price FROM Item WHERE Price > 5000 AND Price < 10000;
Only (ii)
Only (i)
Shout4Education
13 / 47
Shout4Education
Question 15: Time: 1 Min 24 Sec Marks: 1/ 1
Consider the below tables are created and has some records.
Account(accountId,accountType,balance)
Transaction(transactionId,accountId,transactionType,amount)
n
tio
Which is the CORRECT SQL statement to retrieve accountId and accountType for which more than three transactions are
recorded?
ca
du
4E
o ut
Sh
Shout4Education
14 / 47
Shout4Education
Options Response Answer
SELECT accountId,accountType
FROM account
WHERE COUNT(transactionid)>3
GROUP BY accountid );
SELECT accountId,accountType
FROM account
n
WHERE accountid IN(
tio
SELECT accountid FROM transaction
ca
GROUP BY accountid HAVING
COUNT(transactionid)>3);
du
SELECT accountId,accountType
FROM account
4E
COUNT(accountId)=(
o
SELECT COUNT(accountid)FROM
transaction
Sh
SELECT accountId,accountType
FROM account
Shout4Education
15 / 47
Shout4Education
n
Ony (ii) and (iii)
tio
All (i), (ii) and (iii)
ca
du
Question 17: Time: 45 Sec Marks: 1/ 1
4E
package x;
public class Student{
o
System.out.println("Hello");
}
}
package y;
import x.Student; // Line 2
Shout4Education
16 / 47
Shout4Education
Options Response Answer
n
Question 18: Time: 26 Sec Marks: 1/ 1
tio
Consider the table Customer given below.
ca
du
4E
CustomerId CustomerName
101 John
ut
102 Tom
o
103 twinkle
104 HELEN
Sh
Shout4Education
17 / 47
Shout4Education
Options Response Answer
Tom
HELEN
Tom
twinkle
Helen
John
Tom
n
HELEN
tio
John
ca
Tom du
HELEN
twinkle
4E
ut
Only (1)
Only (2)
Shout4Education
18 / 47
Shout4Education
n
case 1:
System.out.println("Odd");
tio
break;
}
ca
}
}
du
Choose the most appropriate option.
4E
Even Odd
o
Default
Sh
Shout4Education
19 / 47
Shout4Education
What will be the output of the following Java code?
class Base {
public void display() {
System.out.println("Will I be displayed?");
}
}
class Derived extends Base {
public void display() {
super.display();
System.out.println("I will be displayed");
}
}
public class ApplicationTester{
public static void main(String[] args) {
n
Derived derived = new Derived();
tio
derived.display();
}
}
ca
Choose the most appropriate option.
du
Options Response Answer
4E
Will I be displayed?
I will be displayed
ut
Will I be displayed?
Will I be displayed?
o
I will be displayed
Sh
I will be displayed
Assume that below code is present in the head tag of a HTML page.
<style>
.myclass{
background-color: lightgrey;
color:blue;
}
</style>
<h1 style="myclass">Welcome to My
Homepage</h1>
<h1 id="myclass">Welcome to My
Homepage</h1>
<h1 class="myclass">Welcome to My
Homepage</h1>
<h1 class=".myclass">Welcome to My
Homepage</h1>
n
Question 23: Time: 2 Min 10 Sec Marks: 1/ 1
tio
What will be the output of the following Java code?
ca
public class ApplicationTester {
public static void main(String[] args){
du
int i=0;
while(++i <= 5){
4E
System.out.println(i);
}
o
}
Sh
3 5 7
1 3 5
1 3 5 7
3 5
Shout4Education
21 / 47
Shout4Education
What will be the output of the following Java code?
n
}
tio
}
ca
Options Response Answer
du
12 20 14 20
12 10 14 20
4E
6 45 14 20
ut
12 45 14 45
o
Sh
Which of the following statment/s is/are TRUE with respect to Community Cloud?
Shout4Education
22 / 47
Shout4Education
Options Response Answer
Only (1)
Only (2)
Analyse the code given below. Assume that Customer is a valid Java class.
n
tio
public class ApplicationTester{
public static void main(String[] args) {
Customer c[]=new Customer[5]; // Line X
ca
}
}
du
How many 'Customer' objects are created after executing Line X?
4E
5
o
0
Sh
Shout4Education
23 / 47
Shout4Education
Depict the relation between the classes mentioned below
class Company{
String company_name;
Address address;
Company(String compnay_name){
address = new Address(10,"Delhi","10th Cross","India");
}
}
class Address{
int streetNum;
String city;
String state;
String country;
n
Address(int street,String city,String state,String country){}
tio
}
ca
Options Response Answer
du
Abstraction
Generalization
4E
Composition
ut
Aggregation
o
Sh
Shout4Education
24 / 47
Shout4Education
What will be the output of the following Java code?
n
Choose the most appropriate option.
tio
Options Response Answer
ca
5
4
du
No output, as the loop will get into to
infinite execution
4E
3
o ut
Shout4Education
25 / 47
Shout4Education
Consider the following CREATE TABLE STATEMENT which successfully creates the table Student. Assume that University
table already exists with University Codes 'VTU', 'STU', and 'CMU'.
UniversityCode Varchar2(10)
n
tio
ca
Currently student table contains only one row as shown below.
du
(1001,'Jack','jack@gmail.com','STU');
4E
ut
Which of the following INSERT statement would successfully insert the row into "Student" table?
o
Sh
Shout4Education
26 / 47
Shout4Education
n
}
tio
public class Car extends Vehicle {
private String carModel;
ca
private double average;
//Line1
// Assume getters and Setters are already coded...
du
}
4E
Choose a valid Constructor implementation to be inserted at Line1 to make the above code compile successfully
ut
Shout4Education
27 / 47
Shout4Education
Options Response Answer
n
average
}
tio
public Car(int vehicleId, String
ca
vehicleName, String carModel,double
average) {
this.carModel = carModel;
du
this.average = average;
}
4E
super(vehicleId, vehicleName);
//Java code to initialize carModel and
o
average
Sh
Shout4Education
28 / 47
Shout4Education
Assume that table Employee is created with foreign key column managerid referring to empid column of same table and the
following records are inserted.
n
tio
How many rows will be deleted after executing the below DML statement?
ca
DELETE FROM employee WHERE empid=1001;
du
Select the most appropriated option.
4E
0
o
2
Sh
Which is the CORRECT SQL query to display details in the decreasing order (highest to lowest) of TotalSales and in the
decreasing order of SalesmanId in case TotalSales is the same.
Shout4Education
29 / 47
Shout4Education
Options Response Answer
n
SELECT SalesmanId, SalesmanName,
tio
TotalSales
ca
FROM Salesman ORDER BY
TotalSales DESC, SalesmanId DESC;
du
SELECT SalesmanId, SalesmanName,
TotalSales
4E
Shout4Education
30 / 47
Shout4Education
What will be the output of the following Java code?
n
0 0 0 --Done--
tio
--Done--
ca
Compilation error as array values have
not been initialized
du
0 --Done--
4E
Shout4Education
31 / 47
Shout4Education
Refer the Incomplete JavaScript code given below:
<script>
function aFun(){
//Line1
n
tio
</script>
<button onclick='aFun()'>Click</button>
ca
du
Identify the CORRECT option which if placed at Line1 will display the alert message 'This is global value'
4E
alert(document.gVar)
ut
alert(window.gVar)
o
alert(global.gVar)
Sh
alert(gVar)
Shout4Education
32 / 47
Shout4Education
Consider the following Java code snippet.
From the above code, identify how many object(s) are eligible for garbage collection.
n
0
tio
1
ca
2
3
du
4E
Shout4Education
33 / 47
Shout4Education
Question 37: Time: 50 Sec Marks: 1/ 1
n
tio
Services Limited
Accenture
ca
Compilation fails as '+' operator connot
be used for String
du
Accenture Services Limited
4E
ut
Which is the CORRECT syntax for displaying a text area in a web page? while loading the page the default size of the text area
Sh
<textarea rowsize="4"
columnsize="50"> </textarea>
Shout4Education
34 / 47
Shout4Education
Question 39: Time: 3 Min 2 Sec Marks: 1/ 1
Which is the CORRECT SQL statement to retrieve customerId, customerName, accountId and balance for all customers. It
n
should also display the details of the customers who are not having any account.
tio
ca
du
4E
o ut
Sh
Shout4Education
35 / 47
Shout4Education
Options Response Answer
SELECT c.customerId,c.customerNam
e,a.accountId,a.balance
ON c.customerId=a.customerId;
SELECT c.customerId,c.customerNam
e,a.accountId,a.balance
n
ON c.customerId=a.customerId;
tio
SELECT c.customerId,c.customerNam
ca
e,a.accountId,a.balance
ON c.customerId=a.customerId;
4E
SELECT c.customerId,c.customerNam
e,a.accountId,a.balance
ut
customer c
Sh
ON c.customerId=a.customerId;
(1) To take action to improve your skills and performance so you are effective in your current and future roles
(2) To have your say about how you think your colleagues are performing
Shout4Education
36 / 47
Shout4Education
Options Response Answer
Only (2)
Only (1)
n
<a href="abc.lkm@accenture.com" target = "-------"> Click </a>
tio
Assume that “abc.lkm@accenture.com” is a valid site. Choose the appropriate value for the target attribute to open the web
page in a new window.
ca
Options Response Answer
_self
du
_top
4E
_blank
_parent
o ut
Sh
(1) Planning
(2) Initiation
(3) Closing
(4) Execution
Shout4Education
37 / 47
Shout4Education
Options Response Answer
n
tio
Which is the CORRECT SQL statement to retrieve all unique jobBand from Employee table ?
ca
Options Response Answer
DISTINCT;
Employee;
o
Employee;
Shout4Education
38 / 47
Shout4Education
Options Response Answer
Only (1)
n
tio
ca
du
1 package mypackage1;
2
3 public class Parent {
4 public Parent(){
4E
5 System.out.print("1 ");
6 }
7 protected void parentMethod(){
8 System.out.println(" 3 ");
ut
9 }
10 }
11
o
12 package mypackage2;
13 import mypackage1.Parent;
Sh
14
15 public class Child extends Parent{
16 public Child(){
17 System.out.println("2");
18 }
19 }
20
21
22 package mypackage2;
23
24 public class ApplicationTester{
25 public static void main(String[] args){
26 Child child = new Child();
27 child.parentMethod();
28 }
29 }
30
Shout4Education
39 / 47
Shout4Education
Options Response Answer
1 2
1 2 3
n
tio
Refer the HTML code given below:
ca
du
<html>
4E
<table border="2">
ut
<tr><td>Jack</td> <td>LKM</td></tr>
<tr><td>Ace</td><td rowspan="2">Delivery</td></tr>
<tr><td>Justin</td></tr>
</table>
</html>
How many cells will be displayed when the page is displayed on the browser?
Shout4Education
40 / 47
Shout4Education
Options Response Answer
10
n
tio
WHICH is the CORRECT SQL statement to list employees whose salary is more than their department's average salary? The
result should be in ascending order of department number.
ca
du
4E
o ut
Sh
Shout4Education
41 / 47
Shout4Education
Options Response Answer
ORDER BY e1.deptNo;
n
FROM employee e1 WHERE salary >
tio
(SELECT avg(e2.salary) FROM
employee e2
ca
WHERE e2.deptNo = e1.deptNo)
ORDER BY e1.deptNo;
du
SELECT e1.empId, e1.empName,
e1.salary,e1.deptNo
4E
Shout4Education
42 / 47
Shout4Education
class Person {
public void work() {
System.out.println(”Person Work's”);
}
}
n
public static void main(String[] args) {
tio
Employee employee=new Employee();
Person p=employee;
p.work();
ca
}
}
du
Choose the most appropriate option.
4E
Employee Work's
ut
Person Work's
Person Work's
Employee Work's
Shout4Education
43 / 47
Shout4Education
Consider the HTML code given below.
<html>
<head>
<style>
h2{
color:green;
n
tio
span{
color:blue;
ca
}
du
</style>
4E
</head>
<body>
ut
</body>
</html>
While displaying output on the browser what will be the color of each word of the text "Accenture Bangalore India"?
Shout4Education
44 / 47
Shout4Education
Options Response Answer
Accenture - Green
Bangalore - Blue
India - Green
Accenture - Green
Bangalore - Blue
India - Blue
Accenture - Green
n
Bangalore - Green
tio
India - Green
ca
Accenture - Green du
Bangalore - Green
India - Blue
4E
ut
Customer(customerId,customerName)
Which is the CORRECT SQL statement to retrieve customer Id and customer name of all customers who has made transaction
in their account?
Shout4Education
45 / 47
Shout4Education
Options Response Answer
n
FROM customer c SELF JOIN account
a ON c.customerid=a.customerid
tio
SELF JOIN transaction t ON
ca
t.accountid=a.accountid;
account a ON
c.customerid=a.customerid
ut
t.accountid=a.accountid;
Sh
c.customerid=a.customerid;
Shout4Education
46 / 47
Shout4Education
n
tio
ca
du
4E
ut
o
Sh
Shout4Education
47 / 47