SlideShare a Scribd company logo
1 of 2
Chapter 2 |ava Fundamentals
Code Listing 2-32 (NameaDialog. Java)
Unit 2: Java Fundamentals - Modify a Program
Type or open the source code named NamesDialog.java in Code Listing 2-32 on p.94. Add code
that asks the user for a title (Mr., Ms., Mrs.). Display the title along with their name in the
greeting. The title should preceed the name: i.e. Mr. John J. Doe.
Submit your .java file in the Dropbox.
Solution
package org.students;
import javax.swing.JOptionPane;
public class NamesDialog
{
public static void main(String[] args)
{
String firstName; // The user's first name
String middleName; // The user's middle name
String lastName; // The user's last name
String title;
title =
JOptionPane.showInputDialog("What is " +
"the title ? ");
// Get the user's first name
firstName =
JOptionPane.showInputDialog("What is " +
"your first name? ");
// Get the user's middle name.
middleName =
JOptionPane.showInputDialog(
"What is " + "your middle name? ");
// Get the user's last name.
lastName =
JOptionPane.showInputDialog("What is " + "your last name? ");
// Display a greeting
JOptionPane.showMessageDialog(null, "Hello " +title+"."+ firstName + " " +middleName +
". " + lastName);
System.exit(0);
}
}
______________________________________________________________________________
_______

More Related Content

Similar to Chapter 2 -ava Fundamentals Code Listing 2-32 (NameaDialog- Java) Unit.docx

