0% found this document useful (0 votes)
15 views82 pages

CTOOD Lab Manual

Uploaded by

wizardlyeuclid7
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)
15 views82 pages

CTOOD Lab Manual

Uploaded by

wizardlyeuclid7
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/ 82

Saturday, July 27, 2024

2024
Koneru
Lakshmaiah
Education
Foundation
Artificial
Intelligence &
Data Science

[ COMPUTATIONAL THINKING FOR OBJECT ORIENTED DESIGN ]


23SC1203O
-------------------------------------------------------------------------------------------------------------------------------

Department of AI&DS
Lab Manual
Computational Thinking for
Object Oriented Design
(23SC1203O)
2022-23 Odd Semester

Roll Number:
Name of the Student:
Lab Course Name:
Lab Course Code:
Year /Semester of Study:

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

S.no Table of Content

Introduction to Java Programming lab, Implement Java Program to


1.
Count Number of Digits in an Integer using while loop

Implement Java Program to Check Whether an Alphabet is Vowel or


2.
Consonant
3. Write a Java Program to Display Alternate Prime Numbers
Implement Java Program to Swap Two Numbers Using Bitwise
4.
Operator
Implement Java Program to sort the elements of an array in ascending
5.
order
Write a Java Program to Check if An Array Contains a Given Value or
6. not

7. Implement Java Program to read and write a text into a file

8. Implement Java Program to Append Text to an Existing File

Implement Java program to implement Exception Handling using


9.
finally block
10. Create a Java Program to Implement User Defined Exception Handling
Java program to create Thread by implementing runnable thread
11.
interface.
12. Implement Java Program to implement Thread Synchronization
Implementation of Java Program for user defined class objects in Java
13.
Array List
Introduction to AWT in Java
14.
15. Design Labels, Buttons, Textboxes using AWT Components

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

LAB CONTINUOUS EVALUATION SHEET

In-Lab
Post Viva
Experiment Pre- Total Faculty
S.NO Date Lab Voce
Name Lab (5M) (50M) Signature
(5M) (5M)

LOGIC EXECUTION RESULT ANALYSIS


(10M) (10M) (10M) (5M)

Introduction to
1 Java
Programming lab

Implement
Java Program to
Check Whether
2 an Alphabet is
Vowel or
Consonant
Write a Java
Program to
3 Display
Alternate Prime
Numbers
Implement
Java Program to
4 Swap Two
Numbers Using
Bitwise Operator
Implement Java
Program to sort
5 the elements of
an array in
ascending order
Write a Java
Program to
Check if An
6 Array Contains a
Given Value or
not
Implement
Java Program to
7 read and write a
text into a file

Implement
Java Program to
8 Append Text to
an Existing File

Implement Java
program to
9 implement
Exception
Handling using

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
finally block

LAB CONTINUOUS EVALUATION SHEET

In-Lab
Post Viva
Pre- Total Faculty
S.NO Date Experiment Name Lab Voce
Lab (5M) (50M) Signature
(5M) (5M)

LOGIC EXECUTION RESULT ANALYSIS


(10M) (10M) (10M) (5M)

Create a Java Program to


10 Implement User Defined
Exception Handling

Java program to create


11 Thread by implementing
runnable thread interface.
Implement Java Program
12 to implement Thread
Synchronization
Implementation of Java
Program for user defined
13 class objects in Java
Array List

Introduction to AWT in
14 Java

Design Labels, Buttons,


15 Textboxes using AWT
Components

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-1

Date: DD/MM/YYYY

Outcome: Students are able to identify and install the required software’s to work on Java
programming practical’s and understand the control statements and able to write java
program using control statements.

Pre Lab:

By searching Google find out what are the different tools for implementing java Programs.

1. Difference between JDK, JRE and JVM.

2. Is Java a WORA?

3. Is Java a pure/fully object oriented language?

4. What types of loops does Java support?

5. How will you exit anticipatedly from a loop?

6. Does returning a value from the loop body break the loop?

7. Difference between break and continue statements.

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

8. Which is considered as a selection statement?

9. What is the difference between an Unlabeled and a Labeled break Statement?

