0% found this document useful (0 votes)
513 views11 pages

Home Work Day 1

This document provides details about day 1 and day 2 topics for a Java class. Day 1 covers Java introduction, classes, methods, objects, packages and encapsulation. It also includes 11 theory questions and 10 programming questions related to these topics. Day 2 covers inheritance, access specifiers, data types, the Scanner class and includes 12 theory questions and 9 programming questions. The programming questions involve creating classes with methods and calling them to demonstrate understanding of core Java concepts.

Uploaded by

jayasree s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
513 views11 pages

Home Work Day 1

This document provides details about day 1 and day 2 topics for a Java class. Day 1 covers Java introduction, classes, methods, objects, packages and encapsulation. It also includes 11 theory questions and 10 programming questions related to these topics. Day 2 covers inheritance, access specifiers, data types, the Scanner class and includes 12 theory questions and 9 programming questions. The programming questions involve creating classes with methods and calling them to demonstrate understanding of core Java concepts.

Uploaded by

jayasree s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 11

Day1_Class,method,object

DAY1:
-------
1.Java Introduction
2.Class,Method,Object
3.Same package and Different package
4.Encapsulation

QUESTIONS(Theory):
------------
1.What is platform independent?
2.What is open source?
3.Difference between JDK,JRE,JVM?
4.why we go for java?
5.What is the latest version of JDK and which version you are using in your
project?
6.What is the latest version of eclispe and which version you are using in your
project?
7.Difference between c++ and java?
8.Features of java?
9.What type of tool you are using in your project to execute java?
10.Difference between class,method,object?
11.Where object stores?
12.How to access one class method in to another package in different package?
13.What is encapsulation?
14.Coding standard to create project,class,method,package and object ?
15.What gives Java it's "write once and run anywhere" nature?

QUESTIONS(Programs):
-----------------
QUESTION 1:
------------
Project :EmployeeDetails
Package :org.emp
Class :Employee
Methods :empId(),empName(),empDob(),empPhone(),empEmail(),empAddress()

Description:
Create an object for employee class and call above methods also follow the all
coding standards.

QUESTION 2:
-------------
Project :GreensAddress
Package :org.add
Class :GreensTech

Methods :greensOmr(),greensAdayar(),greensTambaram(),greensVelacherry(),greensAnn
aNagar()

Description:
Create an object for GreensTech class and call above methods also follow the all
coding standards.

QUESTION 3:
------------
Project :CompanyDetails
Package :org.company
Class :CompanyInfo
Methods :companyName(),companyId(),companyAddress()

Description:
Create an object for CompanyDetails class and call above methods also follow the
all coding standards.

QUESTION 4:
-----------
Project :MyPhone
Package :org.phone
Class :PhoneInfo
Methods :phoneName(),phoneMieiNum(),Camera(),storage(),osName()

Description:
Create an object for PhoneInfo class and call above methods also follow the all
coding standards.

QUESTION 5:
------------
Project :LanguageDetails
Package :org.lang

Class :LanguageInfo
Methods :tamilLanguage(),englishLanguage(),hindiLanguage()

Class :StateDetails
Methods :southIndia(),northIndia()

Description:
Create an object for LanguageInfo and StateDetails inside the StateDetails class
and call both classes methods also follow the all coding standards.

QUESTION 6:
-----------
Project :EmployeeInformation
Package :org.emp
Class :Employee
Methods :empName()

Package :org.company
Class :Company
Methods :companyName()

Package :org.client
Class :Client
Methods :clientName()

Package :org.project
Class :Project
Methods :projectName()

Description:
Create an object for all 4 classes inside the Employee class and call all classes
methods also follow the all coding standards.

QUESTION 7:
-------------
Project :PhoneDetails
Package :org.phone
Class :ExternalStorage
Methods :size()

Class :InternalStorage
Methods :processorName(),ramSize()

Description:
Create an object for ExternalStorage and InternalStorage inside the InternalStorage
class and call both classes methods also follow the all coding standards.

QUESTION 8:
------------
Project :CollegeInformation
Package :org.college
Class :College
Methods :collegeName(),collegeCode(),collegeRank()

Class :Student
Methods :studentName(),studentDept(),studentId()

Class :Hostel
Methods :hostelName()

Class :Dept
Methods :deptName()

