SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Get input for a string
Print a header row per the example at the bottom.
Loop through the string printing the following:
The lower case of each character
o The upper case of each character
o The initial case of each letter (case not changed)
The initial case column should print the original letter, not return a value of upper or lower.
o The ASCII value of each character
o The Binary representation of each character broken out in 2 sections of 4 bytes each
I.E. "0110 1000"
Use the Integer wrapper class specifying the radix. Refer to the java docs for more info
o The Hex value of each character output in upper case
§ Use the Integer wrapper class to convert to Hex
Example:
Please enter a string of an length: ExAmPlEsTrInG
Lower Upper Initial ASCII Binary Hex
e E E 101 0110 0101 65
x X x 85 1010 0111 77
ETC......
Solution
import java.io.*;
class Initials
public static void main(String args[])throws IOException
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String s;
char x;
int l;
System.out.print("Enter any sentence: ");
s=" "+s; //adding a space infront of the inputted sentence or a name
s=s.toUpperCase(); //converting the sentence into Upper Case (Capital Letters)
l=s.length(); //finding the length of the sentence</span>
System.out.print("Output = ");
for(int i=0;i<l;i++)
x=s.charAt(i); //taking out one character at a time from the sentence
if(x==' ') //if the character is a space, printing the next Character along with a fullstop
char a='a';
char A='A';
System.out.println((int)a +" "+(int)A);

Weitere ähnliche Inhalte

Ähnlich wie Get input for a string Print a header row per the example at the bott.docx

Csharp4 strings and_regular_expressions
Csharp4 strings and_regular_expressionsCsharp4 strings and_regular_expressions
Csharp4 strings and_regular_expressionsAbed Bukhari
 
9 character string &amp; string library
9  character string &amp; string library9  character string &amp; string library
9 character string &amp; string libraryMomenMostafa
 
Dr. Rajeshree Khande - Java Interactive input
Dr. Rajeshree Khande - Java Interactive inputDr. Rajeshree Khande - Java Interactive input
Dr. Rajeshree Khande - Java Interactive inputjalinder123
 
Dr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive inputDr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive inputDrRajeshreeKhande
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework HelpC++ Homework Help
 
Programming fundamental
Programming fundamentalProgramming fundamental
Programming fundamentalMukesh Thakur
 
module 4_ Lex_new.ppt
module 4_ Lex_new.pptmodule 4_ Lex_new.ppt
module 4_ Lex_new.pptleyobi6147
 
Introduction of flex
Introduction of flexIntroduction of flex
Introduction of flexvip_du
 
Beginning with vi text editor
Beginning with vi text editorBeginning with vi text editor
Beginning with vi text editorJose Pla
 
stringsinpython-181122100212.pdf
stringsinpython-181122100212.pdfstringsinpython-181122100212.pdf
stringsinpython-181122100212.pdfpaijitk
 

Ähnlich wie Get input for a string Print a header row per the example at the bott.docx (20)

C# String
C# StringC# String
C# String
 
14 ruby strings
14 ruby strings14 ruby strings
14 ruby strings
 
Strings
StringsStrings
Strings
 
string in C
string in Cstring in C
string in C
 
Csharp4 strings and_regular_expressions
Csharp4 strings and_regular_expressionsCsharp4 strings and_regular_expressions
Csharp4 strings and_regular_expressions
 
C string
C stringC string
C string
 
9 character string &amp; string library
9  character string &amp; string library9  character string &amp; string library
9 character string &amp; string library
 
Dr. Rajeshree Khande - Java Interactive input
Dr. Rajeshree Khande - Java Interactive inputDr. Rajeshree Khande - Java Interactive input
Dr. Rajeshree Khande - Java Interactive input
 
Dr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive inputDr. Rajeshree Khande Java Interactive input
Dr. Rajeshree Khande Java Interactive input
 
Computer programming 2 Lesson 12
Computer programming 2  Lesson 12Computer programming 2  Lesson 12
Computer programming 2 Lesson 12
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework Help
 
MySQL String Functions.pptx
MySQL String Functions.pptxMySQL String Functions.pptx
MySQL String Functions.pptx
 
05 c++-strings
05 c++-strings05 c++-strings
05 c++-strings
 
Programming fundamental
Programming fundamentalProgramming fundamental
Programming fundamental
 
module 4_ Lex_new.ppt
module 4_ Lex_new.pptmodule 4_ Lex_new.ppt
module 4_ Lex_new.ppt
 
