Lecture 07 08 String Inheritance Relations
Lecture 07 08 String Inheritance Relations
Lecture 07 08 String Inheritance Relations
Class
What really
happens?
When an object is created using new, the system must allocate
enough memory to hold all its instance variables.
This includes any inherited instance variables
With the use of the extends keyword, the subclasses will be able to inherit all the
properties of the superclass except for the private properties of the superclass.
protected access
Intermediate level of protection between public and
private
protected members accessible by
superclass members
subclass members
Class members in the same package
Subclass access to superclass member
Keyword super and a dot (.)
Problems
sheet
Note: You are required to write the program in java using object oriented concept where a small functionality is required to be used as
member function of a class. Also write the abstract of classes.
You are required to create a database that has employee identification, employee name, fathers name, address,
1.
date of birth, designation, hourly payments rate and maximum payments that an employee can be paid in month
for 100 hours. You may use the array concept for storing the records of 100 employees.
You are required to write classes for student details (name, registration number, fathers name), address
2.
(current address, permanent address, contact number, email Id) using inheritance concept where address is
child class.
Further you are required to extend the problem no 2 for addition of the classes, using inherit concept, Courses
3.
Registered (Course name, credit, course number, associated teachers), Academic records( name of degree, year
of passing, university/board, percentage marks), Payments Details ( bank name, transaction id, amount, date).
You are required to create array of string of 10 elements. Further sort the array in ascending order. The string
4.
of string in sorted order where sorted array does not have duplicate words.
You are given a paragraph consisting continuous alphabets, Convert this para graph to tokens of fixed size.
6.
Store the tokens in array of string in sorted order where sorted array does not have duplicate words.
You are given a paragraph consisting continuous alphabets, Convert this para graph to tokens based on
7.
occurrence of particular characters. Store the tokens in array of string in sorted order where sorted array does
not have duplicate words.