Question: 9.29 Count Up (Individual Assignment) This is an Individual Assignment. You must complete this assignment on your own. - Do not collaborate or share code

9.29 Count Up (Individual Assignment) This is an Individual Assignment. You must complete this assignment on your own. - Do not collaborate or share code with other students. - Do not copy and paste code from anywhere. - Do not use any resources outside of those provided in the course materials - Do not use any language features that have not been covered to this point in the course materials. - If you get stuck or need help, please use the help systems provided in this course. Required Skills Inventory - Write a method that takes arguments and returns no value - Use parameter variables in a method body - Use relational operators to construct an expression - Use a loop to get the computer to repeat instructions - Use a counter to control a loop - Output to console with System. out, print Problem Description and Given Info Write (define) a public static method named countUp, that takes one int argument and returns no value. You can sfely assume that the argument will always be a positive integer. When this method is called, it should print a count from 1 up to (and including) the argument value Examples: countUp (5) will print 1,2,3,4,5, countUp (6) will print 1,2,3,4,5,6, countUp(2) will print 1,2 , You may wish to write some additional code to test your method. Problem Description and Given Info Write (define) a public static method named countUp, that takes one int argument and returns no value. You can safely assume that the argument will always be a positive integer. When this method is called, it should print a count from 1 up to (and including) the argument value. Examples: countUp (5) will print 1,2,3,4,5, countup (6) will print 1,2,3,4,5,6, countUp (2) will print 1,2 , You may wish to write some additional code to test your method. Helpful Hints: - Use a counter controlled Whi le loop to count from 1 up to the argument value. Print out the current count at each iteration of the loop. - Java's for loop is also a good choice for this problem. - Remember that there is a significant difference between the print and print ln methods in Java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
