New Semester
Started
Get
50% OFF
Study Help!
--h --m --s
Claim Now
Question Answers
Textbooks
Find textbooks, questions and answers
Oops, something went wrong!
Change your search query and then try again
S
Books
FREE
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Tutors
Online Tutors
Find a Tutor
Hire a Tutor
Become a Tutor
AI Tutor
AI Study Planner
NEW
Sell Books
Search
Search
Sign In
Register
study help
computer science
java programming 8th
Java Programming 8th Edition Joyce Farrell - Solutions
Write an application that stores at least five different department and supervisor names in a two-dimensional array. Allow the user to enter a department name (such as “Marketing”) and display the corresponding supervisor’s name. If the department does not exist, display an error message.
a. Write an application containing an array of 20 String values, and display them in ascending order. Save the file as StringSort.java.b. Write an application that accepts any number of String values from a user up to 20, and display them in ascending order. Save the file as StringSort2.java.
a. Write an application that accepts up to 10 Strings, or fewer if the user enters a terminating value. Divide the entered Strings into two lists—one for short Strings that are 10 characters or fewer and the other for long Strings. After data entry is complete, prompt the user to enter which type
Allow a user to enter any number of double values up to 20. The user should enter 99999 to quit entering numbers. Display an error message if the user quits without entering any numbers; otherwise, display each entered value and its distance from the average. Save the file as
Write an application that stores 12 integers in an array. Display the integers from first to last, and then display the integers from last to first. Save the file as TwelveInts.java.
Write an application that prompts a user for a full name and street address and constructs an ID from the user’s initials and numeric part of the address. For example, the user William Henry Harrison who lives at 34 Elm would have an ID of WHH34, whereas user Addison Mitchell who lives at 1778
If String movie = new String("West Side Story");, the value of movie.indexOf(′s′) is ___________.a. Trueb. Falsec. 2d. 3
What does the following statement output?for(b = 1; b > 3; ++b) System.out.print(b + " ");a. 1 1 1b. 1 2 3c. 1 2 3 4d. Nothing
What does the following statement output?for(a = 0; a < 5; ++a) System.out.print(a + " ");a. 0 0 0 0 0b. 0 1 2 3 4c. 0 1 2 3 4 5d. Nothing
Assume that the population of Mexico is 121 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 315 million and that the population is reduced 0.15 percent annually. Write an application that displays the populations for the two
Write an application that computes a business’s potential profits each year for 20 years using the following assumptions: (1) Gross profit in the first year is projected to be $20,000. (2) Expenses in the first year are expected to be $35,000. (3) Net profit or loss is gross profit minus
Write an application that allows a user to enter any number of student test scores until the user enters 999. If the score entered is less than 0 or more than 100, display\ an appropriate message and do not use the score. After all the scores have been entered, display the number of scores entered,
What is the output of the following code?e = 1;while(e < 4); System.out.print(e + " ");a. Nothingb. 1 1 1 1 1 1...c. 1 2 3 4d. 4 4 4 4 4 4...
What is the output of the following code?b = 1;while(b < 4){ System.out.print(b + " "); b = b + 1;}a. 1b. 1 2 3c. 1 2 3 4d. 1 1 1 1 1...
What is the output of the following code?b = 1;while(b < 4)System.out.print(b + " ");a. 1b. 1 2 3c. 1 2 3 4d. 1 1 1 1 1 1...
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.b. Modify the CountByThrees application so that the user enters the value to count by. Start each new line
When you execute the CompareLoopTimes program shown in Figure 6-29, you will occasionally see a negative number output when the nanoseconds values retrieved fall in different seconds. Modify the program to fix this problem, and save the file as CompareLoopTimes3.java. (Hint: It might take hundreds
Which of the following has the lowest precedence?a. <b. ==c. &&d. ||
What is the output of the following code segment?t = 0;if(t > 7) System.out.print("AAA"); System.out.print("BBB");a. AAAb. BBBc. AAABBBd. Nothing
Create an Automobile class for a dealership. Include fields for an ID number, make, model, color, year, and miles per gallon. Include get and set methods for each field. Do not allow the ID to be negative or more than 9999; if it is, set the ID to 0. Do not allow the year to be earlier than 2000 or
What is the output of the following code segment?t = 10;if(t > 7){ System.out.print("AAA"); System.out.print("BBB");}a. AAAb. BBBc. AAABBBd. Nothing
Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minutes used, text messages sent, and gigabytes of data used, and then recommend the best plan for the customer’s needs. A customer who needs fewer than 500 minutes of talk
Caitlyn’s Crafty Creations computes a retail price for each product as the cost of materials plus $12 multiplied by the number of hours of work required to create the product, plus $7 shipping and handling. Create a class that contains a main() method that prompts the user for the name of a
There are 2.54 centimeters in an inch, and there are 3.7854 liters in a U.S. gallon. Create a class named MetricConversion. Its main() method accepts an integer value from a user at the keyboard, and in turn passes the entered value to two methods. One converts the value from inches to centimeters
Travel Tickets Company sells tickets for airlines, tours, and other travel-related services. Because ticket agents frequently mistype long ticket numbers, Travel Tickets has asked you to write an application that indicates invalid ticket number entries. The class prompts a ticket agent to enter a
Which Java statement produces the following output?wxyza. System.out.println("wxyz");b. System.out.println("w" + "xyz");c. System.out.println("w\nxyz");d. System.out.println("w\nx\ny\nz");
After you write and save a Java application file, you _____________ it.a. Interpret and then compileb. Interpret and then executec. Compile and then resaved. Compile and then interpret
Java is architecturally _____________.a. Specificb. Orientedc. Neutrald. Abstract
Write, compile, and test a class that displays at least four lines of your favorite song. Save the class as FavoriteSong.java.
Name at least three classes to which each of these objects might belong:a. MySchoolPlaygroundb. ShrimpAlfredoc. GrandmasRockingChair
Name at least three real-life objects that are instances of each of the following classes:a. Movieb. Teamc. Musician
Name at least three attributes that might be appropriate for each of the following classes:a. Classroomb. InsurancePolicyc. CreditCardBill
Showing 300 - 400
of 332
1
2
3
4
Step by Step Answers