程序代写代做代考 Java C IMPORTANT:

IMPORTANT:
You must submit all programs in a SINGLE java file that prompts the user to select the function they would like to call. You should print the following menu:

Which would you like to test?
A – Min, Max, Average
B – Next License Plate Number
C – Commas in Integers
D – Number to words
E – Transpose a Matrix
X – Exit

This menu should continue to print until the user chooses to exit. If the user inputs an incorrect menu choice, you should display a meaningful message and still continue to prompt the user for a menu choice. Each program should then be written as a separate method within your main program. Call this main program program2.java. Each description below provides information on the objective of each prompt, as well as some requirements that you must follow. Otherwise, you may develop your code however you feel is appropriate. Upload your java file to this question.

A NOTE: I advise you to work incrementally on this part. Start by creating the menu, and then begin writing the methods as they are described below, but don’t feel you have to work in the exact order. If you cannot get a method to work, do not abandon the overall program! Write as much as you can and submit your working program (one suggestion is if you have trouble with one of the prompts, simply write your menu to print “Did not finish” if the user chooses that prompt from the menu). Even if you cannot get your code to compile, please submit it anyway. Significant partial credit will be awarded for good faith attempts.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

{A} Min, Max, Average (10 points)
Given 10 input integers, output the minimum, maximum, and average of those integers.
For example:
If the input is 1 1 1 1 1 3 3 3 3 3, the output is: 1 3 2.0
If the input is 9 8 7 6 5 4 3 2 1 0, the output is: 0 9 4.5
You must check that the user is inputting an integer, but they may input any value (e.g., negative numbers are allowed, and there is no bound on the size of the integer).

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

{B} Next License Plate Number (15 points)
A state’s Department of Motor Vehicles needs a program to generate license plate numbers. A license plate number consists of three letters followed by three digits, as in CBJ523. (So “number” is a bit inaccurate, but that’s the standard word used for license plates). The plate numbers are given out in sequence, so given the current number, the program should output the next number. If the input is CBJ523, the output should be CBJ524. If the input is CBJ999, the output should be CBK000. For the last number ZZZ999, the next is AAA000. You do not need to check that the user has inputted the right format BUT you do need to check that the user has inputted 6 characters. In other words, I will test input like XX888 (in correct length), and your code should reject this and prompt me to input correctly. I will NOT test input like 888XXX.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
{C} Commas in Integers (10 points)
Commas make large integers easier to read. Ex: 145,020 is easier to read than 145020. Write a method that takes an integer, and returns a string representation of that number with commas appropriately inserted. If the input is 145020, the method returns the string “145,020”. You must check that the user is providing an integer value, but otherwise, any value is legal input (positive or negative, small or large).
Hint: Use % 10 to get the rightmost digit. Use / 10 to shift the number right (discarding the current 1’s place).
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

{D} Number to words (20 pts)
Sometimes numbers are converted to words, like in a wedding invitation. So 23 becomes “twenty three”. Write a method DigitToWord that takes a single digit number from 0-9 and returns that number’s word: 0 is zero, 1 is one, 2 is two, etc (if the number is outside 0-9, return “error”). Write another method TensDigitToWord that takes a single digit number from 2-9, and returns that number’s word when it appears in the tens digit: 2 is twenty, 3 is thirty, etc. If the number is outside 2-9, return “error”. Finally, write a method TwoDigitNumToWords that takes a two-digit number from 20-99 and returns that number in words. You should write a method called getInts() that gets a user’s integer. This method should check your input for integers and ranges. Use the method TwoDigitNumToWords as your driving method that will call the methods defined above and then outputs the resulting string. If the input is 23, the output should be “twenty three”.
Note that your program does not support all numbers. 0-19 will yield error output, for example.
HINTS:
Write DigitToWord first, and test the function (have your main call that function directly) — you won’t pass any of the tests, but you should still start that way. Next, write TensDigitToWord and test it by itself also. Finally, write TwoDigitNumToWords (calling your first two functions) and test the entire program.
Your TwoDigitNumToWords function should pass the ten’s digit to TensDigitToWord. To get the tens digit, divide the number by 10.
Your TwoDigitNumToWords function should pass the one’s digit to DigitToWord. To get the ones digit, mod the number by 10 (num % 10).
You can concatenate the strings returned by those two methods using the + operator. Ex: “hello” + ” ” + “there” yields one string “hello there”.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

{E} Transpose a Matrix (15 points)
The transpose of a matrix is a new matrix whose rows are the columns of the original. For example:
A = 1 2 3 4 5 Transpose of A = 1 5
5 4 3 2 1 2 4
3 3
4 2
5 1
Your code should take as input a 2d array, and print the 2d array as to the console. This output should be the transpose of the input matrix. You may hardcode the two-dimensional array as your integer array, as shown in the example above.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –