SlideShare uma empresa Scribd logo
1 de 2
Three letter acronyms are common in the business world. For example, in Java you use the IDE
(Integrated Development Environment) in the JDK (Java Development Kit) to write programs
used by the JVM (Java Virtual Machine) that you might send over a LAN (local area network).
Programmers even use the acronym TLA to stand for three-letter acronym. Write a program that
allows a user to enter three words, and display the appropriate three-letter acronym in all
uppercase letters. If the user enters more than three words, ignore the extra words. Figure 7-22
shows a typical execution. Save the file as ThreeLetterAcronym.java.
Solution
import javax.swing.JOptionPane;
import java.lang.*;
public class ThreeLetterAcronym
{
public static void main(String[] args)
{
String name;
String oneLtr = "";
String twoLtr = "";
String threeLtr = "";
String saveOriginalWord;
int stringLength;
int i;
char c;
name = JOptionPane.showInputDialog(null,"Please enter three words");
saveOriginalWord = name;
stringLength = name.length();
oneLtr = name.charAt(0);
for (i=0;i<stringLength;i++)
{
int a = 1;
c = name.charAt(i);
if(Character.isWhiteSpace(c))
if (a <= 1) twoLtr = name.charAt(c+1);
else if (a <= 2)threeLtr = (c+2);
name = oneLtr+twoLtr+threLtr;
}
JOptionPane.showMessageDialog(null, "Original phrase was "
+ saveOriginalWord + " Three letter Acronym is " + name);
}
}

Mais conteúdo relacionado

Semelhante a Three letter acronyms are common in the business world- For example- i.docx

Basics java programing
Basics java programingBasics java programing
Basics java programingDarshan Gohel
 
Core java &collections
Core java &collectionsCore java &collections
Core java &collectionsRavi varma
 
Java programming basics
Java programming basicsJava programming basics
Java programming basicsHamid Ghorbani
 
Java for Mainframers
Java for MainframersJava for Mainframers
Java for MainframersRich Helton
 
Writing code that writes code - Nguyen Luong
Writing code that writes code - Nguyen LuongWriting code that writes code - Nguyen Luong
Writing code that writes code - Nguyen LuongVu Huy
 
TechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen LuongTechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen LuongGrokking VN
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsMahika Tutorials
 
Examples from Pune meetup
Examples from Pune meetupExamples from Pune meetup
Examples from Pune meetupSantosh Ojha
 
Std 12 Computer Chapter 7 Java Basics (Part 1)
Std 12 Computer Chapter 7 Java Basics (Part 1)Std 12 Computer Chapter 7 Java Basics (Part 1)
Std 12 Computer Chapter 7 Java Basics (Part 1)Nuzhat Memon
 
Deggan Android Codestyle v1.0
Deggan Android Codestyle v1.0Deggan Android Codestyle v1.0
Deggan Android Codestyle v1.0Fenton Martin
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manualnahalomar
 
Java OOP Concepts 1st Slide
Java OOP Concepts 1st SlideJava OOP Concepts 1st Slide
Java OOP Concepts 1st Slidesunny khan
 

Semelhante a Three letter acronyms are common in the business world- For example- i.docx (20)

Basics java programing
Basics java programingBasics java programing
Basics java programing
 
Java 17
Java 17Java 17
Java 17
 
Core java
Core java Core java
Core java
 
Core java &collections
Core java &collectionsCore java &collections
Core java &collections
 
Core java1
Core java1Core java1
Core java1
 
Java programming basics
Java programming basicsJava programming basics
Java programming basics
 
Java for Mainframers
Java for MainframersJava for Mainframers
Java for Mainframers
 
Writing code that writes code - Nguyen Luong
Writing code that writes code - Nguyen LuongWriting code that writes code - Nguyen Luong
Writing code that writes code - Nguyen Luong
 
TechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen LuongTechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
 
Examples from Pune meetup
Examples from Pune meetupExamples from Pune meetup
Examples from Pune meetup
 
Hello java
Hello java   Hello java
Hello java
 
Hello Java-First Level
Hello Java-First LevelHello Java-First Level
Hello Java-First Level
 
Hello java
Hello java  Hello java
Hello java
 
Std 12 Computer Chapter 7 Java Basics (Part 1)
Std 12 Computer Chapter 7 Java Basics (Part 1)Std 12 Computer Chapter 7 Java Basics (Part 1)
Std 12 Computer Chapter 7 Java Basics (Part 1)
 
C Programming - Refresher - Part IV
C Programming - Refresher - Part IVC Programming - Refresher - Part IV
C Programming - Refresher - Part IV
 
