Skip to content

tgpaul/JavaS3Lab1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

JavaS3Lab

KTU Semester 3 Java Lab Cycle 1

Program Contents :-

  1. Print "Hello World"
  2. Add two numbers
  3. Check if given number is odd or even
  4. Check if given number is prime or nah
  5. Find sum of first 'n' natural numbers
  6. Find the factors of a given number
  7. Print The Fibonacci Series
  8. Find factorials of first 'n' numbers
  9. Check if given number is a Palindrome or not
  10. Check to see if a given number is an Armstrong number

KTU Semester 3 Java Lab Cycle 2

Program Contents :-

  1. Write a Java class having overloaded methods to calculate area of rectangle and circle.

  2. Define a class Queue for representing a queue data structure. The class must define a default constructor, a parameterized constructor and functions for enqueue, de-queue and display operations. Write a Java program to implement this.

  3. Write a program to print the area and perimeter of a triangle having sides of 3, 4 and 5 units by creating a class named 'Triangle' without any parameter in its constructor.

  4. Write a program to print the area of a rectangle by creating a class named 'Area' taking the values of its length and breadth as parameters of its constructor and having a method named 'returnArea' which returns the area of the rectangle. Length and breadth of rectangle are entered through keyboard.

  5. Create a class with a method that prints "This is parent class" and its subclass with another method that prints "This is child class". Now, create an object for each of the class and call

         1 - method of parent class by object of parent class
         
         2 - method of child class by object of child class
         
         3 - method of parent class by object of child class
    

About

CEC Semester 3 Java Lab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages