SlideShare a Scribd company logo
1 of 1
Department of Computer Science and Engineering
POORNIMA COLLEGE OF ENGINEERING –Jaipur
BTech-CSE(V-Sem)PCE-Jaipur-Rajesthan –India(Vishal Choudhary) Page 1
Assignement-3
Subject: Adv.Java Programming Sub Code: 5CS4-24
1. What isconstructor? Andwhatis the purpose of defaultconstructor. Write aprogram to define
a constructor of class Bankand can calculate the rate of interestalsodisplaythe name of client
inthe mainmethodwiththeirbalance.
2. What isdifference betweenastaticvariable,staticmethodandastatic block?Define astatic
methodboyinclass human. Andprintthe string“I am boy”. Alsodefinethe staticvariable and
staticbock in same class.
3. What isdifference betweenstaticmethodandinstance method?Give anexample of each.
4. What isinheritance .write aprograminwhichclassuniversityisinheritedfromachildclass
studentanda class teacher?Classteacherisalsoinheritedbythe classcourse.Displaythe
relevantinformationineachclass.
5. What isdifference betweenmethodoverloadingand overridinggive anexample of each.
6. What isthe use of SUPER and THIS keyword?Write aprogram in eachcase.
7. What ispolymorphism? Write aprograminjava to show the polymorphism.
8. What isdifference betweenstaticanddynamicbinding.Write aprogramto show static and
dynamicbinding.
9. What isthe use of keywordfinal injava?Show withexampleineachcase.
10. What isrun time polymorphism?Write ajavaprogram to displayruntime polymorphism.
11. Create a class Personwithprivate instance variableforpersonname andbirthdates;add
appropriate accessmethodtothese variables.the create asubclasscollegegraduate with
private instance variable forstudentCGPA and yearof Graduationfor yourclasses.Thencreate
a class withmain() methodthatdemonstrate yourclass.

More Related Content

Similar to Assignement 3

Automated Question Paper Generator And Answer Checker Using Information Retri...
Automated Question Paper Generator And Answer Checker Using Information Retri...Automated Question Paper Generator And Answer Checker Using Information Retri...
Automated Question Paper Generator And Answer Checker Using Information Retri...Sheila Sinclair
 
Dad (Data Analysis And Design)
Dad (Data Analysis And Design)Dad (Data Analysis And Design)
Dad (Data Analysis And Design)Jill Lyons
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSnikshaikh786
 
Algorithm Identification In Programming Assignments
Algorithm Identification In Programming AssignmentsAlgorithm Identification In Programming Assignments
Algorithm Identification In Programming AssignmentsKarin Faust
 
Java ocjp level_2
Java ocjp level_2Java ocjp level_2
Java ocjp level_2Sayed Ahmed
 
IRJET- Predictive Analytics for Placement of Student- A Comparative Study
IRJET- Predictive Analytics for Placement of Student- A Comparative StudyIRJET- Predictive Analytics for Placement of Student- A Comparative Study
IRJET- Predictive Analytics for Placement of Student- A Comparative StudyIRJET Journal
 
Campus Performace Report
Campus Performace ReportCampus Performace Report
Campus Performace ReportSayed Ali
 
Post Graduate Admission Prediction System
Post Graduate Admission Prediction SystemPost Graduate Admission Prediction System
Post Graduate Admission Prediction SystemIRJET Journal
 
ADBMS ALL 2069-73 [CSITauthority.blogspot.com].pdf
ADBMS ALL 2069-73 [CSITauthority.blogspot.com].pdfADBMS ALL 2069-73 [CSITauthority.blogspot.com].pdf
ADBMS ALL 2069-73 [CSITauthority.blogspot.com].pdfarvind pandey
 
Web Application For Pre-Assessment Of Cognitive Development
Web Application For Pre-Assessment Of Cognitive DevelopmentWeb Application For Pre-Assessment Of Cognitive Development
Web Application For Pre-Assessment Of Cognitive DevelopmentIRJET Journal
 
Vikalp - Automatic multiple choice questions generator
Vikalp - Automatic multiple choice questions generatorVikalp - Automatic multiple choice questions generator
Vikalp - Automatic multiple choice questions generatorIRJET Journal
 
Internal assessment marking system
Internal assessment marking systemInternal assessment marking system
Internal assessment marking systemShreshth Saxena
 
IRJET- Automated Exam Question Generator using Genetic Algorithm
IRJET-  	  Automated Exam Question Generator using Genetic AlgorithmIRJET-  	  Automated Exam Question Generator using Genetic Algorithm
IRJET- Automated Exam Question Generator using Genetic AlgorithmIRJET Journal
 
