Java Minor Assignment 2 (B.Sc. III Sem) PDF
Document Details
Uploaded by AlluringReal360
null
Tags
Summary
This is a Java programming assignment for a B.Sc. III Semester Java course. The assignment covers a range of topics, including arrays, strings, simple bank account system, exception handling, class hierarchies, and creating packages.
Full Transcript
B.Sc III Semester Assignment II (Java Minor) S.No. Date Program Remark 1 Write a program to find the sum and average of elements in an array. Then, find the maximum and minimum values in t...
B.Sc III Semester Assignment II (Java Minor) S.No. Date Program Remark 1 Write a program to find the sum and average of elements in an array. Then, find the maximum and minimum values in the array. 2 Write a Java program to generate the Fibonacci sequence up to a given number. 3 Write a program to reverse a string without using any built-in reverse functions. 4 Write a program to count how many times a specific character appears in a string entered by the user. 5 Create a Java program that simulates a simple bank account system. The program should support functionalities like deposit, withdraw, check balance, and display transaction history. 6 Create a simple class hierarchy with classes like Animal, Dog, and Cat. Implement polymorphism by overriding the sound() method in each subclass. 7 Write a Java program that demonstrates exception handling by dividing two numbers. Handle divide-by-zero exceptions, and ensure that the user is prompted until a valid input is provided. 8 Create an interface Shape with methods like area() and perimeter(). Then create two classes, Circle and Rectangle, that implement the Shape interface. Additionally, create an abstract class Vehicle and implement concrete classes like Car and Bike. 9 WAP to create an interface date with variables day, month,year& function display() & create another interface time with variables hour,minutes,seconds & a function display().Now create a class named TimeDate it will inherit both the interfaces which will display time and date. 10 Create a class Counter that uses the static keyword to count how many times an object of the class has been created. 11 Write a program to demonstrate constructor overloading by creating a class Student with multiple constructors. 12 WAP to demonstrate to method overloading. 13 WAP to create package called employee and import this package. 14 WAP to design a class shape using abstract methods and classes. 15 WAP that showcases the usage of multiple catch blocks to handle different types of exceptions (e.g., ArithmeticException, NullPointerException). Last Date of Submission : 3rd Week of November