Question: Write each item as a separate program (one .java file for each program). When complete, zip all items and submit them through Blackboard. Be sure
Write each item as a separate program (one .java file for each program). When complete, zip all items and submit them through Blackboard. Be sure to clearly include both group member names on this document and in all programs when submitting. You must work with a partner. Only one group member needs to complete this document. Make sure both partners are participating in answering all questions. please complete this in java
- Prompt the user to enter a number between 1 and 10. Add the appropriate suffix to the number and print the number with the suffix. If the user enters 1 print 1st, if the user enters 2 print 2nd and so on. For any numbers greater than 10 print Too High and for any numbers less than 1 print Too low. What is the most optimal way to write this? Examples: Enter a number between 1 and 10: 8
8th
- Since we have been talking a lot about number systems lets explore Roman Numerals. Prompt the user to enter a number between 10 and 20 (inclusive of both values). If the number falls outside of that range the program should tell the user their input is not valid and then terminate. If the number is within that range the program should print the appropriate Roman Numeral representation of that What is the most optimal way to write this?. Is this program all that different from #1 above? Examples: Enter a number between 10 and 20: 3 Number not within range, exiting.
Enter a number between 10 and 20: 15 15 in Roman Numerals is XV
- Prompt the user to enter 3 integers. Use conditional statements to determine which of these 3 numbers is the MIDDLE value. Note that the user can enter the 3 numbers in any order and the program should be able to account for this. Examples: Enter number 1: 5 Enter number 2: 12 Enter number 3: 1 Number 1 is the middle number and it was 5
Enter number 1: 12 Enter number 2: 1 Enter number 3: 5 Number 3 is the middle number and it was 5
Continued on next page
- The magic user names are root, admin, ada, and flynn. Prompt the user to enter their name and then compare their name with the magic names. If the users name matches one of these items print Super user access granted! and if it does not match one of these items print Access denied, end of line. Be sure to use the correct approach for comparing Strings as it is different from comparing primitive values.
Number Conversions
- Convert the following numbers from decimal to 8-bit binary using twos complement. Use the space provided to show your work. -19
-238
- Convert the following binary numbers from binary to decimal using twos complement (showing all work). Note that the second number uses 16 bits. These are negative numbers. 1011 0101 1000 0010 0101 1101
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
