SlideShare a Scribd company logo
1 of 1
Download to read offline
8-7. Modify exercise 7-2 on comparing strings so it is now done in a GUI application frame class
definition with a main instead of a console application. The GUI components will be data fields
of the class definition. The prompts will now be in labels and the input will now be textfields.
The user will hit enter in the second textfield to get the results in two other answer labels. The
results (which is greater and the difference amount) will be in these two other answer labels.
Declare everything at the top, use the constructor to add the components to your container (use
background and foreground colors and the flow layout), and use actionPerformed to do three
things: get the text out of the textfields for the two strings (instead of readLines), to perform the
nested if else with the comparisons, and the setting of the answers in the two answer labels -
which is greater and the difference (instead of printlns). Use a little main method to construct
yourself. Set the size so the components flow properly (make sure labels are next to textfields,
etc.) and there is not a lot of extra space. Take a picture of the output GUI frame with
<Alt><PrtScr> which will copy the frame, paste into paint, and save as a .jpg file. Attach the .
java program file .jpg output file and submit.
* Bil1 Wohlleber zxercise 7 2 This program will compare 2 strings / mport java. io. ublic class
ex72 public static void main(String[] args) throws IOException { String s1, s2; BufferedReader
br = new BufferedReader (new InputStreamReader (System. in)); System. out. print ("Enter a
string: "); s 1 = br. readLine () ; System. out. print("Enter a string: "); s 2 = br. readLine () ; if ( s
1 . equals ( s 2 )) // s 1 == s 2 System. out. println( "Same string"); else if (sl. equalsIgnoreCase
(s2)) System. out. println ("Same string - different case"); else if ( s 1 . compareTo ( s 2 ) > 0 ) //
s 1 > s 2 System. out. println ( s 1 + + is alphabetically greater than " + s 2 ) else // s 1 < s 2
System. out. println (s1 + " is alphabetically less than " + s 2 ) System. out. println ("Difference
is " + sl. compareTo (s2)); }

More Related Content

Similar to 8-7- Modify exercise 7-2 on comparing strings so it is now done in a G.pdf

Map reduceoriginalpaper mandatoryreading
Map reduceoriginalpaper mandatoryreadingMap reduceoriginalpaper mandatoryreading
Map reduceoriginalpaper mandatoryreadingcoolmirza143
 
Map reduce
Map reduceMap reduce
Map reducexydii
 
Memento Pattern Implementation
Memento Pattern ImplementationMemento Pattern Implementation
Memento Pattern ImplementationSteve Widom
 
nlp dl 1.pdf
nlp dl 1.pdfnlp dl 1.pdf
nlp dl 1.pdfnyomans1
 
SCons an Introduction
SCons an IntroductionSCons an Introduction
SCons an Introductionslantsixgames
 
Control system Lab record
Control system Lab record Control system Lab record
Control system Lab record Yuvraj Singh
 
Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Saajid Akram
 
Programming Without Coding Technology (PWCT) Features - Programming Paradigm
Programming Without Coding Technology (PWCT) Features - Programming ParadigmProgramming Without Coding Technology (PWCT) Features - Programming Paradigm
Programming Without Coding Technology (PWCT) Features - Programming ParadigmMahmoud Samir Fayed
 
GSP 125 Entire Course NEW
GSP 125 Entire Course NEWGSP 125 Entire Course NEW
GSP 125 Entire Course NEWshyamuopten
 
2004 map reduce simplied data processing on large clusters (mapreduce)
2004 map reduce simplied data processing on large clusters (mapreduce)2004 map reduce simplied data processing on large clusters (mapreduce)
2004 map reduce simplied data processing on large clusters (mapreduce)anh tuan
 
OverviewAssignment 1 Hypothetical Machine SimulatorCSci 43.docx
OverviewAssignment 1  Hypothetical Machine SimulatorCSci 43.docxOverviewAssignment 1  Hypothetical Machine SimulatorCSci 43.docx
OverviewAssignment 1 Hypothetical Machine SimulatorCSci 43.docxhoney690131
 
Java conceptual learning material
Java conceptual learning materialJava conceptual learning material
Java conceptual learning materialArthyR3
 
Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make YASHU40
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_netNico Ludwig
 
Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...Rusif Eyvazli
 

Similar to 8-7- Modify exercise 7-2 on comparing strings so it is now done in a G.pdf (20)

Map reduceoriginalpaper mandatoryreading
Map reduceoriginalpaper mandatoryreadingMap reduceoriginalpaper mandatoryreading
Map reduceoriginalpaper mandatoryreading
 
Map reduce
Map reduceMap reduce
Map reduce
 
Memento Pattern Implementation
Memento Pattern ImplementationMemento Pattern Implementation
Memento Pattern Implementation
 
nlp dl 1.pdf
nlp dl 1.pdfnlp dl 1.pdf
nlp dl 1.pdf
 
SCons an Introduction
SCons an IntroductionSCons an Introduction
SCons an Introduction
 
Control system Lab record
Control system Lab record Control system Lab record
Control system Lab record
 
Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Class[3][5th jun] [three js]
Class[3][5th jun] [three js]
 
Slides chapters 28-32
Slides chapters 28-32Slides chapters 28-32
Slides chapters 28-32
 
Programming Without Coding Technology (PWCT) Features - Programming Paradigm
Programming Without Coding Technology (PWCT) Features - Programming ParadigmProgramming Without Coding Technology (PWCT) Features - Programming Paradigm
Programming Without Coding Technology (PWCT) Features - Programming Paradigm
 
Qe Reference
Qe ReferenceQe Reference
Qe Reference
 
GSP 125 Entire Course NEW
GSP 125 Entire Course NEWGSP 125 Entire Course NEW
GSP 125 Entire Course NEW
 
Map reduce
Map reduceMap reduce
Map reduce
 
2004 map reduce simplied data processing on large clusters (mapreduce)
2004 map reduce simplied data processing on large clusters (mapreduce)2004 map reduce simplied data processing on large clusters (mapreduce)
2004 map reduce simplied data processing on large clusters (mapreduce)
 
Operating System Assignment Help
Operating System Assignment HelpOperating System Assignment Help
Operating System Assignment Help
 
OverviewAssignment 1 Hypothetical Machine SimulatorCSci 43.docx
OverviewAssignment 1  Hypothetical Machine SimulatorCSci 43.docxOverviewAssignment 1  Hypothetical Machine SimulatorCSci 43.docx
OverviewAssignment 1 Hypothetical Machine SimulatorCSci 43.docx
 
Java conceptual learning material
Java conceptual learning materialJava conceptual learning material
Java conceptual learning material
 
Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make Question 1 briefly respond to all the following questions. make
Question 1 briefly respond to all the following questions. make
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net
 
CBSE Sample Paper IP
CBSE Sample Paper IPCBSE Sample Paper IP
CBSE Sample Paper IP
 
Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...
 

More from JohnKyQMorrisont

A capital gain results when you sell an asset for less than you paid f.pdf
A capital gain results when you sell an asset for less than you paid f.pdfA capital gain results when you sell an asset for less than you paid f.pdf
A capital gain results when you sell an asset for less than you paid f.pdfJohnKyQMorrisont
 
A bacteria living in Antarctica would have what types of hydrocarbon t.pdf
A bacteria living in Antarctica would have what types of hydrocarbon t.pdfA bacteria living in Antarctica would have what types of hydrocarbon t.pdf
A bacteria living in Antarctica would have what types of hydrocarbon t.pdfJohnKyQMorrisont
 
A 2019 article in the New York Times was headlined- -Trump Thinks Doll.pdf
A 2019 article in the New York Times was headlined- -Trump Thinks Doll.pdfA 2019 article in the New York Times was headlined- -Trump Thinks Doll.pdf
A 2019 article in the New York Times was headlined- -Trump Thinks Doll.pdfJohnKyQMorrisont
 
A 17-year-old Senior High School student visited the clinic for consul.pdf
A 17-year-old Senior High School student visited the clinic for consul.pdfA 17-year-old Senior High School student visited the clinic for consul.pdf
A 17-year-old Senior High School student visited the clinic for consul.pdfJohnKyQMorrisont
 
9- What was your unknown- Which test(s) helped you determine its ident.pdf
9- What was your unknown- Which test(s) helped you determine its ident.pdf9- What was your unknown- Which test(s) helped you determine its ident.pdf
9- What was your unknown- Which test(s) helped you determine its ident.pdfJohnKyQMorrisont
 
9- Describe the process of performing a general survey 10- Demonstrate.pdf
9- Describe the process of performing a general survey 10- Demonstrate.pdf9- Describe the process of performing a general survey 10- Demonstrate.pdf
9- Describe the process of performing a general survey 10- Demonstrate.pdfJohnKyQMorrisont
 
8-00- 3) Condenisel financial dats of Kitches Giadyets Ceempany appear.pdf
8-00- 3) Condenisel financial dats of Kitches Giadyets Ceempany appear.pdf8-00- 3) Condenisel financial dats of Kitches Giadyets Ceempany appear.pdf
8-00- 3) Condenisel financial dats of Kitches Giadyets Ceempany appear.pdfJohnKyQMorrisont
 