Java_presesntation.ppt
Java_presesntation.pptJava_presesntation.ppt
Java_presesntation.ppt
 
Deggan Android Codestyle v1.0
Deggan Android Codestyle v1.0Deggan Android Codestyle v1.0
Deggan Android Codestyle v1.0
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manual
 
Java OOP Concepts 1st Slide
Java OOP Concepts 1st SlideJava OOP Concepts 1st Slide
Java OOP Concepts 1st Slide
 

Mais de gtameka

TOPIC- Landslide early warning in Costa Rica- Students are required to (1).docx
TOPIC- Landslide early warning in Costa Rica- Students are required to (1).docxTOPIC- Landslide early warning in Costa Rica- Students are required to (1).docx
TOPIC- Landslide early warning in Costa Rica- Students are required to (1).docxgtameka
 
Topic option 2- What should the rules be for computer crime- Your pape.docx
Topic option 2- What should the rules be for computer crime- Your pape.docxTopic option 2- What should the rules be for computer crime- Your pape.docx
Topic option 2- What should the rules be for computer crime- Your pape.docxgtameka
 
Tones Company purchased a warehouse in a downtown district where land.docx
Tones Company purchased a warehouse in a downtown district where land.docxTones Company purchased a warehouse in a downtown district where land.docx
Tones Company purchased a warehouse in a downtown district where land.docxgtameka
 
Tones Industries has the following patents on its December 31- 2013- b.docx
Tones Industries has the following patents on its December 31- 2013- b.docxTones Industries has the following patents on its December 31- 2013- b.docx
Tones Industries has the following patents on its December 31- 2013- b.docxgtameka
 
Toni Tornan is a single parent- During 2014 she earned wages $26-550-.docx
Toni Tornan is a single parent- During 2014 she earned wages $26-550-.docxToni Tornan is a single parent- During 2014 she earned wages $26-550-.docx
Toni Tornan is a single parent- During 2014 she earned wages $26-550-.docxgtameka
 
Toms construction site has a pipe that discharges run off from the sit.docx
Toms construction site has a pipe that discharges run off from the sit.docxToms construction site has a pipe that discharges run off from the sit.docx
Toms construction site has a pipe that discharges run off from the sit.docxgtameka
 
To achieve long-term prosperity- strategic planners commonly establish.docx
To achieve long-term prosperity- strategic planners commonly establish.docxTo achieve long-term prosperity- strategic planners commonly establish.docx
To achieve long-term prosperity- strategic planners commonly establish.docxgtameka
 
Tiffany MacGraw- a Canadian citizen- left Canada in 2005 to settle in.docx
Tiffany MacGraw- a Canadian citizen- left Canada in 2005 to settle in.docxTiffany MacGraw- a Canadian citizen- left Canada in 2005 to settle in.docx
Tiffany MacGraw- a Canadian citizen- left Canada in 2005 to settle in.docxgtameka
 
True or false- Social networking through such services as Facebook- Tw.docx
True or false- Social networking through such services as Facebook- Tw.docxTrue or false- Social networking through such services as Facebook- Tw.docx
True or false- Social networking through such services as Facebook- Tw.docxgtameka
 
True or False- In a proprietary system- a commercial vendor opens thei.docx
True or False- In a proprietary system- a commercial vendor opens thei.docxTrue or False- In a proprietary system- a commercial vendor opens thei.docx
True or False- In a proprietary system- a commercial vendor opens thei.docxgtameka
 
TRUE OR FALSE- 1- N- a nonresident alien individual- was born in Count.docx
TRUE OR FALSE- 1- N- a nonresident alien individual- was born in Count.docxTRUE OR FALSE- 1- N- a nonresident alien individual- was born in Count.docx
TRUE OR FALSE- 1- N- a nonresident alien individual- was born in Count.docxgtameka
 
True or False Explain Why- 1- SIP and RTP are protocols used to allow.docx
True or False Explain Why- 1- SIP and RTP are protocols used to allow.docxTrue or False Explain Why- 1- SIP and RTP are protocols used to allow.docx
True or False Explain Why- 1- SIP and RTP are protocols used to allow.docxgtameka
 
True or False 1- The interstellar medium is composed mostly of gaseous.docx
True or False 1- The interstellar medium is composed mostly of gaseous.docxTrue or False 1- The interstellar medium is composed mostly of gaseous.docx
True or False 1- The interstellar medium is composed mostly of gaseous.docxgtameka
 
True or False (1 point each) 1- TorF NOs is the only form of nitrogen.docx
True or False (1 point each) 1- TorF NOs is the only form of nitrogen.docxTrue or False (1 point each) 1- TorF NOs is the only form of nitrogen.docx
True or False (1 point each) 1- TorF NOs is the only form of nitrogen.docxgtameka
 