10. What happens when we forget to put a break Statement in a case Clause of a switch?

11. When you use a return statement in Java, where does the control go?

12. How do you write an infinite loop using the for statement?

13. How do you write an infinite loop using the while statement?

14. Can we write switch case using a double variable?

15. Difference between dead code and unreachable code in Java.

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

EXP1: Implement Java Program to Count Number of Digits in an Integer using while loop

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

Practice the more problems on loops.

Procedure:

WEEK-2

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Date: DD/MM/YYYY

Outcome: Students are able to identify and understand the working of conditional
statements in Java.

Pre Lab:

1) Why garbage collection is required in Java?

2) What is classloader?

3) What are the types of classloader?

4) Describe the if-then and if-then-else Statements.

5) What Types of Expressions Can Be Used as Conditions?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

6) When Is It Preferable to Use a Switch Over an If-Then-Else Statement and Vice Versa?

7) What are the different types of variables in Java?

8) What is the default value of local variables or method variables?

9) What are the primitive data types in Java?

10) Can you compare a Boolean with an int variable in Java?

11) What are the different modifiers and its access levels?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

12) What are non-access modifiers in java?

13) What is the data type of System.out?

14) What is the base class of all classes?

15) Could a Java class file exists even without filename and only extension(.java)?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

EXP2: Implement Java Program to Check Whether an Alphabet is Vowel or Consonant

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

Practice more real world problems based on vowels and consonants.

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Solution:

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-3

Date: DD/MM/YYYY

Outcome: Students are able to identify the various operators in Java and understands the
working of operators in Java.

Pre Lab:

1) What is an Operator in Java?

2) What are the types of operators based on the number of operands?

3) What is the difference between the >> and >>> operators?

4) What is the difference between the Boolean & operator and the && operator?

5) What is named operator in Java?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

6) What are the priority levels of arithmetic operation in Java?

7) What is a conditional (ternary) operator in Java?

8) What is a Unary operator in Java?

9) Explain Pre decrementation (Prefix) and Post decrementation (Postfix).

10) To invert the value of a Boolean, which operator would you use?

11) What is Serialization in Java?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

12) Explain De-serialization in Java?

13) Why Java does not support operator overloading?

14) Can we run a Java program without main method?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

EXP3:

Write a Java Program to Display Alternate Prime Numbers

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

Practice the above experiment one more time in your home.

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Solution:

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-4

Date: DD/MM/YYYY

Outcome: Students are able to identify and understands the bitwise operator.

Pre Lab:

1) What is Bitwise operator in Java?

2) What is Expression in Java?

3) What are Logical operators in Java?

4) How many types of logical operators are supported by Java?

5) What are Bitwise Logical Operators?

6) What are the Type Conversions available in Java language?

7) If relational operators are present in an expression, what type of other operators may
be used?

8) What is the name of << bitwise operator in Java?

9) What is this >> bitwise operator in Java?

10) What is this >>> bitwise operator in Java?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

11) Left Shift (<<) in Java is equivalent to?

12) Right Shift >> in Java is equivalent to?

13) What is the output of a Bitwise AND (&) operation if both the inputs/operands are1s?

14) What is the output of a Bitwise OR (|) operation if both the inputs are 1s?

15) What is the output of a Bitwise AND (&) operation if one of the inputs/operands is 0?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

EXP4:

Implement Java Program to Swap Two Numbers using Bitwise Operator

Solution:

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

Practice the above experiment one more time in your home.

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-5

Date: DD/MM/YYYY

Outcome: Students are able to understand array concept and write Java program using
array concept.

Pre Lab:

1) Is arrays are considered as primitive data types?

2) What is the index of the first element in an array?

3) Can we declare array size as negative?

4) What is the default value of the array in Java?

5) When ArrayIndexOutOfBoundsException occurs?

6) How to check an array contains values or not?

7) Define an Array? What are the types?

8) What are the advantages of arrays?

9) What are the disadvantages of arrays?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

10) Assuming int is of 4bytes, what is the size of int arr[15];?

11) What are “jagged” arrays in java?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