Introduction of flex
Introduction of flexIntroduction of flex
Introduction of flex
 
Beginning with vi text editor
Beginning with vi text editorBeginning with vi text editor
Beginning with vi text editor
 
Strings
StringsStrings
Strings
 
stringsinpython-181122100212.pdf
stringsinpython-181122100212.pdfstringsinpython-181122100212.pdf
stringsinpython-181122100212.pdf
 
Python ppt
Python pptPython ppt
Python ppt
 

Mehr von delicecogupdyke

You have been learning about Urie Bronfenbrenner this week- Let's mak.docx
You have been learning about Urie Bronfenbrenner this week-  Let's mak.docxYou have been learning about Urie Bronfenbrenner this week-  Let's mak.docx
You have been learning about Urie Bronfenbrenner this week- Let's mak.docxdelicecogupdyke
 
You encounter a flat green organism growing on a rock with no obvious.docx
You encounter a flat green organism growing on a rock with no obvious.docxYou encounter a flat green organism growing on a rock with no obvious.docx
You encounter a flat green organism growing on a rock with no obvious.docxdelicecogupdyke
 
You are the PR specialist for St- John's Ambulance- The organization w.docx
You are the PR specialist for St- John's Ambulance- The organization w.docxYou are the PR specialist for St- John's Ambulance- The organization w.docx
You are the PR specialist for St- John's Ambulance- The organization w.docxdelicecogupdyke
 
You are the CFO of a large academic medical center and your organizati (1).docx
You are the CFO of a large academic medical center and your organizati (1).docxYou are the CFO of a large academic medical center and your organizati (1).docx
You are the CFO of a large academic medical center and your organizati (1).docxdelicecogupdyke
 
You are on a field trip with your bio class- Your water sample from a.docx
You are on a field trip with your bio class- Your water sample from a.docxYou are on a field trip with your bio class- Your water sample from a.docx
You are on a field trip with your bio class- Your water sample from a.docxdelicecogupdyke
 
You are fortunate to travel to a tropical forest- You find an insect o.docx
You are fortunate to travel to a tropical forest- You find an insect o.docxYou are fortunate to travel to a tropical forest- You find an insect o.docx
You are fortunate to travel to a tropical forest- You find an insect o.docxdelicecogupdyke
 
You are a Government employee working in the Human Resources departmen.docx
You are a Government employee working in the Human Resources departmen.docxYou are a Government employee working in the Human Resources departmen.docx
You are a Government employee working in the Human Resources departmen.docxdelicecogupdyke
 
You are a genetic cownselar- A single mother cnmes to vou- where both.docx
You are a genetic cownselar- A single mother cnmes to vou- where both.docxYou are a genetic cownselar- A single mother cnmes to vou- where both.docx
You are a genetic cownselar- A single mother cnmes to vou- where both.docxdelicecogupdyke
 
Write the following report that can be a powerpoint presentation-The g.docx
Write the following report that can be a powerpoint presentation-The g.docxWrite the following report that can be a powerpoint presentation-The g.docx
Write the following report that can be a powerpoint presentation-The g.docxdelicecogupdyke
 
Write two functions using the Front and Back Linear Search algorithms-.docx
Write two functions using the Front and Back Linear Search algorithms-.docxWrite two functions using the Front and Back Linear Search algorithms-.docx
Write two functions using the Front and Back Linear Search algorithms-.docxdelicecogupdyke
 