Transform the E-R diagram into a set of relations- Parking Tickets Ta.docx
Transform the E-R diagram into a set of relations-  Parking Tickets Ta.docxTransform the E-R diagram into a set of relations-  Parking Tickets Ta.docx
Transform the E-R diagram into a set of relations- Parking Tickets Ta.docxgtameka
 
Trace the evolution of the US police system from the --political-- era.docx
Trace the evolution of the US police system from the --political-- era.docxTrace the evolution of the US police system from the --political-- era.docx
Trace the evolution of the US police system from the --political-- era.docxgtameka
 
Trace the following part of codes step by step- Show exactly what it w.docx
Trace the following part of codes step by step- Show exactly what it w.docxTrace the following part of codes step by step- Show exactly what it w.docx
Trace the following part of codes step by step- Show exactly what it w.docxgtameka
 
Training and DevelopmentSolutionThe various skills that are necessary.docx
Training and DevelopmentSolutionThe various skills that are necessary.docxTraining and DevelopmentSolutionThe various skills that are necessary.docx
Training and DevelopmentSolutionThe various skills that are necessary.docxgtameka
 
Question 1 This layer of the OSI model is responsible for dialog contr.docx
Question 1 This layer of the OSI model is responsible for dialog contr.docxQuestion 1 This layer of the OSI model is responsible for dialog contr.docx
Question 1 This layer of the OSI model is responsible for dialog contr.docxgtameka
 
QUESTION 1 The purpose of an audit is to express an opinion on whether.docx
QUESTION 1 The purpose of an audit is to express an opinion on whether.docxQUESTION 1 The purpose of an audit is to express an opinion on whether.docx
QUESTION 1 The purpose of an audit is to express an opinion on whether.docxgtameka
 

Mais de gtameka (20)

TOPIC- Landslide early warning in Costa Rica- Students are required to (1).docx
TOPIC- Landslide early warning in Costa Rica- Students are required to (1).docxTOPIC- Landslide early warning in Costa Rica- Students are required to (1).docx
TOPIC- Landslide early warning in Costa Rica- Students are required to (1).docx
 
Topic option 2- What should the rules be for computer crime- Your pape.docx
Topic option 2- What should the rules be for computer crime- Your pape.docxTopic option 2- What should the rules be for computer crime- Your pape.docx
Topic option 2- What should the rules be for computer crime- Your pape.docx
 
Tones Company purchased a warehouse in a downtown district where land.docx
Tones Company purchased a warehouse in a downtown district where land.docxTones Company purchased a warehouse in a downtown district where land.docx
Tones Company purchased a warehouse in a downtown district where land.docx
 
Tones Industries has the following patents on its December 31- 2013- b.docx
Tones Industries has the following patents on its December 31- 2013- b.docxTones Industries has the following patents on its December 31- 2013- b.docx
Tones Industries has the following patents on its December 31- 2013- b.docx
 
Toni Tornan is a single parent- During 2014 she earned wages $26-550-.docx
Toni Tornan is a single parent- During 2014 she earned wages $26-550-.docxToni Tornan is a single parent- During 2014 she earned wages $26-550-.docx
Toni Tornan is a single parent- During 2014 she earned wages $26-550-.docx
 
Toms construction site has a pipe that discharges run off from the sit.docx
Toms construction site has a pipe that discharges run off from the sit.docxToms construction site has a pipe that discharges run off from the sit.docx
Toms construction site has a pipe that discharges run off from the sit.docx
 
To achieve long-term prosperity- strategic planners commonly establish.docx
To achieve long-term prosperity- strategic planners commonly establish.docxTo achieve long-term prosperity- strategic planners commonly establish.docx
To achieve long-term prosperity- strategic planners commonly establish.docx
 
Tiffany MacGraw- a Canadian citizen- left Canada in 2005 to settle in.docx
Tiffany MacGraw- a Canadian citizen- left Canada in 2005 to settle in.docxTiffany MacGraw- a Canadian citizen- left Canada in 2005 to settle in.docx
Tiffany MacGraw- a Canadian citizen- left Canada in 2005 to settle in.docx
 
True or false- Social networking through such services as Facebook- Tw.docx
True or false- Social networking through such services as Facebook- Tw.docxTrue or false- Social networking through such services as Facebook- Tw.docx
True or false- Social networking through such services as Facebook- Tw.docx
 
