0% found this document useful (0 votes)
11 views3 pages

Wa0001.

The document outlines the evaluation criteria and components for a lab examination in Object-Oriented Programming with Java, totaling 50 marks. It includes a list of programming tasks, such as creating games, managing arrays, implementing classes, and developing multithreaded applications. Each task is designed to assess various programming skills and concepts in Java.

Uploaded by

nitinkahar366
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)
11 views3 pages

Wa0001.

The document outlines the evaluation criteria and components for a lab examination in Object-Oriented Programming with Java, totaling 50 marks. It includes a list of programming tasks, such as creating games, managing arrays, implementing classes, and developing multithreaded applications. Each task is designed to assess various programming skills and concepts in Java.

Uploaded by

nitinkahar366
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/ 3

OBJECT ORIENTED PROGRAMMING WITH JAVA Lab Examination

Evaluation

Evaluation Evaluation Criteria Marks


Component

Program 1 Write up 05

Execution 10

Program 2 Write up 05

Execution 10

Record and 20
conduction

Total 50

Part-A

Q.No Question Description CO

1 Build a program called “GuessMyNumber”. The computer will generate a


random number between 1 and 10. The user types in a number and the computer
replies “lower” if the random number is lower than the guess, “higher” if the
random number is higher , and “correct!” if the guess is correct. The player can
continue guessing until the guess is right.

2 Write a java program to create two separate arrays of integers. Elements of both
the arrays shall be read from keyboard input. Program should display “Arrays are
symmetrical” if both the arrays contain equal numbers of even and odd numbers.

3 Create a Java class called Student with the following details as private instance
variables
within it. USN
Name
Branch
Phone
Write a Java program to create n number Student objects and print the USN, Name,
Branch, and Phone of these objects with suitable headings.

4 Design a super class called Staff with details as StaffId, Name, Phone, Salary. Extend
this class by writing three subclasses namely Teaching (domain, publications), Tech-
nical (skills), and Contract (period). Write a Java program to read and display at least
3 staff objects of all three categories.

5 Develop a java application to implement distance converter (meter to KM, miles to


KM and vice versa), time converter (hours to minutes, seconds and vice versa) using
packages.

6 Write a program to generate the resume. Create 2 Java classes Teacher (data: personal
information, qualification, experience, achievements) and Student (data: personal in-
formation, result, discipline) which implements the java interface Resume with the
method biodata().

7 Write a Java program to read n number of integers into an array. Raise an appropriate
exception
(ArithmeticException,InputMismatchException,ArrayOutOfBoundsExcception)whil
e performing following operations;a) Dividing each element by the smallest element
in an array. b) reading elements from the keyboard c) accessing the element from the
index specified by the keyboard entry.Concept of exception handling using multiple
catch blocks to be used in this scenario.

8 Write a program to count the number of capital letters, display the position of each
capital letter , no; of digits and no: of occurrences of each vowel in a user entered
string via keyboard.

9 Write a program that will count the number of characters, words, and lines in a file.
Words are separated by a white-space character. Your program should prompt the
user to enter a filename.

PART -B
10 Write a Java program that implements a multithreaded application that has
three threads. First thread generates a random integer for every 1 second; second
thread computes the square of the number and prints; third thread will print the value
the cube of the number.

11 Develop a multithreaded java program to demonstrate synchronization of a method.


The method is going to print the message passed by three child thread instances by
embedding square braces onto it. e.g [Message].The messages “Learn”, “Java”,
“Programming” are passed the method by three instances of child threads
respectively. Show the possible outputs with and without synchronization of method.

12 Write a java program that reads a file name from the user, displays information about
it to demonstrate following methods of class File.
canRead()
canWrite()
exists()
isFile()
length()
isDirectory()
list()

13 Develop a java program to perform following operations on java Collection class


ArrayList to hold String objects. In an ArrayList object, program should support
creating a new array list,to insert an element, to retrieve an element,to update a
specific array element,to remove an element,to search an element,to print all the
elements and to sort the array list.

14 Develop a java program to perform following operations on java Collection class


LinkedList to hold String objects.In a LinkedList object program should support
creating a new LinkedList ,to append the specified element to the end, to retrieve an
element,to remove an element,to search an element and to print all the elements.

15 Write a Swing program to create a frame window and three text fields to input three
floating point numbers from the user and display sum, average and largest of these
three numbers in a dialog box.

16 Create a Swing that has a ComboBox to select the city, Text box to enter the name,
phone number. Radio button to choose the gender and check box to choose hobbies.
Create an alert to display the selections made by the user.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy