Question: Java Programming, Eighth Edition Joyce Farrell Chapter 6: Assignments Exercise 2A, 2B PART A. Write an application that counts by three from 3 through 300

Java Programming, Eighth Edition Joyce Farrell Chapter 6: Assignments

Exercise 2A, 2B

PART A. Write an application that counts by three from 3 through 300 inclusive, and that starts a new line after every multiple of 30 (30, 60, 90, and so on). Save the file as CountByThrees.java.

PART B. Modify the CountByThrees application so that the user enters the value to count by. Start each new line after 10 values have been displayed. Save the file as CountByAnything.java. Similar to Program A, except:

No start just a STOP number,

NUMBER_PER_LINE *10,

Need user input (Scanner keyboard = new Scanner (System.ini)

System.out.print (Enter number to count by >>)

For loop

System.out.print and if exactly as problem A no change

MUST FINISH THIS CODE WITH THESE VARIABLES:

public class CountByThrees { public static void main (String args[]) { //Define counts by three from 3 to 300 and start new line at multiple of 30 (need START 3, STOP 300 and NUMBR_PER_LINE = 30) //write the for loop to start count, stop count and verify count - example You Do It p. 324 #3, Fig 6-26 p. 329 { //example You Do It p. 324 #3 } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!