True or False- In a proprietary system- a commercial vendor opens thei.docx
True or False- In a proprietary system- a commercial vendor opens thei.docxTrue or False- In a proprietary system- a commercial vendor opens thei.docx
True or False- In a proprietary system- a commercial vendor opens thei.docx
 
TRUE OR FALSE- 1- N- a nonresident alien individual- was born in Count.docx
TRUE OR FALSE- 1- N- a nonresident alien individual- was born in Count.docxTRUE OR FALSE- 1- N- a nonresident alien individual- was born in Count.docx
TRUE OR FALSE- 1- N- a nonresident alien individual- was born in Count.docx
 
True or False Explain Why- 1- SIP and RTP are protocols used to allow.docx
True or False Explain Why- 1- SIP and RTP are protocols used to allow.docxTrue or False Explain Why- 1- SIP and RTP are protocols used to allow.docx
True or False Explain Why- 1- SIP and RTP are protocols used to allow.docx
 
True or False 1- The interstellar medium is composed mostly of gaseous.docx
True or False 1- The interstellar medium is composed mostly of gaseous.docxTrue or False 1- The interstellar medium is composed mostly of gaseous.docx
True or False 1- The interstellar medium is composed mostly of gaseous.docx
 
True or False (1 point each) 1- TorF NOs is the only form of nitrogen.docx
True or False (1 point each) 1- TorF NOs is the only form of nitrogen.docxTrue or False (1 point each) 1- TorF NOs is the only form of nitrogen.docx
True or False (1 point each) 1- TorF NOs is the only form of nitrogen.docx
 
Transform the E-R diagram into a set of relations- Parking Tickets Ta.docx
Transform the E-R diagram into a set of relations-  Parking Tickets Ta.docxTransform the E-R diagram into a set of relations-  Parking Tickets Ta.docx
Transform the E-R diagram into a set of relations- Parking Tickets Ta.docx
 
Trace the evolution of the US police system from the --political-- era.docx
Trace the evolution of the US police system from the --political-- era.docxTrace the evolution of the US police system from the --political-- era.docx
Trace the evolution of the US police system from the --political-- era.docx
 
Trace the following part of codes step by step- Show exactly what it w.docx
Trace the following part of codes step by step- Show exactly what it w.docxTrace the following part of codes step by step- Show exactly what it w.docx
Trace the following part of codes step by step- Show exactly what it w.docx
 
Training and DevelopmentSolutionThe various skills that are necessary.docx
Training and DevelopmentSolutionThe various skills that are necessary.docxTraining and DevelopmentSolutionThe various skills that are necessary.docx
Training and DevelopmentSolutionThe various skills that are necessary.docx
 
Question 1 This layer of the OSI model is responsible for dialog contr.docx
Question 1 This layer of the OSI model is responsible for dialog contr.docxQuestion 1 This layer of the OSI model is responsible for dialog contr.docx
Question 1 This layer of the OSI model is responsible for dialog contr.docx
 
QUESTION 1 The purpose of an audit is to express an opinion on whether.docx
QUESTION 1 The purpose of an audit is to express an opinion on whether.docxQUESTION 1 The purpose of an audit is to express an opinion on whether.docx
QUESTION 1 The purpose of an audit is to express an opinion on whether.docx
 

Último

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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
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
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 

Último (20)

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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 

Three letter acronyms are common in the business world- For example- i.docx

  • 1. Three letter acronyms are common in the business world. For example, in Java you use the IDE (Integrated Development Environment) in the JDK (Java Development Kit) to write programs used by the JVM (Java Virtual Machine) that you might send over a LAN (local area network). Programmers even use the acronym TLA to stand for three-letter acronym. Write a program that allows a user to enter three words, and display the appropriate three-letter acronym in all uppercase letters. If the user enters more than three words, ignore the extra words. Figure 7-22 shows a typical execution. Save the file as ThreeLetterAcronym.java. Solution import javax.swing.JOptionPane; import java.lang.*; public class ThreeLetterAcronym { public static void main(String[] args) { String name; String oneLtr = ""; String twoLtr = ""; String threeLtr = ""; String saveOriginalWord; int stringLength; int i; char c; name = JOptionPane.showInputDialog(null,"Please enter three words"); saveOriginalWord = name; stringLength = name.length(); oneLtr = name.charAt(0); for (i=0;i<stringLength;i++) { int a = 1; c = name.charAt(i); if(Character.isWhiteSpace(c)) if (a <= 1) twoLtr = name.charAt(c+1); else if (a <= 2)threeLtr = (c+2);
  • 2. name = oneLtr+twoLtr+threLtr; } JOptionPane.showMessageDialog(null, "Original phrase was " + saveOriginalWord + " Three letter Acronym is " + name); } }