EXP5:

Implement a Java Program to sort the elements of an array in ascending order

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

Practice the above experiment one more time in your home.

WEEK-6

Date: DD/MM/YYYY

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Outcome: Students are able to understand array and develops application of array.

Pre Lab:

1) Where is the memory allocated for arrays in Java?

2) Can you tell me the class name of an array in Java?

3) What is the two-dimensional array?

4) Do we have 3-dimensional arrays in Java?

5) Can we make array volatile in Java?

6) What is Traversal in an Array?

7) Can we change the size of an array at run time?

8) Can you declare an array without assigning the size of an array?

9) When will we get ArrayStoreException?

10) Can we add or delete an element after assigning an array?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
In Lab:

Exp-6

Write a Java Program to Check if an Array Contains a Given Value or not

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

 Practice more real world applications on arrays.

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-7

Date: DD/MM/YYYY

Outcome: Students are able to understands and implements the file operation using Java .

Pre Lab:
1) Which class is used to create a directory in Java?

2) What is the difference between InputStream and OutputStream in Java?

3) What is the difference between BufferedReader and FileReader in Java?

4) What is the use of the PrintStream class in Java IO?

5) What value is returned by read() method is end of file (EOF) is encountered?

6) Mention the methods is used to write() into a file?

7) Mention the methods which are used to read in from file?

8) What is the use of the PrintStream class in Java IO?

9) Which method of FileReader class is used to read characters from a file?

10) Which class is used to read characters in a file?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

Exp 7: Implement Java Program to read and write a text into a file

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

1) Practice more real world applications on file modifications.

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-8

Date: DD/MM/YYYY

Outcome: Students are able to understand the File operation.

Pre Lab:

1) What is the default encoding for an OutputStreamWriter?

2) Which is used to perform all input & output operations in Java?

3) What are the classes used by Byte streams for input and output operation?

4) What are the classes used by character streams for input and output operations?

5) Which class is used to read from byte array?

6) What exception is thrown by read() method?

7) Which method is used to read a string from the inputstream?

8) Which class contains the methods print() & println()?

9) What class is used by character streams output operations?

10) Which class is used to read characters and strings in Java from console?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

Exp 8: Implement Java Program to Append Text to an Existing File

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

 Practice more real world applications on file modifications.

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-9

Date: DD/MM/YYYY

Outcome: Students are able to understand Exception Handling and implements it.

Pre Lab:

1. What is an exception?

2. How the exceptions are handled in Java?

3. What is the difference between error and exception in Java?

4. Can we keep other statements in between try, catch and finally blocks?

5. Can we write only try block without catch and finally blocks?

6. What is OutOfMemoryError in Java?

7. What are checked and unchecked exceptions in java?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

8. Does finally block get executed If either try or catch blocks are returning the control?

9. Can we throw an exception manually? If yes, how?

10. Can we keep the statements after finally block If the control is returning from the finally
block itself?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

Exp 9: Implement Java program to implement Exception Handling using finally block

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
Post Lab: Practice more real world applications on exception handling.

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-10

Date: DD/MM/YYYY

Outcome: Students are able to write basic PL/SQL functions.

Pre Lab:

1. Why do we need exception handling in Java?

2. What is ClassCastException in Java?

3. What is StackOverflowError in Java?

4. Can we override a super class method which is throwing an unchecked exception with
checked exception in the sub class?

5. Which class is the super class for all types of errors and exceptions in Java?

6. What is the use of printStackTrace() method?

7. What happens when an exception is thrown by the main method?

8. What is the difference between final, finally, and finalize in Java?

9. What is the difference between the throw and throws keyword in Java?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

10. Can exception handling resolve the exceptions?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

EXP 10: Create a Java Program to Implement User Defined Exception Handling

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

Practice some more user defined exception problem examples in your home

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-11

Date: DD/MM/YYYY

Outcome: Students are able to understand Thread concept and implements it.

Pre Lab:

1. What is Thread in Java?

2. What are the two ways of implementing thread in Java?

3. What's the difference between thread and process?

4. What's the difference between User thread and Daemon thread?

