SlideShare a Scribd company logo
In JAVA how do you encode and print each sentence in the file using a basic Caesar Cipher.
- Encode the characters by shifting their Unicode value by 5
- For example if we encoded the character 'A' with a shift of 5 it would become the character 'F'
- For example if we encoded the character 'X' with a shift of 5 it would become the character ']'
- Spaces should be printed but not encoded
- Use the method caesarCipher
Write each encoded sentence to a new text file called encoded.txt
- If a IOException is thrown catch the exception and alert the user of the error
- Use the method encodedFile
(The main method cannot be set to throw any exceptions. The text file will contain multiple lines
and each line will correspond to a single sentence.)
Sample Output:
Ex: If input is:
anexample.txt
the output is:
Please enter the name of the file:
It tw it sty1 ymjwj nx st yw~&
Qnkj nx f qtsl qjxxts ns mzrnqny~3
Ex: If input is:
anexample2.txt
the output is:
Please enter the name of the file:
Mjqqt Qnq~1 ~tz itnsl |jqqD
N,r knsj&&&&&
Qnkj nx tzwx yt gj xujsy1 sty yt gj xf{ji3
j mf{j mtuj3333 Wjgjqqntsx fwj gznqy ts mtuj3333
N kfnqji r~ |f~ yt xzhhjxx3
Ex: If the input is:
WrongFileName
the output is:
File does not exist
In JAVA how do you encode and print each sentence in the file using a.pdf

More Related Content

Similar to In JAVA how do you encode and print each sentence in the file using a.pdf

STRINGS IN PYTHON
STRINGS IN PYTHONSTRINGS IN PYTHON
STRINGS IN PYTHON
TanushTM1
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
Mahika Tutorials
 
Py-Slides-9.ppt
Py-Slides-9.pptPy-Slides-9.ppt
Py-Slides-9.ppt
wulanpermatasari27
 
Python ppt_118.pptx
Python ppt_118.pptxPython ppt_118.pptx
Python ppt_118.pptx
MadhuriAnaparthy
 
Syntax analysis
Syntax analysisSyntax analysis
Lab4 scripts
Lab4 scriptsLab4 scripts
Lab4 scripts
quantumleaf
 
Python assignment 4
Python assignment 4Python assignment 4
Python assignment 4
ANILBIKAS
 
JCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTSJCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTS
Joseph Kuo
 
A Quick Taste of C
A Quick Taste of CA Quick Taste of C
A Quick Taste of C
jeremyrand
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Mufaddal Haidermota
 
Shell programming
Shell programmingShell programming
Shell programming
Moayad Moawiah
 
4 text file
4 text file4 text file
4 text file
hasan Mohammad
 
05 c++-strings
05 c++-strings05 c++-strings
05 c++-strings
Kelly Swanson
 
Python
PythonPython
Python
MeHak Gulati
 
Advanced perl finer points ,pack&unpack,eval,files
Advanced perl   finer points ,pack&unpack,eval,filesAdvanced perl   finer points ,pack&unpack,eval,files
Advanced perl finer points ,pack&unpack,eval,files
Shankar D
 

Similar to In JAVA how do you encode and print each sentence in the file using a.pdf (15)

STRINGS IN PYTHON
STRINGS IN PYTHONSTRINGS IN PYTHON
STRINGS IN PYTHON
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
 
Py-Slides-9.ppt
Py-Slides-9.pptPy-Slides-9.ppt
Py-Slides-9.ppt
 
Python ppt_118.pptx
Python ppt_118.pptxPython ppt_118.pptx
Python ppt_118.pptx
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Lab4 scripts
Lab4 scriptsLab4 scripts
Lab4 scripts
 
Python assignment 4
Python assignment 4Python assignment 4
Python assignment 4
 
JCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTSJCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTS
 
A Quick Taste of C
A Quick Taste of CA Quick Taste of C
A Quick Taste of C
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Shell programming
Shell programmingShell programming
Shell programming
 
4 text file
4 text file4 text file
4 text file
 
05 c++-strings
05 c++-strings05 c++-strings
05 c++-strings
 
Python
PythonPython
Python
 
Advanced perl finer points ,pack&unpack,eval,files
Advanced perl   finer points ,pack&unpack,eval,filesAdvanced perl   finer points ,pack&unpack,eval,files
Advanced perl finer points ,pack&unpack,eval,files
 

More from asdepartmantal

In eukaryotes- the TCA cycle reactions take place in whereas glycolysi.pdf
In eukaryotes- the TCA cycle reactions take place in whereas glycolysi.pdfIn eukaryotes- the TCA cycle reactions take place in whereas glycolysi.pdf
In eukaryotes- the TCA cycle reactions take place in whereas glycolysi.pdf
asdepartmantal
 
In December- the first five transactions of Anders' Maid Service Compa.pdf
In December- the first five transactions of Anders' Maid Service Compa.pdfIn December- the first five transactions of Anders' Maid Service Compa.pdf
In December- the first five transactions of Anders' Maid Service Compa.pdf
asdepartmantal
 
In class- we discussed microcredit- Do some research online and briefl.pdf
In class- we discussed microcredit- Do some research online and briefl.pdfIn class- we discussed microcredit- Do some research online and briefl.pdf
In class- we discussed microcredit- Do some research online and briefl.pdf
asdepartmantal
 
In cell D1- insert a screenshot of the MS Word file titled PB Newslett.pdf
In cell D1- insert a screenshot of the MS Word file titled PB Newslett.pdfIn cell D1- insert a screenshot of the MS Word file titled PB Newslett.pdf
In cell D1- insert a screenshot of the MS Word file titled PB Newslett.pdf
asdepartmantal
 
In C4 plants- RuBisCO is protected from binding to Oxygen by--- Multip.pdf
In C4 plants- RuBisCO is protected from binding to Oxygen by--- Multip.pdfIn C4 plants- RuBisCO is protected from binding to Oxygen by--- Multip.pdf
In C4 plants- RuBisCO is protected from binding to Oxygen by--- Multip.pdf
asdepartmantal
 
In Aplysia long-term facilitation (long-term memory)- the transcriptio.pdf
In Aplysia long-term facilitation (long-term memory)- the transcriptio.pdfIn Aplysia long-term facilitation (long-term memory)- the transcriptio.pdf
In Aplysia long-term facilitation (long-term memory)- the transcriptio.pdf
asdepartmantal
 
In August 2012- tropical storm Isaac formed in the Caribbean and was h.pdf
In August 2012- tropical storm Isaac formed in the Caribbean and was h.pdfIn August 2012- tropical storm Isaac formed in the Caribbean and was h.pdf
In August 2012- tropical storm Isaac formed in the Caribbean and was h.pdf
asdepartmantal
 
In Aplysia- (short-term) sensitization involves activation of- PKA and.pdf
In Aplysia- (short-term) sensitization involves activation of- PKA and.pdfIn Aplysia- (short-term) sensitization involves activation of- PKA and.pdf
In Aplysia- (short-term) sensitization involves activation of- PKA and.pdf
asdepartmantal
 
In Birmingham- Richard Smith lives with his wife- Catherine Frossard-.pdf
In Birmingham- Richard Smith lives with his wife- Catherine Frossard-.pdfIn Birmingham- Richard Smith lives with his wife- Catherine Frossard-.pdf
In Birmingham- Richard Smith lives with his wife- Catherine Frossard-.pdf
asdepartmantal
 
IN C++ PLEASE Topics Loops While statement Description Write.pdf
IN C++ PLEASE     Topics   Loops While statement   Description   Write.pdfIN C++ PLEASE     Topics   Loops While statement   Description   Write.pdf
IN C++ PLEASE Topics Loops While statement Description Write.pdf
asdepartmantal
 
In C code- Write a program with 2 children process- where one child is.pdf
In C code- Write a program with 2 children process- where one child is.pdfIn C code- Write a program with 2 children process- where one child is.pdf
In C code- Write a program with 2 children process- where one child is.pdf
asdepartmantal
 
In Aplysia long-term facilitation (sensitization)- CREB 1 increases an.pdf
In Aplysia long-term facilitation (sensitization)- CREB 1 increases an.pdfIn Aplysia long-term facilitation (sensitization)- CREB 1 increases an.pdf
In Aplysia long-term facilitation (sensitization)- CREB 1 increases an.pdf
asdepartmantal
 
in python please Implement and test a heapSort function that uses hea.pdf
in python please  Implement and test a heapSort function that uses hea.pdfin python please  Implement and test a heapSort function that uses hea.pdf
in python please Implement and test a heapSort function that uses hea.pdf
asdepartmantal
 
In Python - Modify the postfix eval algorithm code below so it handles.pdf
In Python - Modify the postfix eval algorithm code below so it handles.pdfIn Python - Modify the postfix eval algorithm code below so it handles.pdf
In Python - Modify the postfix eval algorithm code below so it handles.pdf
asdepartmantal
 
in python Utilize the functions of the graphics-py module ( https---yo.pdf
in python Utilize the functions of the graphics-py module ( https---yo.pdfin python Utilize the functions of the graphics-py module ( https---yo.pdf
in python Utilize the functions of the graphics-py module ( https---yo.pdf
asdepartmantal
 
in python Define a function named swap_values that takes four integer.pdf
in python  Define a function named swap_values that takes four integer.pdfin python  Define a function named swap_values that takes four integer.pdf
in python Define a function named swap_values that takes four integer.pdf
asdepartmantal
 
In Python please! Secret Decoder Ring Write a program that allows the.pdf
In Python please! Secret Decoder Ring Write a program that allows the.pdfIn Python please! Secret Decoder Ring Write a program that allows the.pdf
In Python please! Secret Decoder Ring Write a program that allows the.pdf
asdepartmantal
 
in python in python Secret Decoder Ring Write a program that allows.pdf
in python  in python  Secret Decoder Ring Write a program that allows.pdfin python  in python  Secret Decoder Ring Write a program that allows.pdf
in python in python Secret Decoder Ring Write a program that allows.pdf
asdepartmantal
 
in presenting data that resulied from an experiment- a group of staden.pdf
in presenting data that resulied from an experiment- a group of staden.pdfin presenting data that resulied from an experiment- a group of staden.pdf
in presenting data that resulied from an experiment- a group of staden.pdf
asdepartmantal
 
In order to perform a one-way ANOVA test- there are three basic assump.pdf
In order to perform a one-way ANOVA test- there are three basic assump.pdfIn order to perform a one-way ANOVA test- there are three basic assump.pdf
In order to perform a one-way ANOVA test- there are three basic assump.pdf
asdepartmantal
 

More from asdepartmantal (20)

In eukaryotes- the TCA cycle reactions take place in whereas glycolysi.pdf
In eukaryotes- the TCA cycle reactions take place in whereas glycolysi.pdfIn eukaryotes- the TCA cycle reactions take place in whereas glycolysi.pdf
In eukaryotes- the TCA cycle reactions take place in whereas glycolysi.pdf
 
In December- the first five transactions of Anders' Maid Service Compa.pdf
In December- the first five transactions of Anders' Maid Service Compa.pdfIn December- the first five transactions of Anders' Maid Service Compa.pdf
In December- the first five transactions of Anders' Maid Service Compa.pdf
 
In class- we discussed microcredit- Do some research online and briefl.pdf
In class- we discussed microcredit- Do some research online and briefl.pdfIn class- we discussed microcredit- Do some research online and briefl.pdf
In class- we discussed microcredit- Do some research online and briefl.pdf
 
In cell D1- insert a screenshot of the MS Word file titled PB Newslett.pdf
In cell D1- insert a screenshot of the MS Word file titled PB Newslett.pdfIn cell D1- insert a screenshot of the MS Word file titled PB Newslett.pdf
In cell D1- insert a screenshot of the MS Word file titled PB Newslett.pdf
 
In C4 plants- RuBisCO is protected from binding to Oxygen by--- Multip.pdf
In C4 plants- RuBisCO is protected from binding to Oxygen by--- Multip.pdfIn C4 plants- RuBisCO is protected from binding to Oxygen by--- Multip.pdf
In C4 plants- RuBisCO is protected from binding to Oxygen by--- Multip.pdf
 
In Aplysia long-term facilitation (long-term memory)- the transcriptio.pdf
In Aplysia long-term facilitation (long-term memory)- the transcriptio.pdfIn Aplysia long-term facilitation (long-term memory)- the transcriptio.pdf
In Aplysia long-term facilitation (long-term memory)- the transcriptio.pdf
 
In August 2012- tropical storm Isaac formed in the Caribbean and was h.pdf
In August 2012- tropical storm Isaac formed in the Caribbean and was h.pdfIn August 2012- tropical storm Isaac formed in the Caribbean and was h.pdf
In August 2012- tropical storm Isaac formed in the Caribbean and was h.pdf
 
In Aplysia- (short-term) sensitization involves activation of- PKA and.pdf
In Aplysia- (short-term) sensitization involves activation of- PKA and.pdfIn Aplysia- (short-term) sensitization involves activation of- PKA and.pdf
In Aplysia- (short-term) sensitization involves activation of- PKA and.pdf
 
In Birmingham- Richard Smith lives with his wife- Catherine Frossard-.pdf
In Birmingham- Richard Smith lives with his wife- Catherine Frossard-.pdfIn Birmingham- Richard Smith lives with his wife- Catherine Frossard-.pdf
In Birmingham- Richard Smith lives with his wife- Catherine Frossard-.pdf
 
IN C++ PLEASE Topics Loops While statement Description Write.pdf
IN C++ PLEASE     Topics   Loops While statement   Description   Write.pdfIN C++ PLEASE     Topics   Loops While statement   Description   Write.pdf
IN C++ PLEASE Topics Loops While statement Description Write.pdf
 
In C code- Write a program with 2 children process- where one child is.pdf
In C code- Write a program with 2 children process- where one child is.pdfIn C code- Write a program with 2 children process- where one child is.pdf
In C code- Write a program with 2 children process- where one child is.pdf
 
In Aplysia long-term facilitation (sensitization)- CREB 1 increases an.pdf
In Aplysia long-term facilitation (sensitization)- CREB 1 increases an.pdfIn Aplysia long-term facilitation (sensitization)- CREB 1 increases an.pdf
In Aplysia long-term facilitation (sensitization)- CREB 1 increases an.pdf
 
in python please Implement and test a heapSort function that uses hea.pdf
in python please  Implement and test a heapSort function that uses hea.pdfin python please  Implement and test a heapSort function that uses hea.pdf
in python please Implement and test a heapSort function that uses hea.pdf
 
In Python - Modify the postfix eval algorithm code below so it handles.pdf
In Python - Modify the postfix eval algorithm code below so it handles.pdfIn Python - Modify the postfix eval algorithm code below so it handles.pdf
In Python - Modify the postfix eval algorithm code below so it handles.pdf
 
in python Utilize the functions of the graphics-py module ( https---yo.pdf
in python Utilize the functions of the graphics-py module ( https---yo.pdfin python Utilize the functions of the graphics-py module ( https---yo.pdf
in python Utilize the functions of the graphics-py module ( https---yo.pdf
 
in python Define a function named swap_values that takes four integer.pdf
in python  Define a function named swap_values that takes four integer.pdfin python  Define a function named swap_values that takes four integer.pdf
in python Define a function named swap_values that takes four integer.pdf
 
In Python please! Secret Decoder Ring Write a program that allows the.pdf
In Python please! Secret Decoder Ring Write a program that allows the.pdfIn Python please! Secret Decoder Ring Write a program that allows the.pdf
In Python please! Secret Decoder Ring Write a program that allows the.pdf
 
in python in python Secret Decoder Ring Write a program that allows.pdf
in python  in python  Secret Decoder Ring Write a program that allows.pdfin python  in python  Secret Decoder Ring Write a program that allows.pdf
in python in python Secret Decoder Ring Write a program that allows.pdf
 
in presenting data that resulied from an experiment- a group of staden.pdf
in presenting data that resulied from an experiment- a group of staden.pdfin presenting data that resulied from an experiment- a group of staden.pdf
in presenting data that resulied from an experiment- a group of staden.pdf
 
In order to perform a one-way ANOVA test- there are three basic assump.pdf
In order to perform a one-way ANOVA test- there are three basic assump.pdfIn order to perform a one-way ANOVA test- there are three basic assump.pdf
In order to perform a one-way ANOVA test- there are three basic assump.pdf
 

Recently uploaded

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 

Recently uploaded (20)

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 

In JAVA how do you encode and print each sentence in the file using a.pdf

  • 1. In JAVA how do you encode and print each sentence in the file using a basic Caesar Cipher. - Encode the characters by shifting their Unicode value by 5 - For example if we encoded the character 'A' with a shift of 5 it would become the character 'F' - For example if we encoded the character 'X' with a shift of 5 it would become the character ']' - Spaces should be printed but not encoded - Use the method caesarCipher Write each encoded sentence to a new text file called encoded.txt - If a IOException is thrown catch the exception and alert the user of the error - Use the method encodedFile (The main method cannot be set to throw any exceptions. The text file will contain multiple lines and each line will correspond to a single sentence.) Sample Output: Ex: If input is: anexample.txt the output is: Please enter the name of the file: It tw it sty1 ymjwj nx st yw~& Qnkj nx f qtsl qjxxts ns mzrnqny~3 Ex: If input is: anexample2.txt the output is: Please enter the name of the file: Mjqqt Qnq~1 ~tz itnsl |jqqD N,r knsj&&&&& Qnkj nx tzwx yt gj xujsy1 sty yt gj xf{ji3 j mf{j mtuj3333 Wjgjqqntsx fwj gznqy ts mtuj3333 N kfnqji r~ |f~ yt xzhhjxx3 Ex: If the input is: WrongFileName the output is: File does not exist