代写辅导接单-CS9053 Section I Assignment 6

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top

Introduction to Java

CS9053 Section I

Thursday 6 PM – 8:30 PM

Prof. Dean Christakos

March 10th, 2024

Due: March 15th, 2024 11:59 PM

 

Assignment 6

 

Due to the fact that this is coming out late, I will be generous with extensions and due date is essentially just a recommendation so you don’t get bogged down with it during Spring Break or with assignment 7, which will be due after Spring Break.

 

Build a file loader/encoder. You will load the contents of a text file into a text area, and encode the text with the given encoder. You can then save the file in the text area. I have set up some skeleton code that should how to use the file loader and saver, and all the code for the encoding.

 

I’m going to give very little code for the actual coding, but it should look like this:

 

 

For reference, the text area is 20 rows high and 40 columns wide.

 

You should be able to load in a file into the text area from the File Menu:

 

 

When you elect the “Open” menu item, it will open a JFileChooser. I have written the outline of the code to open a file using the JFileChooser object, which has both an “Open” dialog and “Save” dialog, and you can look up the details to understand it better, but it’s mostly self-explanatory:

 

 

 

Once a text file is selected, it should load the contents of file into the TextArea, and we should be able to pick an Encoding method from the Combobox (which is not editable):

 

 

 

The first Encoding method is ROT13, which rotates the letters by 13 steps (so reversible), accounting for upper and lower caseletters:

 

 

The other encoding method is “Numeric” which converts the text to a numeric value, separated by “.” characters. Spaces are represented by “-“ characters:

 

 

 

This does not support punctuation or other special characters, so let’s not worry about that right now. In any case, the encoding itself is already written.

Net you should be able to save the file, once again using JFileChooser:

 

 

 

 

 

51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468