Description:
Create an object for all 4 classes inside the College class and call all classes
methods also follow the all coding standards.

QUESTION 9:
------------
Project :VehicleInformation
Package :org.allvehicle
Class :Vehicle
Methods :VehicleNecessery()

Package :org.twowheeler
Class :TwoWheller
Methods :bike(),cycle()

Package :org.threewheeler
Class :ThreeWheeler
Methods :Auto()

Package :org.fourwheeler
Class :FourWheeler
Methods :car(),bus(),lorry()

Description:
Create an object for all 4 classes inside the Vehicle class and call all classes
methods also follow the all coding standards.

QUESTION 10:
--------------
Project :TransportInformation
Package :org.transport
Class :Transport
Methods :TransportForm

Package :org.road
Class :Road
Methods :bike(),cycle(),bus(),car()

Package :org.air
Class :Air
Methods :aeroPlane(),heliCopter()

Package :org.water
Class :Water
Methods :boat(),ship()

Description:
Create an object for all 4 classes inside the Transport class and call all classes
methods also follow the all coding standards.

QUESTION 11:
--------------
Project :NetworkInformation
Package :org.network
Class :Wifi
Methods :wifiName()

Class :MobileData
Methods :dataName()

Class :Lan
Methods :lanName()

Class :Wireless
Methods :modamName()

Description:
Create an object for all 4 classes inside the Wifi class and call all classes
methods also follow the all coding standards.

Day2_Inheritance,Scanner,Datatype,access specifier
DAY2:
-----
1.Inheritance
2.Access specifiers
3.Data types
4.Scanner class

QUESTIONS(Theory)
--------------
1.What is mean by inheritance?
2.Types of inheritance and explain all types?
3.What is mean by multiple inheritance,why java won't support multiple inheritance?
4.Difference between hybrid and hierachical inheritance?
5.What is the use of access specifier and types?
6.Difference between public and protected?
7.What is mean by Wrapper class?
8.What is default value of String?
9.What is difference between primitive and non primitive datatypes?
10.What is default package in java?
11.What is the super class of all java class?
12.What is use of scanner class?
13.What are the different methods available in Scanner class?
14.Scanner class is under which package?
15.Difference between next() and nextLine()?

QUESTIONS(Programs)
--------------------
QUESTION 1:
------------
Description: Using Scanner class get the below details
empId
empName
empEmail
empPhoneno
empSalary
empGender
empCity

QUESTION 2:
-------------
Description: Using Scanner class get the below details
studentId
studentName
Mark1
Mark2
Mark3
Mark4
Mark5
:Find the total and average of marks

QUESTION 3:
------------
package name: org.all
Project name: LanguageDetails
Class name : Languageclass
Methods : alllanguage

package name: org.tamil


Project name: LanguageDetails
Class name : Tamil
Methods : tamillanguage

package name: org.english


Project name: LanguageDetails
Class name : English
Methods : englishlanguage

package name: org.telgu


Project name: LanguageDetails
Class name : Telgu
Methods : telgulanguage

Description:
create above 4 packages and call all your class methods into the Languageclass
using multilevel inheritance.

QUESTION 4:
------------
package name: org.india
Project name: SouthIndia
Class name : India
Methods : india

package name: org.tamilnadu


Project name: SouthIndia
Class name : TamiladuN
Methods : tamillanguage

package name: org.kerala


Project name: SouthIndia
Class name : kerala
Methods : malayalam

package name: org.andrapradesh


Project name: SouthIndia
Class name : AndhraPradesh
Methods : telugu

Description:
create above 4 packages and call all your class methods into the India using
multilevel inheritance.

QUESTION 5:
-------------
Project :CollegeInformation
Package :org.college
Class :College
Methods :collegeName(),collegeCode(),collegeRank()

Class :Student
Methods :studentName(),studentDept(),studentId()

Class :Hostel
Methods :HostelName()

Class :dept
Methods :deptName()

Description:
create above 4 class and call all your class methods into the Student using
multilevel inheritance.

QUESTION 6:
-----------
Project :COmputer
Class :Computer
Methods :computerModel()

Class :Desktop
Methods :desktopSize()

Description:
create above 2 class and call all your class methods into the Desktop using single
inheritance.

QUESTION 7:
-----------
Project :LanguageDetails
Package :org.lang
Class :LanguageInfo
Methods :tamilLanguage(),englishLanguage(),hindiLanguage()

