0% found this document useful (0 votes)
16 views8 pages

Chapter 1 MCQ 2

The document presents the online exam results for a student named Kapadia Kush Amit from Vidyalankar Polytechnic, detailing their performance in an AJP - Chapter 1 exam on the Abstract Windowing Toolkit (AWT). The student answered 17 out of 20 questions correctly, with a total score of 17 marks. The document includes a list of questions, the student's answers, and the correct answers for reference.

Uploaded by

nebuladreamerx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views8 pages

Chapter 1 MCQ 2

The document presents the online exam results for a student named Kapadia Kush Amit from Vidyalankar Polytechnic, detailing their performance in an AJP - Chapter 1 exam on the Abstract Windowing Toolkit (AWT). The student answered 17 out of 20 questions correctly, with a total score of 17 marks. The document includes a list of questions, the student's answers, and the correct answers for reference.

Uploaded by

nebuladreamerx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

9/21/22, 7:54 PM Vidyalankar Polytechnic | VP

Online Exam Result

Exam : AJP - Chapter 1 - Abstract Windowing Toolkit (AWT) Class : CO5I Div : A

Student Name : KAPADIA KUSH AMIT Roll No. : 20203A0055 Enrollment No.
: 2005680051

Sr. Your Correct


Question Marks
No Answer Answer

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 1/8
9/21/22, 7:54 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

Which packages will use for the following code:

/*

<applet code="LabelDemo" width=300 height=200>

</applet>

*/

public class LabelDemo extends Applet {

public void init() {

Label one = new Label("One");

Label two = new Label("Two");

Label three = new Label("Three");

// add labels to applet window

add(one);

add(two);
1 a a 1
add(three);

a)
b)
import java.awt.*; import
java.applet.*; import javax.swing.*; import
java.awt.*;

c)
d)
import javax.swing.*; import
java.applet.*; import java.applet.*; import
java.awt.event.*;

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 2/8
9/21/22, 7:54 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer
_____________ is a superclass of TextField and TextArea classes
that is used to create single-line or multiline textfields
respectively:
a) b)
2 CheckBox c c 1
TextBox
c) d)

TextComponent Choice

The two types of menus which are given as follows:

a) b)
3 c c 1
Pop-up menus Regular menus

c) d)

Both a & b None of these

Label defines the following constructors:

a) b)

4 Label( ) Label(String str) d d 1

c)
d)
Label(String str, int how)
All of the above

How many Frame constructor are present?


a) b)

2 1
5 a a 1
c) d)

3 4

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 3/8
9/21/22, 7:54 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

The ______ class is a concrete subclass of Container.

a) b)
6 c c 1
Container Window

c) d)

Panel None

__________ is an abstract class that encapsulates all of the


attributes of a visual component.

a) b)

7 Component Window b a 0

c) d)

Frame Panel

To set a checkbox which method is used-

a) b)

8 setselectedCheckbox( ) setSelectedCheckbox( ) b b 1

c)
d)
getselectedCheckbox( )
getSelectedCheckbox( )

Java applets are used to create _______________ applications

a) b)
9 c c 1
Graphical User interactive

c) d)

Both a & b None of these

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 4/8
9/21/22, 7:54 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

_______ encapsulates a semantics-free window.

a) b)
10 c c 1
Frame Panel

c) d)

Canvas None

Add instance of the desired control to the window by calling


____ method, defined by ____ class.

a) b)
11 a a 1
add() , Container add() , Component

c) d)

cddTo() , Container addTo(), Component

A push button is an active control that has a _____________


appearance

a) b)
12 b c 0
One dimensional Two dimensional

c) d)

Three dimensional None of these

The AWT container is an instance of the ___________ class


which holds various components and other containers

a) b)
13 b b 1
Graphics Container

c) d)

Eventobj None of these

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 5/8
9/21/22, 7:54 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

You can remove all controls by calling method.

a) b)
14 d d 1
remove() removeFrom()

c) d)

Remove() removeAll( )

Which method is defined by the ItemListener interface?

a) b)

15 actionPerformed() ActionPerformed() c c 1

c)
d)
itemStateChanged()
ItemstateChanged()

In which of the following the checkbox will be set.

a)
b)
Checkbox Win98 = new
Checkbox("Windows 98/XP", Checkbox Win98 = new
cbg, true); Checkbox("Windows 98/XP",
cbg, false);
16 c b 0

c)
d)
Checkbox Win98 = new
Checkbox("Windows 98/XP", Checkbox Win98 = new
true); Checkbox("Windows 98/XP",
true);

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 6/8
9/21/22, 7:54 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

Choose the correct:

a) b)

public class CheckboxDemo public class CheckboxDemo


implement Applet extend extends Applet implements
17 ItemListener ItemListener b b 1

c) d)
public class CheckboxDemo public class CheckboxDemo
implements Applet extends extend Applet implement
ItemListener ItemListener

The AWT classes can be roughly categorized into the following


groups:

a) b)
18 d d 1
GUI Components Layouts

c) d)

Event Handlers All of these

Which class is used to create a pop-up list of items from which the
user may choose.

a) b)
19 a a 1
Choice List

c)
d)
Checkbox
CheckboxGroup

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 7/8
9/21/22, 7:54 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

Arranges the components as a deck of cards such that only one


component is visible at a time

a) b)
20 b b 1
BorderLayout CardLayout

c) d)

GridLayout FlowLayout

Total Marks : 20

Obtained : 17

Student Signature _____________________________

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 8/8

You might also like