5. What are the wait() and sleep() methods?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

6. What’s the difference between notify() and notifyAll()?

7. Why wait(), notify(), and notifyAll() methods are present in Object class?

8. What is the start() and run() method of Thread class?

9. Explain thread pool?

10. What’s the purpose of the join() method?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

Exp: 11 Java program to create Thread by implementing runnable thread interface.

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

 Practice more real world applications on Thread by implementing runnable thread


interface.

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-12

Date: DD/MM/YYYY

Outcome: Students are able to understand the Thread Synchronization and implements it.

Pre Lab:

1. What is the synchronization process? Why use it?

2. How do threads communicate with each other?

3. Can two threads execute two methods (static and non-static concurrently)?

4. What is thread starvation?

5. What is Livelock? What happens when it occurs?

6. Can you start a thread twice?

7. What do you mean by inter-thread communication?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

8. Explain thread priority.

9. What do you mean by the ThreadLocal variable in Java?

10. Is it possible to call the run() method directly to start a new thread?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

In Lab:

EXP 12: Implement Java Program to implement Thread Synchronization

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

Post Lab:

Practice more triggers from real world applications .

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-13

Date: DD/MM/YYYY

Outcome: Students are able to create and manipulate user-defined class objects

Pre Lab:

1) What is the purpose of the ArrayList class in Java?

2) What is an ArrayList in Java, and how is it different from an array?

3) How do you create an ArrayList in Java? Provide a code example.

4) How do you add elements to an ArrayList? Provide a code example.

5) What happens when you try to access an index that is out of bounds in an ArrayList?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

6) How can you iterate through an ArrayList using different types of loops? Provide code examples for
a for-loop, a for-each loop, and an iterator.

7) How do you check if an ArrayList contains a specific element? Provide a code example.

8) What are the time complexities of the main operations (add, get, remove) in an ArrayList?

9) Explain the difference between ArrayList and LinkedList. When would you prefer one over the
other?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
In Lab:

EXP 13: Implementation of Java Program for user defined class objects in Java Array List

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
Post Lab:

Practice more user defined class objects in Java Array List from real world applications.

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-14

Date: DD/MM/YYYY

Outcome: Students are able to create AWT components.

Pre Lab:

1. What is AWT in Java?

2. What are some common components provided by AWT?

3. How do you handle events in AWT?

4. What is the purpose of LayoutManager in AWT?

5. Explain the concept of double buffering in AWT?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
6. How do you create a custom component in AWT?

7. What is the purpose of the Toolkit class in AWT?

8. What is an Adapter class in AWT, and why is it useful?

9. Explain the concept of event delegation in AWT.

10) What is the purpose of the Graphics2D class, and how does it differ from the Graphics class?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
In Lab:

EXP 14: Introduction to AWT in Java

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
Post Lab:

Practice more real world applications on AWT.

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

WEEK-15

Date: DD/MM/YYYY

Outcome: Students are able to Design Labels, Buttons, Textboxes using AWT Components

Pre Lab:

1. What is the purpose of the Label component in AWT?

2. How do you create a Button in AWT and add it to a frame? Provide a code example.

3. Describe the TextField component and its common usage.

4. How can you add tooltips to components in AWT?

5. What method is used to set the maximum number of characters a TextField can accept?

6. How do you set the text alignment for a Label in AWT?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
7. Explain how to add a tooltip to a Button in AWT.

8. How can you make a TextField read-only in AWT?

9. How can you implement password masking in a TextField in AWT?

10. What is the role of the ActionCommand property in AWT event handling?

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
In Lab:

EXP 15: Design Labels, Buttons, Textboxes using AWT Components

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
Post Lab:

Design a user registration form using Java AWT components, including labels, buttons, and
textboxes, to collect and display user information such as name, email, and password, ensuring
proper layout and event handling for form submission.

Marks Date SIGN Comments if any by the Evaluator

Pre-Lab (10M)

In-Lab(30M)

Post-Lab(10M)

TOTAL MARKS
(50M)

--------------------------------------------------------------------------------------------------------------------------------------------------------

You might also like