8- Waterworld- 1995- A- What created the monster (and or evil situatio.pdf
8- Waterworld- 1995- A- What created the monster (and or evil situatio.pdf8- Waterworld- 1995- A- What created the monster (and or evil situatio.pdf
8- Waterworld- 1995- A- What created the monster (and or evil situatio.pdfJohnKyQMorrisont
 
8- The languase is recongnized by the Followins N NA( is anther notati.pdf
8- The languase is recongnized by the Followins N NA( is anther notati.pdf8- The languase is recongnized by the Followins N NA( is anther notati.pdf
8- The languase is recongnized by the Followins N NA( is anther notati.pdfJohnKyQMorrisont
 
8- The larpest assat eategory of iile inturers in and the largest Haba.pdf
8- The larpest assat eategory of iile inturers in and the largest Haba.pdf8- The larpest assat eategory of iile inturers in and the largest Haba.pdf
8- The larpest assat eategory of iile inturers in and the largest Haba.pdfJohnKyQMorrisont
 
8- The following protocols set up a virtual circuit for supporting TCP.pdf
8- The following protocols set up a virtual circuit for supporting TCP.pdf8- The following protocols set up a virtual circuit for supporting TCP.pdf
8- The following protocols set up a virtual circuit for supporting TCP.pdfJohnKyQMorrisont
 
8- The Terrorism Risk and Insurance Act (TRIA) was enacted shortly aft.pdf
8- The Terrorism Risk and Insurance Act (TRIA) was enacted shortly aft.pdf8- The Terrorism Risk and Insurance Act (TRIA) was enacted shortly aft.pdf
8- The Terrorism Risk and Insurance Act (TRIA) was enacted shortly aft.pdfJohnKyQMorrisont
 
8- Recognize the characteristics of inflammation- 9- Cite and interpre.pdf
8- Recognize the characteristics of inflammation- 9- Cite and interpre.pdf8- Recognize the characteristics of inflammation- 9- Cite and interpre.pdf
8- Recognize the characteristics of inflammation- 9- Cite and interpre.pdfJohnKyQMorrisont
 
8- Name and explain one element of powerful listening skills- 9- Discu.pdf
8- Name and explain one element of powerful listening skills- 9- Discu.pdf8- Name and explain one element of powerful listening skills- 9- Discu.pdf
8- Name and explain one element of powerful listening skills- 9- Discu.pdfJohnKyQMorrisont
 
79 Pest Control Methods pertade at werpont- and so does not iffect sep (1).pdf
79 Pest Control Methods pertade at werpont- and so does not iffect sep (1).pdf79 Pest Control Methods pertade at werpont- and so does not iffect sep (1).pdf
79 Pest Control Methods pertade at werpont- and so does not iffect sep (1).pdfJohnKyQMorrisont
 
71- Economic growth typically results in longer life expectancies- F.pdf
71- Economic growth typically results in longer life expectancies-   F.pdf71- Economic growth typically results in longer life expectancies-   F.pdf
71- Economic growth typically results in longer life expectancies- F.pdfJohnKyQMorrisont
 
79 Pest Control Methods pertade at werpont- and so does not iffect sep.pdf
79 Pest Control Methods pertade at werpont- and so does not iffect sep.pdf79 Pest Control Methods pertade at werpont- and so does not iffect sep.pdf
79 Pest Control Methods pertade at werpont- and so does not iffect sep.pdfJohnKyQMorrisont
 
7-29 Bird songs- Bird songs have been hypothesized to be a secondary s.pdf
7-29 Bird songs- Bird songs have been hypothesized to be a secondary s.pdf7-29 Bird songs- Bird songs have been hypothesized to be a secondary s.pdf
7-29 Bird songs- Bird songs have been hypothesized to be a secondary s.pdfJohnKyQMorrisont
 
7-1 In order to implement the classic DoS flood attack- the attacker m.pdf
7-1 In order to implement the classic DoS flood attack- the attacker m.pdf7-1 In order to implement the classic DoS flood attack- the attacker m.pdf
7-1 In order to implement the classic DoS flood attack- the attacker m.pdfJohnKyQMorrisont
 
7- What is the main disadvantages of k-means clustering method-2- Show.pdf
7- What is the main disadvantages of k-means clustering method-2- Show.pdf7- What is the main disadvantages of k-means clustering method-2- Show.pdf
7- What is the main disadvantages of k-means clustering method-2- Show.pdfJohnKyQMorrisont
 

More from JohnKyQMorrisont (20)

A capital gain results when you sell an asset for less than you paid f.pdf
A capital gain results when you sell an asset for less than you paid f.pdfA capital gain results when you sell an asset for less than you paid f.pdf
A capital gain results when you sell an asset for less than you paid f.pdf
 
A bacteria living in Antarctica would have what types of hydrocarbon t.pdf
A bacteria living in Antarctica would have what types of hydrocarbon t.pdfA bacteria living in Antarctica would have what types of hydrocarbon t.pdf
A bacteria living in Antarctica would have what types of hydrocarbon t.pdf
 
A 2019 article in the New York Times was headlined- -Trump Thinks Doll.pdf
A 2019 article in the New York Times was headlined- -Trump Thinks Doll.pdfA 2019 article in the New York Times was headlined- -Trump Thinks Doll.pdf
A 2019 article in the New York Times was headlined- -Trump Thinks Doll.pdf
 
A 17-year-old Senior High School student visited the clinic for consul.pdf
A 17-year-old Senior High School student visited the clinic for consul.pdfA 17-year-old Senior High School student visited the clinic for consul.pdf
A 17-year-old Senior High School student visited the clinic for consul.pdf
 
9- What was your unknown- Which test(s) helped you determine its ident.pdf
9- What was your unknown- Which test(s) helped you determine its ident.pdf9- What was your unknown- Which test(s) helped you determine its ident.pdf
9- What was your unknown- Which test(s) helped you determine its ident.pdf
 
9- Describe the process of performing a general survey 10- Demonstrate.pdf
9- Describe the process of performing a general survey 10- Demonstrate.pdf9- Describe the process of performing a general survey 10- Demonstrate.pdf
9- Describe the process of performing a general survey 10- Demonstrate.pdf
 
8-00- 3) Condenisel financial dats of Kitches Giadyets Ceempany appear.pdf
8-00- 3) Condenisel financial dats of Kitches Giadyets Ceempany appear.pdf8-00- 3) Condenisel financial dats of Kitches Giadyets Ceempany appear.pdf
8-00- 3) Condenisel financial dats of Kitches Giadyets Ceempany appear.pdf
 
8- Waterworld- 1995- A- What created the monster (and or evil situatio.pdf
8- Waterworld- 1995- A- What created the monster (and or evil situatio.pdf8- Waterworld- 1995- A- What created the monster (and or evil situatio.pdf
8- Waterworld- 1995- A- What created the monster (and or evil situatio.pdf
 
8- The languase is recongnized by the Followins N NA( is anther notati.pdf
8- The languase is recongnized by the Followins N NA( is anther notati.pdf8- The languase is recongnized by the Followins N NA( is anther notati.pdf
8- The languase is recongnized by the Followins N NA( is anther notati.pdf
 
8- The larpest assat eategory of iile inturers in and the largest Haba.pdf
8- The larpest assat eategory of iile inturers in and the largest Haba.pdf8- The larpest assat eategory of iile inturers in and the largest Haba.pdf
8- The larpest assat eategory of iile inturers in and the largest Haba.pdf
 
8- The following protocols set up a virtual circuit for supporting TCP.pdf
8- The following protocols set up a virtual circuit for supporting TCP.pdf8- The following protocols set up a virtual circuit for supporting TCP.pdf
8- The following protocols set up a virtual circuit for supporting TCP.pdf
 
8- The Terrorism Risk and Insurance Act (TRIA) was enacted shortly aft.pdf
8- The Terrorism Risk and Insurance Act (TRIA) was enacted shortly aft.pdf8- The Terrorism Risk and Insurance Act (TRIA) was enacted shortly aft.pdf
8- The Terrorism Risk and Insurance Act (TRIA) was enacted shortly aft.pdf
 
8- Recognize the characteristics of inflammation- 9- Cite and interpre.pdf
8- Recognize the characteristics of inflammation- 9- Cite and interpre.pdf8- Recognize the characteristics of inflammation- 9- Cite and interpre.pdf
8- Recognize the characteristics of inflammation- 9- Cite and interpre.pdf
 
8- Name and explain one element of powerful listening skills- 9- Discu.pdf
8- Name and explain one element of powerful listening skills- 9- Discu.pdf8- Name and explain one element of powerful listening skills- 9- Discu.pdf
8- Name and explain one element of powerful listening skills- 9- Discu.pdf
 
79 Pest Control Methods pertade at werpont- and so does not iffect sep (1).pdf
79 Pest Control Methods pertade at werpont- and so does not iffect sep (1).pdf79 Pest Control Methods pertade at werpont- and so does not iffect sep (1).pdf
79 Pest Control Methods pertade at werpont- and so does not iffect sep (1).pdf
 
71- Economic growth typically results in longer life expectancies- F.pdf
71- Economic growth typically results in longer life expectancies-   F.pdf71- Economic growth typically results in longer life expectancies-   F.pdf
71- Economic growth typically results in longer life expectancies- F.pdf
 
79 Pest Control Methods pertade at werpont- and so does not iffect sep.pdf
79 Pest Control Methods pertade at werpont- and so does not iffect sep.pdf79 Pest Control Methods pertade at werpont- and so does not iffect sep.pdf
79 Pest Control Methods pertade at werpont- and so does not iffect sep.pdf
 
7-29 Bird songs- Bird songs have been hypothesized to be a secondary s.pdf
7-29 Bird songs- Bird songs have been hypothesized to be a secondary s.pdf7-29 Bird songs- Bird songs have been hypothesized to be a secondary s.pdf
7-29 Bird songs- Bird songs have been hypothesized to be a secondary s.pdf
 
7-1 In order to implement the classic DoS flood attack- the attacker m.pdf
7-1 In order to implement the classic DoS flood attack- the attacker m.pdf7-1 In order to implement the classic DoS flood attack- the attacker m.pdf
7-1 In order to implement the classic DoS flood attack- the attacker m.pdf
 
7- What is the main disadvantages of k-means clustering method-2- Show.pdf
7- What is the main disadvantages of k-means clustering method-2- Show.pdf7- What is the main disadvantages of k-means clustering method-2- Show.pdf
7- What is the main disadvantages of k-means clustering method-2- Show.pdf
 

Recently uploaded

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
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
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
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Recently uploaded (20)

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
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).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
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
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🔝
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

8-7- Modify exercise 7-2 on comparing strings so it is now done in a G.pdf

  • 1. 8-7. Modify exercise 7-2 on comparing strings so it is now done in a GUI application frame class definition with a main instead of a console application. The GUI components will be data fields of the class definition. The prompts will now be in labels and the input will now be textfields. The user will hit enter in the second textfield to get the results in two other answer labels. The results (which is greater and the difference amount) will be in these two other answer labels. Declare everything at the top, use the constructor to add the components to your container (use background and foreground colors and the flow layout), and use actionPerformed to do three things: get the text out of the textfields for the two strings (instead of readLines), to perform the nested if else with the comparisons, and the setting of the answers in the two answer labels - which is greater and the difference (instead of printlns). Use a little main method to construct yourself. Set the size so the components flow properly (make sure labels are next to textfields, etc.) and there is not a lot of extra space. Take a picture of the output GUI frame with <Alt><PrtScr> which will copy the frame, paste into paint, and save as a .jpg file. Attach the . java program file .jpg output file and submit. * Bil1 Wohlleber zxercise 7 2 This program will compare 2 strings / mport java. io. ublic class ex72 public static void main(String[] args) throws IOException { String s1, s2; BufferedReader br = new BufferedReader (new InputStreamReader (System. in)); System. out. print ("Enter a string: "); s 1 = br. readLine () ; System. out. print("Enter a string: "); s 2 = br. readLine () ; if ( s 1 . equals ( s 2 )) // s 1 == s 2 System. out. println( "Same string"); else if (sl. equalsIgnoreCase (s2)) System. out. println ("Same string - different case"); else if ( s 1 . compareTo ( s 2 ) > 0 ) // s 1 > s 2 System. out. println ( s 1 + + is alphabetically greater than " + s 2 ) else // s 1 < s 2 System. out. println (s1 + " is alphabetically less than " + s 2 ) System. out. println ("Difference is " + sl. compareTo (s2)); }