Description
Problem 1
A company that wants to send data over the Internet has asked you to write a program that will encrypt it
so that it may be transmitted more securely. All the data is transmitted as four-digit integers. Your
application should read a four-digit integer entered by the user and encrypt it as follows: Replace each
digit with the result of adding 7 to the digit and getting the remainder after dividing the new value by 10.
Then swap the first digit with the third, and swap the second digit with the fourth. Then print the
encrypted integer. Write a separate application that inputs an encrypted four-digit integer and decrypts it
(by reversing the encryption scheme) to form the original number.
Problem 2
The formulas for calculating BMI are
or
Create a BMI calculator that reads the user’s weight and height (providing an option for the user to select
which formula to use), and then calculates and displays the user’s body mass index. Also, display the
BMI categories and their values from the National Heart Lung and Blood
Institute: http://www.nhlbi.nih.gov/health/educational/lose_wt/BMI/bmicalc.htm
(http://www.nhlbi.nih.gov/health/educational/lose_wt/BMI/bmicalc.htm) so the user can evaluate his/her BMI.
Problem 3
Write a simple polling program that allows users to rate five topics from 1 (least important) to 10 (most
important). Pick five topics that are important to you (e.g., political issues, global environmental issues,
food, video games). Use a one-dimensional array topics (of type String ) to store the five issues. To
summarize the survey responses, use a 5-row, 10-column two-dimensional array responses (of
type int ), each row corresponding to an element in the topics array. When the program runs, it should
ask the user to rate each issue. Multiple people should be able to respond to the survey during a single
2/22/22, 3:26 PM Programming Assignment 2 (Eclipse)
https://webcourses.ucf.edu/courses/1338999/assignments/6355627 3/6
Programming Assignment 2
run of the program. Once all responses have been logged, have the program display a summary of the
results, including:
1. A tabular report with the five topics down the left side and the 10 ratings across the top, listing in
each column the number of ratings received for each topic.
2. To the right of each row, show the average of the ratings for that issue.
3. Which issue received the highest point total? Display both the issue and the point total.
4. Which issue received the lowest point total? Display both the issue and the point total.
2/22/22, 3:26 PM Programming Assignment 2 (Eclipse)
https://webcourses.ucf.edu/courses/1338999/assignments/6355627 4/6
Criteria Ratings Pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
p1: main method 1 pts
Full Marks
0 pts
No Marks
p1: prompt for number 1 pts
Full Marks
0 pts
No Marks
p1: get number from user 1 pts
Full Marks
0 pts
No Marks
p1: display correctly encrypted value 1 pts
Full Marks
0 pts
No Marks
p1: display correctly decrypted value 1 pts
Full Marks
0 pts
No Marks
p2: main method 1 pts
Full Marks
0 pts
No Marks
p2: prompt for calculation mode (lb or kg) 1 pts
Full Marks
0 pts
No Marks
p2: prompt for weight and height input 1 pts
Full Marks
0 pts
No Marks
p2: get calculation mode from user 1 pts
Full Marks
0 pts
No Marks
p2: get weight from user 1 pts
Full Marks
0 pts
No Marks
p2: get height from user 1 pts
Full Marks
0 pts
No Marks
2/22/22, 3:26 PM Programming Assignment 2 (Eclipse)
https://webcourses.ucf.edu/courses/1338999/assignments/6355627 5/6
Criteria Ratings Pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
1 pts
3 pts
p2: correct BMI calculation 1 pts
Full Marks
0 pts
No Marks
p2: display of BMI value 1 pts
Full Marks
0 pts
No Marks
p2: display of BMI category 1 pts
Full Marks
0 pts
No Marks
p3: prompt user to rate each topic 1 pts
Full Marks
0 pts
No Marks
p3: get topic ratings from user 1 pts
Full Marks
0 pts
No Marks
p3: user input phase occurs within a loop 1 pts
Full Marks
0 pts
No Marks
p3: display tabular report as a 5×10 table 1 pts
Full Marks
0 pts
No Marks
p3: include per-topic average in report 1 pts
Full Marks
0 pts
No Marks
p3: display issue with highest point total 1 pts
Full Marks
0 pts
No Marks
p3: display issue with lowest point total 1 pts
Full Marks
0 pts
No Marks
p1: project on GitHub 3 pts
Full Marks
0 pts
No Marks
2/22/22, 3:26 PM Programming Assignment 2 (Eclipse)
https://webcourses.ucf.edu/courses/1338999/assignments/6355627 6/6
Total Points: 30
Criteria Ratings Pts
3 pts
3 pts
p2: project on GitHub 3 pts
Full Marks
0 pts
No Marks
p3: project on GitHub 3 pts
Full Marks
0 pts
No Marks