Dotnet datamining ieee projects 2012 @ Seabirds ( Chennai, Pondicherry, Vello...
Dotnet datamining ieee projects 2012 @ Seabirds ( Chennai, Pondicherry, Vello...Dotnet datamining ieee projects 2012 @ Seabirds ( Chennai, Pondicherry, Vello...
Dotnet datamining ieee projects 2012 @ Seabirds ( Chennai, Pondicherry, Vello...SBGC
 
IRJET- Career Counselling Chatbot
IRJET-  	  Career Counselling ChatbotIRJET-  	  Career Counselling Chatbot
IRJET- Career Counselling ChatbotIRJET Journal
 
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfJAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfnofakeNews
 
Paper ID 216@ ICMLBDA 2023.pptx
Paper ID 216@ ICMLBDA 2023.pptxPaper ID 216@ ICMLBDA 2023.pptx
Paper ID 216@ ICMLBDA 2023.pptxKrishnaReddy717023
 
AP Computer Science Test Prep Part 1 - Introduction to java Programming
AP Computer Science Test Prep Part 1 - Introduction to java ProgrammingAP Computer Science Test Prep Part 1 - Introduction to java Programming
AP Computer Science Test Prep Part 1 - Introduction to java ProgrammingNR Computer Learning Center
 

Similar to Assignement 3 (20)

Automated Question Paper Generator And Answer Checker Using Information Retri...
Automated Question Paper Generator And Answer Checker Using Information Retri...Automated Question Paper Generator And Answer Checker Using Information Retri...
Automated Question Paper Generator And Answer Checker Using Information Retri...
 
Dad (Data Analysis And Design)
Dad (Data Analysis And Design)Dad (Data Analysis And Design)
Dad (Data Analysis And Design)
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUS
 
Algorithm Identification In Programming Assignments
Algorithm Identification In Programming AssignmentsAlgorithm Identification In Programming Assignments
Algorithm Identification In Programming Assignments
 
Java ocjp level_2
Java ocjp level_2Java ocjp level_2
Java ocjp level_2
 
IRJET- Predictive Analytics for Placement of Student- A Comparative Study
IRJET- Predictive Analytics for Placement of Student- A Comparative StudyIRJET- Predictive Analytics for Placement of Student- A Comparative Study
IRJET- Predictive Analytics for Placement of Student- A Comparative Study
 
Campus Performace Report
Campus Performace ReportCampus Performace Report
Campus Performace Report
 
Post Graduate Admission Prediction System
Post Graduate Admission Prediction SystemPost Graduate Admission Prediction System
Post Graduate Admission Prediction System
 
Lab assignment a 02
Lab assignment a 02Lab assignment a 02
Lab assignment a 02
 
ADBMS ALL 2069-73 [CSITauthority.blogspot.com].pdf
ADBMS ALL 2069-73 [CSITauthority.blogspot.com].pdfADBMS ALL 2069-73 [CSITauthority.blogspot.com].pdf
ADBMS ALL 2069-73 [CSITauthority.blogspot.com].pdf
 
Web Application For Pre-Assessment Of Cognitive Development
Web Application For Pre-Assessment Of Cognitive DevelopmentWeb Application For Pre-Assessment Of Cognitive Development
Web Application For Pre-Assessment Of Cognitive Development
 
Vikalp - Automatic multiple choice questions generator
Vikalp - Automatic multiple choice questions generatorVikalp - Automatic multiple choice questions generator
Vikalp - Automatic multiple choice questions generator
 
Internal assessment marking system
Internal assessment marking systemInternal assessment marking system
Internal assessment marking system
 
IRJET- Automated Exam Question Generator using Genetic Algorithm
IRJET-  	  Automated Exam Question Generator using Genetic AlgorithmIRJET-  	  Automated Exam Question Generator using Genetic Algorithm
IRJET- Automated Exam Question Generator using Genetic Algorithm
 
Dotnet datamining ieee projects 2012 @ Seabirds ( Chennai, Pondicherry, Vello...
Dotnet datamining ieee projects 2012 @ Seabirds ( Chennai, Pondicherry, Vello...Dotnet datamining ieee projects 2012 @ Seabirds ( Chennai, Pondicherry, Vello...
Dotnet datamining ieee projects 2012 @ Seabirds ( Chennai, Pondicherry, Vello...
 
IRJET- Career Counselling Chatbot
IRJET-  	  Career Counselling ChatbotIRJET-  	  Career Counselling Chatbot
IRJET- Career Counselling Chatbot
 
Assignment 9
Assignment 9Assignment 9
Assignment 9
 
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfJAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
 
Paper ID 216@ ICMLBDA 2023.pptx
Paper ID 216@ ICMLBDA 2023.pptxPaper ID 216@ ICMLBDA 2023.pptx
Paper ID 216@ ICMLBDA 2023.pptx
 
AP Computer Science Test Prep Part 1 - Introduction to java Programming
AP Computer Science Test Prep Part 1 - Introduction to java ProgrammingAP Computer Science Test Prep Part 1 - Introduction to java Programming
AP Computer Science Test Prep Part 1 - Introduction to java Programming
 

More from vishal choudhary (20)

SE-Lecture1.ppt
SE-Lecture1.pptSE-Lecture1.ppt
SE-Lecture1.ppt
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
 
SE-CyclomaticComplexityand Testing.ppt
SE-CyclomaticComplexityand Testing.pptSE-CyclomaticComplexityand Testing.ppt
SE-CyclomaticComplexityand Testing.ppt
 
SE-Lecture-7.pptx
SE-Lecture-7.pptxSE-Lecture-7.pptx
SE-Lecture-7.pptx
 
Se-Lecture-6.ppt
Se-Lecture-6.pptSe-Lecture-6.ppt
Se-Lecture-6.ppt
 
SE-Lecture-5.pptx
SE-Lecture-5.pptxSE-Lecture-5.pptx
SE-Lecture-5.pptx
 
XML.pptx
XML.pptxXML.pptx
XML.pptx
 
SE-Lecture-8.pptx
SE-Lecture-8.pptxSE-Lecture-8.pptx
SE-Lecture-8.pptx
 
SE-coupling and cohesion.ppt
SE-coupling and cohesion.pptSE-coupling and cohesion.ppt
SE-coupling and cohesion.ppt
 
SE-Lecture-2.pptx
SE-Lecture-2.pptxSE-Lecture-2.pptx
SE-Lecture-2.pptx
 
SE-software design.ppt
SE-software design.pptSE-software design.ppt
SE-software design.ppt
 
SE1.ppt
SE1.pptSE1.ppt
SE1.ppt
 
SE-Lecture-4.pptx
SE-Lecture-4.pptxSE-Lecture-4.pptx
SE-Lecture-4.pptx
 
SE-Lecture=3.pptx
SE-Lecture=3.pptxSE-Lecture=3.pptx
SE-Lecture=3.pptx
 
Multimedia-Lecture-Animation.pptx
Multimedia-Lecture-Animation.pptxMultimedia-Lecture-Animation.pptx
Multimedia-Lecture-Animation.pptx
 
MultimediaLecture5.pptx
MultimediaLecture5.pptxMultimediaLecture5.pptx
MultimediaLecture5.pptx
 
Multimedia-Lecture-7.pptx
Multimedia-Lecture-7.pptxMultimedia-Lecture-7.pptx
Multimedia-Lecture-7.pptx
 
MultiMedia-Lecture-4.pptx
MultiMedia-Lecture-4.pptxMultiMedia-Lecture-4.pptx
MultiMedia-Lecture-4.pptx
 
Multimedia-Lecture-6.pptx
Multimedia-Lecture-6.pptxMultimedia-Lecture-6.pptx
Multimedia-Lecture-6.pptx
 
Multimedia-Lecture-3.pptx
Multimedia-Lecture-3.pptxMultimedia-Lecture-3.pptx
Multimedia-Lecture-3.pptx
 

Recently uploaded

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

Assignement 3

  • 1. Department of Computer Science and Engineering POORNIMA COLLEGE OF ENGINEERING –Jaipur BTech-CSE(V-Sem)PCE-Jaipur-Rajesthan –India(Vishal Choudhary) Page 1 Assignement-3 Subject: Adv.Java Programming Sub Code: 5CS4-24 1. What isconstructor? Andwhatis the purpose of defaultconstructor. Write aprogram to define a constructor of class Bankand can calculate the rate of interestalsodisplaythe name of client inthe mainmethodwiththeirbalance. 2. What isdifference betweenastaticvariable,staticmethodandastatic block?Define astatic methodboyinclass human. Andprintthe string“I am boy”. Alsodefinethe staticvariable and staticbock in same class. 3. What isdifference betweenstaticmethodandinstance method?Give anexample of each. 4. What isinheritance .write aprograminwhichclassuniversityisinheritedfromachildclass studentanda class teacher?Classteacherisalsoinheritedbythe classcourse.Displaythe relevantinformationineachclass. 5. What isdifference betweenmethodoverloadingand overridinggive anexample of each. 6. What isthe use of SUPER and THIS keyword?Write aprogram in eachcase. 7. What ispolymorphism? Write aprograminjava to show the polymorphism. 8. What isdifference betweenstaticanddynamicbinding.Write aprogramto show static and dynamicbinding. 9. What isthe use of keywordfinal injava?Show withexampleineachcase. 10. What isrun time polymorphism?Write ajavaprogram to displayruntime polymorphism. 11. Create a class Personwithprivate instance variableforpersonname andbirthdates;add appropriate accessmethodtothese variables.the create asubclasscollegegraduate with private instance variable forstudentCGPA and yearof Graduationfor yourclasses.Thencreate a class withmain() methodthatdemonstrate yourclass.