Class :StateDetails
Methods :southIndia(),northIndia()

Description:
create above 2 class and call all your class methods into the LanguageInfo using
single inheritance.

QUESTION 8:
------------
Description: Using Scanner class get the below details
StudentId
StudentName
StudentEmail
StudentPhoneno
StudentDept
StudentGender
StudentCity

QUESTION 9:
------------
Project :BankDetails
Package :org.bank
Class :BankInfo
Methods :saving(),fixed()

Class :AxisBank
Methods :deposit()

Description:
create above 2 class and call all your class methods into the BankInfo using single
inheritance.

QUESTION 10:
-------------
Project :CompanyDetails
Package :org.company
Class :Company
Methods :companyName()

Package :org.client
Class :Client
Methods :clientName()

Description:
create above 2 packages and call all your class methods into the Comapany using
single inheritance.

QUESTION 11:
------------
Project :EducationInformation
Package :org.edu
Class :Education
Methods :ug(),pg()

Class :Arts
Methods :bsc(),bEd(),bA(),bBA()

Day3_Polymorphism,Abstraction

DAY3:
---------
1.Polymorphism
2.Abstraction

QUESTIONS(Theory)
---------------------
1.What is mean by polymorphism?
2.Difference between method overloading and method overriding?
3.What is mean by Abstraction?
4.Difference between Abstract class and interface?
5.What is mean by abstract method?
6.Can we create object for abstract class?
7.In interface,can we make method as static?
8.In interface,can we make method as final?
9.How will achieve multiple inheritance in java,write a code for that?

QUESTIONS(Programs)
--------------------
QUESTION 1:
------------
Find the answer for below questions and tell whether it is possible or not?
I implements I
I implements C
I implements A
I extends I
I extends C
I extends A

C implements I
C implements C
C implements A
C extends I
C extends C
C extends A

A implements I
A implements C
A implements A
A extends I
A extends C
A extends A

A-abstract class
C-class
I- interface
QUESTION 2:
------------
Project :EmployeeDetails
Package :org.emp
Class :Employee
Methods :empId()

Description
You have to overload the method empId() based on different datatype in arguments.

QUESTION 3:
------------
Project :CompanyDetails
Package :org.company
Class :CompanyInfo
Methods :companyName()

Description
You have to overload the method companyName() based on different Number of
arguments.

QUESTION 4:
------------
Project :MyPhone
Package :org.phone
Class :Phone
Methods :phoneInfo()

Description
You have to overload the method phoneInfo() based on different datatype order in
arguments.

QUESTION 5:
-----------
Project :GreensAddress
Package :org.add
Class :GreensTech
Methods :greensOmr()

Description
You have to overload the method greensOmr() based on order,type,number.

QUESTION 6:
------------
Project :BankDetails
Package :org.bank
Class :BankInfo
Methods :saving(),fixed(),deposit()

Class :AxisBank
Methods :deposit()

Description:
You have to override the method deposit in AxisBank.

QUESTION 7:
------------
Project :EducationInformation
Package :org.edu
Class :Education
Methods :ug(),pg()

Class :Arts
Methods :bSc(),bEd(),bA(),bBA(),ug(),pg()

Description:
You have to override the method ug(),pg() in Arts.

QUESTION 8:
------------
Project :UniversityInformation
Package :org.univ
Class :University
Methods :ug(),pg()

Class :College
Methods :ug(),pg()

Description:
ug(),pg() is just a templete in University class and You have to override the
method ug(),pg() in College class.

QUESTION 9:
------------
Project :BikeInformation
Package :org.bike
Interface :Bike
Methods :cost(),speed()

Class :Ktm
Methods :cost(),speed()

Description:
cost(),speed() is just a templete in Bike Interface and You have to override the
method cost(),speed() in Ktm class.

QUESTION 10:
-------------
Project :Computer
Interface :HardWare
Methods :hardwareResources()

Interface :Software
Methods :softwareResources()

Class :Desktop
Methods :desktopModel()

Description:
create 2 Interface and archieve multiple inheritance.
Class :Engineering
Methods :bE(),bTech()

Class :Medicine
Methods :physiyo(),dental(),mbbs()

Description:

create above 4 class and call all your class methods into the Education using
multilevel inheritance.

You might also like