xpected to grow geometrically- (Assume that interactions ith other spe.docx
xpected to grow geometrically- (Assume that interactions ith other spe.docxxpected to grow geometrically- (Assume that interactions ith other spe.docx
xpected to grow geometrically- (Assume that interactions ith other spe.docxdelicecogupdyke
 
Write the pseudocode for Python for the following- from Celsius to Fah.docx
Write the pseudocode for Python for the following- from Celsius to Fah.docxWrite the pseudocode for Python for the following- from Celsius to Fah.docx
Write the pseudocode for Python for the following- from Celsius to Fah.docxdelicecogupdyke
 
Write the definition of the linkedListKeepLast function- (Please write.docx
Write the definition of the linkedListKeepLast function- (Please write.docxWrite the definition of the linkedListKeepLast function- (Please write.docx
Write the definition of the linkedListKeepLast function- (Please write.docxdelicecogupdyke
 
Write SQL commands that convert the Database schema to Tables with the.docx
Write SQL commands that convert the Database schema to Tables with the.docxWrite SQL commands that convert the Database schema to Tables with the.docx
Write SQL commands that convert the Database schema to Tables with the.docxdelicecogupdyke
 
write the adjusting entries for following Given Data-.docx
write the adjusting entries for following    Given Data-.docxwrite the adjusting entries for following    Given Data-.docx
write the adjusting entries for following Given Data-.docxdelicecogupdyke
 
Write python code to collect 1000 posts from Twitter- or Facebook- or.docx
Write python code to collect 1000 posts from Twitter- or Facebook- or.docxWrite python code to collect 1000 posts from Twitter- or Facebook- or.docx
Write python code to collect 1000 posts from Twitter- or Facebook- or.docxdelicecogupdyke
 
write one to two paragraphs on the significance about Jati Explain how.docx
write one to two paragraphs on the significance about Jati Explain how.docxwrite one to two paragraphs on the significance about Jati Explain how.docx
write one to two paragraphs on the significance about Jati Explain how.docxdelicecogupdyke
 
Write in C++ Calculate the mean of a vector of floating point numbers.docx
Write in C++ Calculate the mean of a vector of floating point numbers.docxWrite in C++ Calculate the mean of a vector of floating point numbers.docx
Write in C++ Calculate the mean of a vector of floating point numbers.docxdelicecogupdyke
 
Write down the code that will count the number of clicks for a LIKE bu.docx
Write down the code that will count the number of clicks for a LIKE bu.docxWrite down the code that will count the number of clicks for a LIKE bu.docx
Write down the code that will count the number of clicks for a LIKE bu.docxdelicecogupdyke
 
Write declarations for variables p1 and p2 whose values will be addres.docx
Write declarations for variables p1 and p2 whose values will be addres.docxWrite declarations for variables p1 and p2 whose values will be addres.docx
Write declarations for variables p1 and p2 whose values will be addres.docxdelicecogupdyke
 

Mehr von delicecogupdyke (20)

You have been learning about Urie Bronfenbrenner this week- Let's mak.docx
You have been learning about Urie Bronfenbrenner this week-  Let's mak.docxYou have been learning about Urie Bronfenbrenner this week-  Let's mak.docx
You have been learning about Urie Bronfenbrenner this week- Let's mak.docx
 
You encounter a flat green organism growing on a rock with no obvious.docx
You encounter a flat green organism growing on a rock with no obvious.docxYou encounter a flat green organism growing on a rock with no obvious.docx
You encounter a flat green organism growing on a rock with no obvious.docx
 
You are the PR specialist for St- John's Ambulance- The organization w.docx
You are the PR specialist for St- John's Ambulance- The organization w.docxYou are the PR specialist for St- John's Ambulance- The organization w.docx
You are the PR specialist for St- John's Ambulance- The organization w.docx
 
You are the CFO of a large academic medical center and your organizati (1).docx
You are the CFO of a large academic medical center and your organizati (1).docxYou are the CFO of a large academic medical center and your organizati (1).docx
You are the CFO of a large academic medical center and your organizati (1).docx
 
You are on a field trip with your bio class- Your water sample from a.docx
You are on a field trip with your bio class- Your water sample from a.docxYou are on a field trip with your bio class- Your water sample from a.docx
You are on a field trip with your bio class- Your water sample from a.docx
 
You are fortunate to travel to a tropical forest- You find an insect o.docx
You are fortunate to travel to a tropical forest- You find an insect o.docxYou are fortunate to travel to a tropical forest- You find an insect o.docx
You are fortunate to travel to a tropical forest- You find an insect o.docx
 
You are a Government employee working in the Human Resources departmen.docx
You are a Government employee working in the Human Resources departmen.docxYou are a Government employee working in the Human Resources departmen.docx
You are a Government employee working in the Human Resources departmen.docx
 
You are a genetic cownselar- A single mother cnmes to vou- where both.docx
You are a genetic cownselar- A single mother cnmes to vou- where both.docxYou are a genetic cownselar- A single mother cnmes to vou- where both.docx
You are a genetic cownselar- A single mother cnmes to vou- where both.docx
 
Write the following report that can be a powerpoint presentation-The g.docx
Write the following report that can be a powerpoint presentation-The g.docxWrite the following report that can be a powerpoint presentation-The g.docx
Write the following report that can be a powerpoint presentation-The g.docx
 
Write two functions using the Front and Back Linear Search algorithms-.docx
Write two functions using the Front and Back Linear Search algorithms-.docxWrite two functions using the Front and Back Linear Search algorithms-.docx
Write two functions using the Front and Back Linear Search algorithms-.docx
 
xpected to grow geometrically- (Assume that interactions ith other spe.docx
xpected to grow geometrically- (Assume that interactions ith other spe.docxxpected to grow geometrically- (Assume that interactions ith other spe.docx
xpected to grow geometrically- (Assume that interactions ith other spe.docx
 
Write the pseudocode for Python for the following- from Celsius to Fah.docx
Write the pseudocode for Python for the following- from Celsius to Fah.docxWrite the pseudocode for Python for the following- from Celsius to Fah.docx
Write the pseudocode for Python for the following- from Celsius to Fah.docx
 
Write the definition of the linkedListKeepLast function- (Please write.docx
Write the definition of the linkedListKeepLast function- (Please write.docxWrite the definition of the linkedListKeepLast function- (Please write.docx
Write the definition of the linkedListKeepLast function- (Please write.docx
 
Write SQL commands that convert the Database schema to Tables with the.docx
Write SQL commands that convert the Database schema to Tables with the.docxWrite SQL commands that convert the Database schema to Tables with the.docx
Write SQL commands that convert the Database schema to Tables with the.docx
 
write the adjusting entries for following Given Data-.docx
write the adjusting entries for following    Given Data-.docxwrite the adjusting entries for following    Given Data-.docx
write the adjusting entries for following Given Data-.docx
 
Write python code to collect 1000 posts from Twitter- or Facebook- or.docx
Write python code to collect 1000 posts from Twitter- or Facebook- or.docxWrite python code to collect 1000 posts from Twitter- or Facebook- or.docx
Write python code to collect 1000 posts from Twitter- or Facebook- or.docx
 
write one to two paragraphs on the significance about Jati Explain how.docx
write one to two paragraphs on the significance about Jati Explain how.docxwrite one to two paragraphs on the significance about Jati Explain how.docx
write one to two paragraphs on the significance about Jati Explain how.docx
 
Write in C++ Calculate the mean of a vector of floating point numbers.docx
Write in C++ Calculate the mean of a vector of floating point numbers.docxWrite in C++ Calculate the mean of a vector of floating point numbers.docx
Write in C++ Calculate the mean of a vector of floating point numbers.docx
 
Write down the code that will count the number of clicks for a LIKE bu.docx
Write down the code that will count the number of clicks for a LIKE bu.docxWrite down the code that will count the number of clicks for a LIKE bu.docx
Write down the code that will count the number of clicks for a LIKE bu.docx
 
Write declarations for variables p1 and p2 whose values will be addres.docx
Write declarations for variables p1 and p2 whose values will be addres.docxWrite declarations for variables p1 and p2 whose values will be addres.docx
Write declarations for variables p1 and p2 whose values will be addres.docx
 

Kürzlich hochgeladen

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status 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
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
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
 
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
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Kürzlich hochgeladen (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status 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
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
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
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
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
 
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
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

Get input for a string Print a header row per the example at the bott.docx

  • 1. Get input for a string Print a header row per the example at the bottom. Loop through the string printing the following: The lower case of each character o The upper case of each character o The initial case of each letter (case not changed) The initial case column should print the original letter, not return a value of upper or lower. o The ASCII value of each character o The Binary representation of each character broken out in 2 sections of 4 bytes each I.E. "0110 1000" Use the Integer wrapper class specifying the radix. Refer to the java docs for more info o The Hex value of each character output in upper case § Use the Integer wrapper class to convert to Hex Example: Please enter a string of an length: ExAmPlEsTrInG Lower Upper Initial ASCII Binary Hex e E E 101 0110 0101 65 x X x 85 1010 0111 77 ETC...... Solution import java.io.*; class Initials public static void main(String args[])throws IOException BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String s; char x;
  • 2. int l; System.out.print("Enter any sentence: "); s=" "+s; //adding a space infront of the inputted sentence or a name s=s.toUpperCase(); //converting the sentence into Upper Case (Capital Letters) l=s.length(); //finding the length of the sentence</span> System.out.print("Output = "); for(int i=0;i<l;i++) x=s.charAt(i); //taking out one character at a time from the sentence if(x==' ') //if the character is a space, printing the next Character along with a fullstop char a='a'; char A='A'; System.out.println((int)a +" "+(int)A);