0% found this document useful (0 votes)
15 views

VL2023240104494 Ast06

The document contains instructions for a Java programming assignment that includes 10 programming problems. The problems cover topics like arrays, linked lists, inheritance, exceptions, and strings. Students are asked to write Java programs that: 1) find the maximum and minimum difference between all pairs of elements in an integer array, 2) create a menu-driven directory with personal information, 3) create abstract classes for animals with subclasses for cats and dogs, and more. The assignment is for a fall semester Java programming course with a submission deadline of November 10, 2023.

Uploaded by

samim.khan2022
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 views

VL2023240104494 Ast06

The document contains instructions for a Java programming assignment that includes 10 programming problems. The problems cover topics like arrays, linked lists, inheritance, exceptions, and strings. Students are asked to write Java programs that: 1) find the maximum and minimum difference between all pairs of elements in an integer array, 2) create a menu-driven directory with personal information, 3) create abstract classes for animals with subclasses for cats and dogs, and more. The assignment is for a fall semester Java programming course with a submission deadline of November 10, 2023.

Uploaded by

samim.khan2022
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/ 2

SCHOOL OF COMPUTER SCIENCE AND ENGINEERING

B.Tech, Fall Semester , 2023-24

Course Code : BCSE103E Submission Date: 10-11-23

Course Name : Java Programming Max. Marks :

Faculty-In-
Charge: : Dr. N. Balaji Slot:

1. Consider an integer array, the number of elements in which is determined by the user. The elements
are also taken as input from the user. Write a program to find those pair of elements that has the
maximum and minimum difference among all element pairs.

2. Write a program to create a directory that contains the following information.


(a)Name of a person
(b) Address
(c) Telephone Number (if available with STD code)
(d) Mobile Number (if available)
(e) Head of the family
(f) Unique ID No.
The program will support the following menu based activities:
(a) Create a database entry (The Unique ID number must be unique for every entry, the telephone
numbers of two or more persons can be same if and only if the head of family is same)
(b) Edit an entry (Must be identified by only the Unique ID number)
(c) Search by keyword (Any keyword may not be complete; even if the keyword matches partially with any
field, the corresponding information must be displayed)

3. Create an abstract class 'Animals' with two abstract methods 'cats' and 'dogs'. Now create a class
'Cats' with a method 'cats' which prints "Cats meow" and a class 'Dogs' with a method 'dogs' which prints
"Dogs bark", both inheriting the class 'Animals'. Now create an object for each of the subclasses and call
their respective methods.

4. Write a Java program to append the specified element to the end of a linked list.

5. Write a Java program to get the first and last occurrence of the specified elements in a linked list.

6. Write a Java program to store text file content line by line in an array.

7. Write a Java program to find the longest word in a text file.

8. Write a Java program to create an abstract class GeometricShape with abstract methods area()
and perimeter(). Create subclasses Triangle and Square that extend the GeometricShape class and
implement the respective methods to calculate the area and perimeter of each shape.
9. Write a Java program that reads a list of integers from the user and throws an exception if any
numbers are duplicates. (User Defined Exception)

10. Write a Java program to find the longest Palindromic Substring within a string.
Sample Output:
The given string is: thequickbrownfoxxofnworbquickthe
The longest palindrome substring in the given string is: brownfoxxofnworb
The length of the palindromic substring is: 16

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