Skip to content

Latest commit

 

History

History
85 lines (55 loc) · 2.77 KB

README.md

File metadata and controls

85 lines (55 loc) · 2.77 KB

Java Practice Repository

This repository serves as a resource for practicing Java programming concepts. It contains solutions to various programming exercises and labs.

Contents

LAB 1

  1. a. Java Program to print the sum of N natural numbers using the Scanner class.
  2. b. Java program to print the area of a triangle.
  3. c. Java Program to check if a number is prime or not.
  4. d. Java program that takes a number as input from the user and prints the corresponding day of the week (using Switch statement).

LAB 2 Replica

  1. a. Java program to print the sum of odd natural numbers using the Scanner class.
  2. b. Program to print the area of a rectangle.
  3. c. Java Program to check if a number is odd or even.
  4. d. Java program that takes a number as input from the user and prints the corresponding month of the year (using Switch statement).

LAB 3

  1. a. Implementation of a Car class.
  2. b. Implementation of a Person class.
  3. c. Implementation of a Rectangle class.

LAB 3 Replica

  1. a. Design of a Book class.
  2. b. Implementation of a Person class.
  3. c. Creation of a Circle class.

LAB 4

  1. a. Implementation of a Student class.
  2. b. Creation of a Dog class.

LAB 5

  1. a. Program to create a class Student and display data.
  2. b. Java program to determine the total marks and percentage of a student.

LAB 5 Replica

  1. a. Program to create a class Book and display data.
  2. b. Java program to compute the gross salary of an employee and associated income tax.

LAB 6

  1. a. Java program demonstrating the use of an array of objects.
  2. b. Creation of a Book class.
  3. c. Implementation of a class Student with data and a printData method.

LAB 6 Replica

  1. a. Creation of a Product class.
  2. b. Development of a Movie class.
  3. c. Writing a Java Program to create a class Employee.

LAB 7

  1. a. Implementation of Animal, Dog, and Cat classes.
  2. b. Java program featuring Shape, Circle, and Rectangle classes.
  3. c. Development of a Java program illustrating the usage of the super keyword.

LAB 8

  1. a. Java program to illustrate the concept of abstract classes and subclasses.
  2. b. Development of a Java program to manage employee records.

LAB 8 Replica

  1. a. Java program to simulate a basic vehicle management system.
  2. b. Development of a Java program to simulate a bank account management system.

LAB 9

  1. a. Program to work with directories and packages in Java.
  2. b. Program to handle exceptions and custom exceptions.

LAB 9 Replica

  1. a. Program that calls a method throwing an exception in a loop.
  2. b. Java program that reads an integer and handles invalid input.

Best of Luck....