CSL203 - LAB - QPPDF
CSL203 - LAB - QPPDF
Define the single inheritance hierarchy Student -> Marks with data - regno, mark1 &
mark2and methods to create and display the data. Define an interface with members to define
and print sports weightage marks. Define a subclass Result with multiple inheritance which
extends Marks class and implements the interface sports. Later, create a Result object of a
student and print his/her mark list including total mark.Implement this inheritance
hierarchy in the main() method.
2.Write a Java program to create a method that takes an integer as a parameter and throws an
exception if the number is odd other wise write the number into a file
3. Write a java program to Read a sentence and write the palindrome words in the sentence in to a
file.
4.Write a Java program that reads a line of integers, and write the even numbers into a file named
Even and Write the odd numbers into a file named Odd.(Use String Tokenizer)
1.Define the single inheritance hierarchy Student -> Marks with data - regno, mark1 &
mark2and methods to create and display the data. Define an interface with members to define
and print sports weightage marks. Define a subclass Result with multiple inheritance which
extends Marks class and implements the interface sports. Later, create a Result object of a
student and print his/her mark list including total mark.Implement this inheritance
hierarchy in the main() method.
2.Write a Java program to create a method that takes an integer as a parameter and throws an
exception if the number is odd other wise write the number into a file
3. Write a java program to Read a sentence and write the palindrome words in the sentence in to a
file.
4.Write a Java program that reads a line of integers, and write the even numbers into a file named
Even and Write the odd numbers into a file named Odd.(Use String Tokenizer)