1//import a scanner 2 //Create a class for a file BookIndex.java 3 //open curly bracket for...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1//import a scanner 2 //Create a class for a file BookIndex.java 3 //open curly bracket for the class 4 // put the main method here 5 // open curly bracket for the main method 6 // Create a Scanner object 7//Print to the Screen "Enter the Title of Chapter 1: " 8 // Create a String called chOne that takes in the users Chapter Title. 9 //Print to the Screen "Enter the Title of Chapter 2: " 10 // Create a String called chTwo that takes in the users Chapter Title. 11//Print to the Screen "Enter the Title of Chapter 3: " 12 // Create a String called chThree that takes in the users Chapter Title. 13 //Print to the Screen "Enter the Title of Chapter 4: 14 // Create a String called chFour that takes in the users Chapter Title. 15//Print to the Screen "Enter the Title of Chapter 5: 16 // Create a String called chFive that takes in the users Chapter Title. 17//Create an empty String called chTitle and set it equal to " 18 // Create an int named chNum and set it equal to o 19 // Print the word "INDEX" that has 3 tabs before the word to the screen 20 // create a for loop that starts at 1 and goes 5 times 21// open curly bracket for the for loop 22 // create an if statement that executes ifi is equal to 1 23 // open curly for the if statement 24 //set chTitle equal to the String you made that stores the title of Chapter One 25 // Closing curly bracket for the if statement 26 // create an if statement that executes if iis equal to 2 27 // open curly for the if statement 28 //set chTitle equal to the String you made that stores the title of Chapter Two 29 // Closing curly bracket for the if statement 30 // create an if statement that executes ifi is equal to 3 31// open curly for the if statement 32 //set chTitle equal to the String you made that stores the title of Chapter Three 33 // Closing curly bracket for the if statement 34 // create an if statement that executes if i is equal to 4 35 // open curly for the if statement 36 //set chTitle equal to the String you made that stores the title of Chapter Four 37 // Closing curly bracket for the if statement 38 // create an if statement that executes ifi is equal to 5 39 // open curly for the if statement 40 //set chTitle equal to the String you made that stores the title of Chapter Five 41 // Closing curly bracket for the if statement 42 // Print chTitle to the screen but do not put the curser on the next line 43 //Create an integer named titleLength and set it to the character length of chTitle using the length() method 44//create a while loop and have it run while titleLength is less than 45 45//Open curly bracket for the while loop 46 //Print out a dot but do not put the curser on the next line 47 // add one to the value of titleLength 48 //closing curly bracket for the while loop 49 //Print out the equasion of i times 15 and make the curser go to the next line 50//Closing curly bracket for the for loop 51// Closing curly bracket for the main method 52// Closing curit bracket for the class BookIndex Booklndex.java 1 import java.util.Scanner; 2 public class BookIndex 3- { 4 5- 6 7 8 } Submit + Continue Save public static void main(String[] args) { } 1//import a scanner 2 //Create a class for a file BookIndex.java 3 //open curly bracket for the class 4 // put the main method here 5 // open curly bracket for the main method 6 // Create a Scanner object 7//Print to the Screen "Enter the Title of Chapter 1: " 8 // Create a String called chOne that takes in the users Chapter Title. 9 //Print to the Screen "Enter the Title of Chapter 2: " 10 // Create a String called chTwo that takes in the users Chapter Title. 11//Print to the Screen "Enter the Title of Chapter 3: " 12 // Create a String called chThree that takes in the users Chapter Title. 13 //Print to the Screen "Enter the Title of Chapter 4: 14 // Create a String called chFour that takes in the users Chapter Title. 15//Print to the Screen "Enter the Title of Chapter 5: 16 // Create a String called chFive that takes in the users Chapter Title. 17//Create an empty String called chTitle and set it equal to " 18 // Create an int named chNum and set it equal to o 19 // Print the word "INDEX" that has 3 tabs before the word to the screen 20 // create a for loop that starts at 1 and goes 5 times 21// open curly bracket for the for loop 22 // create an if statement that executes ifi is equal to 1 23 // open curly for the if statement 24 //set chTitle equal to the String you made that stores the title of Chapter One 25 // Closing curly bracket for the if statement 26 // create an if statement that executes if iis equal to 2 27 // open curly for the if statement 28 //set chTitle equal to the String you made that stores the title of Chapter Two 29 // Closing curly bracket for the if statement 30 // create an if statement that executes ifi is equal to 3 31// open curly for the if statement 32 //set chTitle equal to the String you made that stores the title of Chapter Three 33 // Closing curly bracket for the if statement 34 // create an if statement that executes if i is equal to 4 35 // open curly for the if statement 36 //set chTitle equal to the String you made that stores the title of Chapter Four 37 // Closing curly bracket for the if statement 38 // create an if statement that executes ifi is equal to 5 39 // open curly for the if statement 40 //set chTitle equal to the String you made that stores the title of Chapter Five 41 // Closing curly bracket for the if statement 42 // Print chTitle to the screen but do not put the curser on the next line 43 //Create an integer named titleLength and set it to the character length of chTitle using the length() method 44//create a while loop and have it run while titleLength is less than 45 45//Open curly bracket for the while loop 46 //Print out a dot but do not put the curser on the next line 47 // add one to the value of titleLength 48 //closing curly bracket for the while loop 49 //Print out the equasion of i times 15 and make the curser go to the next line 50//Closing curly bracket for the for loop 51// Closing curly bracket for the main method 52// Closing curit bracket for the class BookIndex Booklndex.java 1 import java.util.Scanner; 2 public class BookIndex 3- { 4 5- 6 7 8 } Submit + Continue Save public static void main(String[] args) { }
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Under which article does legitimate national law overrule conflicting state laws?
-
How can a company optimize its supply chain operations to minimize costs while ensuring efficient delivery and quality control? Discuss the various strategies, such as lean manufacturing, inventory...
-
The annual revenues associated with several large apartment complexes are $300, $450, $425, $50, $75, and $150 for years 0, 1, 2, 3, 4, and 5, respectively. Determine the net cash flow and whether...
-
The FASB Accounting Standards Codification represents the single source of authoritative U.S. generally accepted accounting principles. Required: 1. Obtain the relevant authoritative literature on...
-
Andrew Tersigni owns a successful bagel shop and is considering leasing the space next door at $1,000 per month and adding additional tables and chairs in the leased space to allow his customers to...
-
The following is the statement of financial position of TT and Co. at the end of its first year of trading (from Self-assessment question 3.1): * The prepaid expenses consisted of rates (300) and...
-
The income statement accounts for the Monroe Realty Company at the end of its fiscal year are shown below. Prepare the required closing entries in journal form. Chris Ross is theowner. Account Name...
-
The weighted average cost of capital (WACC) is calculated using the firm's target capital structure together with its after-tax cost of long-term debt, after-tax cost of short-term debt, cost of...
-
a. What are the required elements of arson? b. Tom breaks into a neighbors barn, sets off 20 sticks of dynamite, and blows up the barn. The barn does not catch fire, but it is blown to small bits and...
-
Mr. Darcy O'Brien has just receieved a Notice of Reassessment requesting an additional payment of $72,500 for the 2016 taxation year. He is outraged in that he believes that the CRA is harassing him...
-
GreenCut Lawnmowers makes three models of push mower: the Standard, the Premium, and the Pro. Condensed income statement data related to the three models are as follows: Standard Premium Sales...
-
Helen purchased 200 shares of Terabithia common stock on margin at $50 per share. Assume the initial margin is 50% and the maintenance margin is 30%. 1) What will be Helen's rate of return if the...
-
Kingbird company purchased an electric wax melter on April 3 0 , 2 0 2 5 , by trading in its old gas model and paying the balance in cash. The following data relate to the purchase. List price of new...
-
Using the data below, show a simple Income Statement to compute the net income. Include the correct title on the income statement and follow the formatting guidelines shown in the example of an excel...
-
Tootsie Roll Inc. pays annual dividends that are expected to grow in perpetuity at a constant rate. The last dividend (paid yesterday) was $0.5. The price of Tootsie Roll shares is currently $34....
-
Name_ ENGR 2120-Dynamics Test 2 fleda lesitiev sdt to Spring 2020 vibolov slugns el bns 29ldeo edit to a 1. The 2-Mg car is being towed by a winch. If the winch exerts a force of T = 100(s + 1) N on...
-
Study the pictures/images below. Obviously these was focus on LT sociology, anthropology and poltical science. Try to do some analysis by finding clues that are synonymous with the main concepts....
-
Frank Willingham has the following transactions during the year: Sale of office equipment on March 15 that cost $20,000 when purchased on July 1, 2010. Frank has claimed $5,000 in depreciation and...
-
Fisafolia Corporation has gross income from operations of $220,000 and operating expenses of $160,000 for 2012. The corporation also has $20,000 in dividends from publicly traded domestic...
-
Sherry rents her vacation home for 6 months and lives in it for 6 months during the year. Her gross rental income during the year is $4,000. Total real estate taxes for the home are $950, and...
-
Show that \[ \gamma_{i}=\frac{\bar{\phi}_{i}}{\phi_{i}} \]
-
Carbon dioxide occupies a tank at \(100^{\circ} \mathrm{C}\). If the volume of the tank is \(0.5 \mathrm{~m}^{3}\) and the pressure is \(500 \mathrm{kPa}\), determine the mass of the gas in the tank.
-
If a cylinder of volume \(0.1 \mathrm{~m}^{3}\) is filled with \(1.373 \mathrm{~kg}\) of ammonia at \(1.95 \mathrm{MPa}\), determine the temperature at which ammonia exists in the cylinder. Assume...
Study smarter with the SolutionInn App