Write a program that will prompt a user to input their name(first .pdf
Write a program that will prompt a user to input their name(first .pdfWrite a program that will prompt a user to input their name(first .pdf
Write a program that will prompt a user to input their name(first .pdfomarionmatzmcwill497
 
Demystifying Object-Oriented Programming - PHP[tek] 2017
Demystifying Object-Oriented Programming - PHP[tek] 2017Demystifying Object-Oriented Programming - PHP[tek] 2017
Demystifying Object-Oriented Programming - PHP[tek] 2017Alena Holligan
 
Php object orientation and classes
Php object orientation and classesPhp object orientation and classes
Php object orientation and classesKumar
 
Demystifying Object-Oriented Programming #phpbnl18
Demystifying Object-Oriented Programming #phpbnl18Demystifying Object-Oriented Programming #phpbnl18
Demystifying Object-Oriented Programming #phpbnl18Alena Holligan
 
Java Basic Syntax
Java Basic SyntaxJava Basic Syntax
Java Basic Syntaxjavaicon
 
Demystifying Object-Oriented Programming - Lone Star PHP
Demystifying Object-Oriented Programming - Lone Star PHPDemystifying Object-Oriented Programming - Lone Star PHP
Demystifying Object-Oriented Programming - Lone Star PHPAlena Holligan
 
Java căn bản - Chapter2
Java căn bản - Chapter2Java căn bản - Chapter2
Java căn bản - Chapter2Vince Vo
 
Chapter 2 - Getting Started with Java
Chapter 2 - Getting Started with JavaChapter 2 - Getting Started with Java
Chapter 2 - Getting Started with JavaEduardo Bergavera
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slotsmha4
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slotsmha4
 
Devoxx08 - Nuxeo Core, JCR 2, CMIS
Devoxx08 - Nuxeo Core, JCR 2, CMIS Devoxx08 - Nuxeo Core, JCR 2, CMIS
Devoxx08 - Nuxeo Core, JCR 2, CMIS Nuxeo
 
GLA-01- Java- Big O and Lists Overview and Submission Requirements You.pdf
GLA-01- Java- Big O and Lists Overview and Submission Requirements You.pdfGLA-01- Java- Big O and Lists Overview and Submission Requirements You.pdf
GLA-01- Java- Big O and Lists Overview and Submission Requirements You.pdfNicholasflqStewartl
 
Take the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpTake the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpAlena Holligan
 

Similar to Chapter 2 -ava Fundamentals Code Listing 2-32 (NameaDialog- Java) Unit.docx (20)

4.Packages_m1.ppt
4.Packages_m1.ppt4.Packages_m1.ppt
4.Packages_m1.ppt
 
OOP Lab Report.docx
OOP Lab Report.docxOOP Lab Report.docx
OOP Lab Report.docx
 
Write a program that will prompt a user to input their name(first .pdf
Write a program that will prompt a user to input their name(first .pdfWrite a program that will prompt a user to input their name(first .pdf
Write a program that will prompt a user to input their name(first .pdf
 
Demystifying Object-Oriented Programming - PHP[tek] 2017
Demystifying Object-Oriented Programming - PHP[tek] 2017Demystifying Object-Oriented Programming - PHP[tek] 2017
Demystifying Object-Oriented Programming - PHP[tek] 2017
 
Php object orientation and classes
Php object orientation and classesPhp object orientation and classes
Php object orientation and classes
 
Demystifying Object-Oriented Programming #phpbnl18
Demystifying Object-Oriented Programming #phpbnl18Demystifying Object-Oriented Programming #phpbnl18
Demystifying Object-Oriented Programming #phpbnl18
 
Java Basic Syntax
Java Basic SyntaxJava Basic Syntax
Java Basic Syntax
 
Demystifying Object-Oriented Programming - Lone Star PHP
Demystifying Object-Oriented Programming - Lone Star PHPDemystifying Object-Oriented Programming - Lone Star PHP
Demystifying Object-Oriented Programming - Lone Star PHP
 
Packages and interfaces
Packages and interfacesPackages and interfaces
Packages and interfaces
 
Java căn bản - Chapter2
Java căn bản - Chapter2Java căn bản - Chapter2
Java căn bản - Chapter2
 
Chapter 2 - Getting Started with Java
Chapter 2 - Getting Started with JavaChapter 2 - Getting Started with Java
Chapter 2 - Getting Started with Java
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots
 
03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots03 object-classes-pbl-4-slots
03 object-classes-pbl-4-slots
 
Devoxx08 - Nuxeo Core, JCR 2, CMIS
Devoxx08 - Nuxeo Core, JCR 2, CMIS Devoxx08 - Nuxeo Core, JCR 2, CMIS
Devoxx08 - Nuxeo Core, JCR 2, CMIS
 
OOP in PHP
OOP in PHPOOP in PHP
OOP in PHP
 
Features of java technology
Features of java technologyFeatures of java technology
Features of java technology
 
Java packages
Java packagesJava packages
Java packages
 
GLA-01- Java- Big O and Lists Overview and Submission Requirements You.pdf
GLA-01- Java- Big O and Lists Overview and Submission Requirements You.pdfGLA-01- Java- Big O and Lists Overview and Submission Requirements You.pdf
GLA-01- Java- Big O and Lists Overview and Submission Requirements You.pdf
 
Computer programming 2 -lesson 4
Computer programming 2  -lesson 4Computer programming 2  -lesson 4
Computer programming 2 -lesson 4
 
Take the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpTake the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphp
 

More from mmary455

signment-takeCovalent Activity-doPlocator-assignment take&takeAssignme.docx
signment-takeCovalent Activity-doPlocator-assignment take&takeAssignme.docxsignment-takeCovalent Activity-doPlocator-assignment take&takeAssignme.docx
signment-takeCovalent Activity-doPlocator-assignment take&takeAssignme.docxmmary455
 
Simple interest is the interest cost for one or more periods when the.docx
Simple interest is the interest cost for one or more periods when the.docxSimple interest is the interest cost for one or more periods when the.docx
Simple interest is the interest cost for one or more periods when the.docxmmary455
 
show work 10- Divide 1436 by 203- The answer expressed to the correct.docx
show work 10- Divide 1436 by 203- The answer expressed to the correct.docxshow work 10- Divide 1436 by 203- The answer expressed to the correct.docx
show work 10- Divide 1436 by 203- The answer expressed to the correct.docxmmary455
 
Show the effect of dollar appeciation and depreciation with the yen on.docx
Show the effect of dollar appeciation and depreciation with the yen on.docxShow the effect of dollar appeciation and depreciation with the yen on.docx
Show the effect of dollar appeciation and depreciation with the yen on.docxmmary455
 
Solubility products Ks(Fe(OH)2) - 4-9 x 10 ^ -17 Ks(Fe(OH)3) - 2-8 x 1.docx
Solubility products Ks(Fe(OH)2) - 4-9 x 10 ^ -17 Ks(Fe(OH)3) - 2-8 x 1.docxSolubility products Ks(Fe(OH)2) - 4-9 x 10 ^ -17 Ks(Fe(OH)3) - 2-8 x 1.docx
Solubility products Ks(Fe(OH)2) - 4-9 x 10 ^ -17 Ks(Fe(OH)3) - 2-8 x 1.docxmmary455
 
Sodium fluoride is added to many municipal water supplies to reduce to.docx
Sodium fluoride is added to many municipal water supplies to reduce to.docxSodium fluoride is added to many municipal water supplies to reduce to.docx
Sodium fluoride is added to many municipal water supplies to reduce to.docxmmary455
 
Societal Dimension of IPESolutionInternational political economy was t.docx
Societal Dimension of IPESolutionInternational political economy was t.docxSocietal Dimension of IPESolutionInternational political economy was t.docx
Societal Dimension of IPESolutionInternational political economy was t.docxmmary455
 
Soil & GW Remediation (Civil and Environmental Engineering) SolutionQn.docx
Soil & GW Remediation (Civil and Environmental Engineering) SolutionQn.docxSoil & GW Remediation (Civil and Environmental Engineering) SolutionQn.docx
Soil & GW Remediation (Civil and Environmental Engineering) SolutionQn.docxmmary455
 
Show that the worst-case time complexity for Binary Search is given by.docx
Show that the worst-case time complexity for Binary Search is given by.docxShow that the worst-case time complexity for Binary Search is given by.docx
Show that the worst-case time complexity for Binary Search is given by.docxmmary455
 
Since Linux is an international operating system you can configure it.docx
Since Linux is an international operating system you can configure it.docxSince Linux is an international operating system you can configure it.docx
Since Linux is an international operating system you can configure it.docxmmary455
 
Sinking fund bands- Require the issuer to set aside assets in order r.docx
Sinking fund bands-  Require the issuer to set aside assets in order r.docxSinking fund bands-  Require the issuer to set aside assets in order r.docx
Sinking fund bands- Require the issuer to set aside assets in order r.docxmmary455
 
Simplify-Write answers in the form of a+bi where a and b are real numb.docx
Simplify-Write answers in the form of a+bi where a and b are real numb.docxSimplify-Write answers in the form of a+bi where a and b are real numb.docx
Simplify-Write answers in the form of a+bi where a and b are real numb.docxmmary455
 
Simplify- 1 + 3 x+4 1 + 9 x-2 Solutio.docx
Simplify-    1 +      3    x+4         1 +      9    x-2       Solutio.docxSimplify-    1 +      3    x+4         1 +      9    x-2       Solutio.docx
Simplify- 1 + 3 x+4 1 + 9 x-2 Solutio.docxmmary455
 
Case- The Long- Loud Silence Background As the director of health info.docx
Case- The Long- Loud Silence Background As the director of health info.docxCase- The Long- Loud Silence Background As the director of health info.docx
Case- The Long- Loud Silence Background As the director of health info.docxmmary455
 
Case 4-3 The Baptist Foundation of Arizona- The Whistleblower Hotline.docx
Case 4-3 The Baptist Foundation of Arizona- The Whistleblower Hotline.docxCase 4-3 The Baptist Foundation of Arizona- The Whistleblower Hotline.docx
Case 4-3 The Baptist Foundation of Arizona- The Whistleblower Hotline.docxmmary455
 
Case 5-1 David L- Miller- Portrait of a White-Collar Criminal There is.docx
Case 5-1 David L- Miller- Portrait of a White-Collar Criminal There is.docxCase 5-1 David L- Miller- Portrait of a White-Collar Criminal There is.docx
Case 5-1 David L- Miller- Portrait of a White-Collar Criminal There is.docxmmary455
 
Carbon steel is an active metal meaning it has low corrosion resistanc.docx
Carbon steel is an active metal meaning it has low corrosion resistanc.docxCarbon steel is an active metal meaning it has low corrosion resistanc.docx
Carbon steel is an active metal meaning it has low corrosion resistanc.docxmmary455
 
Carbon dioxide in the atmosphere traps heat from the sun and makes lif.docx
Carbon dioxide in the atmosphere traps heat from the sun and makes lif.docxCarbon dioxide in the atmosphere traps heat from the sun and makes lif.docx
Carbon dioxide in the atmosphere traps heat from the sun and makes lif.docxmmary455
 
Carnival Corporation has recently placed into service some of the larg.docx
Carnival Corporation has recently placed into service some of the larg.docxCarnival Corporation has recently placed into service some of the larg.docx
Carnival Corporation has recently placed into service some of the larg.docxmmary455
 
Canadian Income Tax Question Tiffany MacGraw- a Canadian citizen- left.docx
Canadian Income Tax Question Tiffany MacGraw- a Canadian citizen- left.docxCanadian Income Tax Question Tiffany MacGraw- a Canadian citizen- left.docx
Canadian Income Tax Question Tiffany MacGraw- a Canadian citizen- left.docxmmary455
 

More from mmary455 (20)

signment-takeCovalent Activity-doPlocator-assignment take&takeAssignme.docx
signment-takeCovalent Activity-doPlocator-assignment take&takeAssignme.docxsignment-takeCovalent Activity-doPlocator-assignment take&takeAssignme.docx
signment-takeCovalent Activity-doPlocator-assignment take&takeAssignme.docx
 
Simple interest is the interest cost for one or more periods when the.docx
Simple interest is the interest cost for one or more periods when the.docxSimple interest is the interest cost for one or more periods when the.docx
Simple interest is the interest cost for one or more periods when the.docx
 
show work 10- Divide 1436 by 203- The answer expressed to the correct.docx
show work 10- Divide 1436 by 203- The answer expressed to the correct.docxshow work 10- Divide 1436 by 203- The answer expressed to the correct.docx
show work 10- Divide 1436 by 203- The answer expressed to the correct.docx
 
Show the effect of dollar appeciation and depreciation with the yen on.docx
Show the effect of dollar appeciation and depreciation with the yen on.docxShow the effect of dollar appeciation and depreciation with the yen on.docx
Show the effect of dollar appeciation and depreciation with the yen on.docx
 
Solubility products Ks(Fe(OH)2) - 4-9 x 10 ^ -17 Ks(Fe(OH)3) - 2-8 x 1.docx
Solubility products Ks(Fe(OH)2) - 4-9 x 10 ^ -17 Ks(Fe(OH)3) - 2-8 x 1.docxSolubility products Ks(Fe(OH)2) - 4-9 x 10 ^ -17 Ks(Fe(OH)3) - 2-8 x 1.docx
Solubility products Ks(Fe(OH)2) - 4-9 x 10 ^ -17 Ks(Fe(OH)3) - 2-8 x 1.docx
 
Sodium fluoride is added to many municipal water supplies to reduce to.docx
Sodium fluoride is added to many municipal water supplies to reduce to.docxSodium fluoride is added to many municipal water supplies to reduce to.docx
Sodium fluoride is added to many municipal water supplies to reduce to.docx
 
Societal Dimension of IPESolutionInternational political economy was t.docx
Societal Dimension of IPESolutionInternational political economy was t.docxSocietal Dimension of IPESolutionInternational political economy was t.docx
Societal Dimension of IPESolutionInternational political economy was t.docx
 
Soil & GW Remediation (Civil and Environmental Engineering) SolutionQn.docx
Soil & GW Remediation (Civil and Environmental Engineering) SolutionQn.docxSoil & GW Remediation (Civil and Environmental Engineering) SolutionQn.docx
Soil & GW Remediation (Civil and Environmental Engineering) SolutionQn.docx
 
Show that the worst-case time complexity for Binary Search is given by.docx
Show that the worst-case time complexity for Binary Search is given by.docxShow that the worst-case time complexity for Binary Search is given by.docx
Show that the worst-case time complexity for Binary Search is given by.docx
 
Since Linux is an international operating system you can configure it.docx
Since Linux is an international operating system you can configure it.docxSince Linux is an international operating system you can configure it.docx
Since Linux is an international operating system you can configure it.docx
 
Sinking fund bands- Require the issuer to set aside assets in order r.docx
Sinking fund bands-  Require the issuer to set aside assets in order r.docxSinking fund bands-  Require the issuer to set aside assets in order r.docx
Sinking fund bands- Require the issuer to set aside assets in order r.docx
 
Simplify-Write answers in the form of a+bi where a and b are real numb.docx
Simplify-Write answers in the form of a+bi where a and b are real numb.docxSimplify-Write answers in the form of a+bi where a and b are real numb.docx
Simplify-Write answers in the form of a+bi where a and b are real numb.docx
 
Simplify- 1 + 3 x+4 1 + 9 x-2 Solutio.docx
Simplify-    1 +      3    x+4         1 +      9    x-2       Solutio.docxSimplify-    1 +      3    x+4         1 +      9    x-2       Solutio.docx
Simplify- 1 + 3 x+4 1 + 9 x-2 Solutio.docx
 
Case- The Long- Loud Silence Background As the director of health info.docx
Case- The Long- Loud Silence Background As the director of health info.docxCase- The Long- Loud Silence Background As the director of health info.docx
Case- The Long- Loud Silence Background As the director of health info.docx
 
Case 4-3 The Baptist Foundation of Arizona- The Whistleblower Hotline.docx
Case 4-3 The Baptist Foundation of Arizona- The Whistleblower Hotline.docxCase 4-3 The Baptist Foundation of Arizona- The Whistleblower Hotline.docx
Case 4-3 The Baptist Foundation of Arizona- The Whistleblower Hotline.docx
 
Case 5-1 David L- Miller- Portrait of a White-Collar Criminal There is.docx
Case 5-1 David L- Miller- Portrait of a White-Collar Criminal There is.docxCase 5-1 David L- Miller- Portrait of a White-Collar Criminal There is.docx
Case 5-1 David L- Miller- Portrait of a White-Collar Criminal There is.docx
 
Carbon steel is an active metal meaning it has low corrosion resistanc.docx
Carbon steel is an active metal meaning it has low corrosion resistanc.docxCarbon steel is an active metal meaning it has low corrosion resistanc.docx
Carbon steel is an active metal meaning it has low corrosion resistanc.docx
 
Carbon dioxide in the atmosphere traps heat from the sun and makes lif.docx
Carbon dioxide in the atmosphere traps heat from the sun and makes lif.docxCarbon dioxide in the atmosphere traps heat from the sun and makes lif.docx
Carbon dioxide in the atmosphere traps heat from the sun and makes lif.docx
 
Carnival Corporation has recently placed into service some of the larg.docx
Carnival Corporation has recently placed into service some of the larg.docxCarnival Corporation has recently placed into service some of the larg.docx
Carnival Corporation has recently placed into service some of the larg.docx
 
Canadian Income Tax Question Tiffany MacGraw- a Canadian citizen- left.docx
Canadian Income Tax Question Tiffany MacGraw- a Canadian citizen- left.docxCanadian Income Tax Question Tiffany MacGraw- a Canadian citizen- left.docx
Canadian Income Tax Question Tiffany MacGraw- a Canadian citizen- left.docx
 

Recently uploaded

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
_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
 
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
 
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
 

Recently uploaded (20)

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
_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
 
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
 
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
 

Chapter 2 -ava Fundamentals Code Listing 2-32 (NameaDialog- Java) Unit.docx

  • 1. Chapter 2 |ava Fundamentals Code Listing 2-32 (NameaDialog. Java) Unit 2: Java Fundamentals - Modify a Program Type or open the source code named NamesDialog.java in Code Listing 2-32 on p.94. Add code that asks the user for a title (Mr., Ms., Mrs.). Display the title along with their name in the greeting. The title should preceed the name: i.e. Mr. John J. Doe. Submit your .java file in the Dropbox. Solution package org.students; import javax.swing.JOptionPane; public class NamesDialog { public static void main(String[] args) { String firstName; // The user's first name String middleName; // The user's middle name String lastName; // The user's last name String title; title = JOptionPane.showInputDialog("What is " + "the title ? "); // Get the user's first name firstName = JOptionPane.showInputDialog("What is " + "your first name? "); // Get the user's middle name. middleName =
  • 2. JOptionPane.showInputDialog( "What is " + "your middle name? "); // Get the user's last name. lastName = JOptionPane.showInputDialog("What is " + "your last name? "); // Display a greeting JOptionPane.showMessageDialog(null, "Hello " +title+"."+ firstName + " " +middleName + ". " + lastName); System.exit(0); } } ______________________________________________________________________________ _______