COMP 1130 Computer Programming
If there is one truth aboutsoftware, it is that there is “always bugs, bugs, and more bugs!”The following program is to prompt the user to enter 4 integer values, then display the total and average.The program should operate similar to this example (with user input),Enter two words: 2-53117Total: 45 and Average: 11.3 showing the average to 1 decimal placeFix allthe errors (syntax/compiler errors and any possible run-time/logic errors), and add comments to describe the program.Once it is working, check the program with sufficient (and simple) test values that prove it is working properlyYou are planning to write a game, and want to test a technique for movementin a random direction:U, D, L, or R (for up, down, left, or right)Hints:-declares a String object containing the directions to move: “UDLR”-pick a random number between 0..3 (so: 0, 1, 2, or 3), and this is the position in the string-display the output: "Moved: #" (where # is U, D, L, or R)You may use the following in your program,-Math class’ .random( ) method, that returns a value v: 0.0 <= v < 1.0oran object of the Random class, with the object’s .nextInt(x)that returns a value v: 0 <= v < x-String object methods: .charAt(index), .substring(a), .substring(a,b), .length(), .indexOf(string)Write the application that converts the user’s input name from “listing format” to regular format,lastname, firstnameto lastname firstname(all in lowercase).The program already stores the entire input line to a String name.Declare any necessary variables or objects.(hint: you should split the name into afirst and and last name)Recall String methods: .length(), .indexOf(string), .substring(a), .substring(a,b), .charAt(index), .toUpperCase(), and.toLowerCase()Consider the examples (user input in highlight),and use thisbeginning of the main(),public static void main (String args)
MyAssignmenthelp.com boasts a team of talented and highly skilled coursework writers based in UK who assist students in the best possible manner. Students, who need coursework help, find our services fulfilling and effective because we provide high quality help at affordable price. So, students who often search can someone do my coursework cheap or can experts Write my coursework for cheap get perfect solution at MyAssignmenthelp.com. They pay for best coursework and get it from us.