To encourage good grades, Hermosa High School has decided to award each student a bookstore credit that is 10 times the student’s grade point average. In other words, a student with a 3.2 grade point average receives a $32 credit. Create a class that prompts a student for a name and grade point average and then passes the values to a method that displays a descriptive message. The message uses the student’s name, echoes the grade point average, and computes and displays the credit. Save the application as BookstoreCredit.java.
> Based on Rothstein (1973). The Springfield City Police Department employs 30 police officers. Each officer works five days per week. The crime rate fluctuates with the day of the week, so the number of police officers required each day depends on the day
> Gotham City National Bank is open Monday through Friday from 9 a.m. to 5 p.m. From past experience, the bank knows that it needs the numbers of tellers listed in the file P04_104.xlsx. Gotham City Bank hires two types of tellers. Full-time tellers work 9
> During the next three months, a heating and cooling company must meet (on time) the following demands for air conditioners: month 1, 600; month 2, 400; and month 3, 300. Air conditioners can be produced in either New York or Los Angeles. It takes 1.5 hou
> Each day, Eastinghouse produces capacitors during three shifts: 8 a.m. to 4 p.m., 4 p.m. to 12 a.m., and 12 a.m. to 8 a.m. The hourly salary paid to the employees on each shift, the price charged for each capacitor made during each shift, and the number
> Aluminaca produces 100-foot-long, 200-foot-long, and 300-foot-long ingots for customers. This week’s demand for ingots is listed in the file. Aluminaca has four furnaces in which ingots can be produced. During one week, each furnace can be operated for 5
> You are a CFA (chartered financial analyst). An overextended client has come to you because she needs help paying off her credit card bills. She owes the amounts on her credit cards listed in the file. The client is willing to allocate up to $6000 per mo
> Suppose you have an extra six months of data on demands and prices, in addition to the data in the example. These extra data points are (350,84), (385,72), (410,67), (400,62), (330,92), and (480,53). (The price is shown first and then the demand at that
> The sensitivity analysis in the Quality Sweaters example was on the response rate. Suppose now that the response rate is known to be 8%, and the company wants to perform a sensitivity analysis on the number mailed. After all, this is a variable under di
> Write, compile, and test a class that displays the pattern shown in Figure 1-27. Save the class as Triangle.java.
> Write, compile, and test a class that displays the pattern shown in Figure 1-26. Save the class as TableAndChairs.java.
> Write, compile, and test a class that uses four println() statements to display, in order, your favorite movie quote, the movie it comes from, the character who said it, and the year of the movie. Save the class as MovieQuoteInfo.java.
> Sunshine Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program that prompts the user for the number of minutes the user rented a piece of sports equipment. Compute the rental cost as $40
> Yummy Catering provides meals for parties and special events. Write a program that prompts the user for the number of guests attending an event and then computes the total price, which is $35 per person. Display the company motto with the border that you
> a. Sunshine Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program that displays Sunshine’s motto, which is Sunshine Seashore makes it fun in the sun. Save the file as SunshineMotto.java.
> a. Yummy Catering provides meals for parties and special events. Write a program that displays Yummy Catering’s motto, which is Yummy makes the food that makes it a party. Save the file as YummyMotto.java. b. Create a second program that displays the mo
> Write, compile, and test a class that uses four println() statements to display four lines of the lyrics of your favorite song. Save the class as SongLyrics.java.
> a. Sunshine Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Create a Rental class for the company. The Rental class contains the following: ❯❯ Two public final static fields that hold the number of
> a. Create a class to hold Event data for Yummy Catering. The class contains the following: ❯❯ Two public final static fields that hold the price per guest ($35) and the cutoff value for a large event (50 guests). ❯❯ Three private fields that hold an eve
> Sunshine Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. In Chapter 2, you wrote an application that prompts the user for the number of minutes a piece of sports equipment was rented, displays the
> Yummy Catering provides meals for parties and special events. In Chapter 2, you wrote an application that prompts the user for the number of guests attending an event, displays the company motto with a border, and then displays the price of the event and
> Mad Libs is a children’s game in which the players provide a few words that are then incorporated into a silly story. For example, you might ask a child for the name of an animal, a number, and a direction. The child might reply with such answers as dog,
> Mad Libs is a children’s game in which they provide a few words that are then incorporated into a silly story. The game helps children understand different parts of speech because they are asked to provide specific types of words. For example, you might
> Recall how to obtain a random number. For example, the following statement generates a random number between the constants MIN and MAX inclusive and assigns it to a variable named random: random = MIN + (int)(Math.random() * MAX); Write a program that se
> Computer games have been around for a long time: •In 1947, Thomas T. Goldsmith Jr. and Estle Ray Mann filed the first patent for a computer game. •In 1952, A. S. Douglas wrote his University of Cambridge Ph.D. dissertation on human–computer interaction
> Dice are used in many games. One die can be thrown to randomly show a value from 1 through 6. Design a Die class that can hold an integer data field for a value (from 1 to 6). Include a constructor that randomly assigns a value to a die object. For exam
> Computer games often contain different characters or creatures. For example, you might design a game in which alien beings possess specific characteristics such as color, number of eyes, or number of lives. Design a character for a game, creating a class
> Name at least three classes to which each of these objects might belong: a. myRedBicycle b. friedEgg c. cellPhone
> Playing cards are used in many computer games, including versions of such classics as solitaire, hearts, and poker. Design a Card class that contains a character data field to hold a suit (s for spades, h for hearts, d for diamonds, or c for clubs) and a
> Recall how to obtain a random number. For example, the following statement generates a random number between the constants MIN and MAX inclusive and assigns it to a variable named random: random = MIN + (int)(Math.random() * MAX); Write a program that de
> Each of the following files saved in the Chapter03 folder in your downloadable student files has syntax and/or logic errors. In each case, determine and fix the problem. After you correct the errors, save each file using the same filename preceded with F
> Each of the following files in the Chapter02 folder of your downloadable student files has syntax and/or logic errors. In each case, determine the problem and fix the application. After you correct the errors, save each file using the same filename prece
> Each of the following files in the Chapter01 folder in your downloadable student files has syntax and/or logic errors. In each case, determine the problem and fix the errors. After you correct the errors, save each file using the same filename preceded w
> Each of the following files in the Chapter04 folder of your downloadable student files has syntax and/or logic errors. In each case, determine the problem and fix the program. After you correct the errors, save each file using the same filename preceded
> The LocalDate class includes an instance method named lengthOfMonth() that returns the number of days in the month. Write an application that allows the user to enter a month, day, and year and uses methods in the LocalDate class to calculate how many da
> Write an application that prompts a user for the user’s month, day, and year of birth and uses the LocalDate class to compute the day on which the user will become (or became) 10,000 days old. Save the application as TenThousandDaysOld.java.
> Write a program that declares two LocalDate objects and prompts the user for values. Display output that demonstrates the dates displayed when one, two, and three months are added to each of the objects. (When you test the program, be sure to try some da
> Write a Java application that prompts the user for an int and a double and then uses Math class methods to display each of the following: a. The square root of the int b. A random number between 0 and the int (Hint: The Math.random() method returns a val
> Name at least three real-life objects that are instances of each of the following classes: a. Song b. CollegeCourse c. Musician
> a. Create a class to hold data about a high school sports team. The Team class holds data fields for high school name (such as Roosevelt High), sport (such as Basketball), and team name (such as Dolphins). Include a constructor that takes parameters for
> Create a class named BloodData that includes String fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and –). Create a default constructor that sets the fields to O and + and an overloaded const
> Create a FitnessTracker class that includes three data fields for a fitness activity: a String for the name of the activity, an int for the number of minutes spent participating, and a LocalDate for the date. The class includes methods to get each field.
> Create a class named Lease with fields that hold an apartment tenant’s name, apartment number, monthly rent amount, and term of the lease in months. Include a default constructor that initializes the name to XXX, the apartment number to 0, the rent to 10
> Create a class named Person that holds two String objects for the person’s first and last name. Include a constructor that requires an argument for each field. Include get methods for each field. Save the file as Person.java. b. Create a class named Cou
> Create a class named Sandwich. Data fields include a String for the main ingredient (such as tuna), a String for bread type (such as wheat), and a double for price (such as 4.99). Include methods to get and set values for each of these fields. Save the c
> The Renew Your Home Company estimates each job cost as the cost of materials plus $35 per hour while on the job, plus $12 per hour for travel time to the job site. Create a class that contains a main() method that prompts the user for the name of a job (
> The Harrison Group Life Insurance company computes annual policy premiums based on the age the customer turns in the current calendar year. The premium is computed by taking the decade of the customer’s age, adding 15 to it, and multiplying by 20. For ex
> Assume that a gallon of paint covers about 350 square feet of wall space. Create an application with a main() method that prompts the user for the length, width, and height of a rectangular room. Pass these three values to a method that does the followin
> There are 12 inches in a foot and 3 feet in a yard. Create a class named InchConversion. Its main() method accepts a value in inches from a user at the keyboard and then passes the entered value to two methods. One converts the value from inches to feet,
> Name at least three attributes that might be appropriate for each of the following classes: a. RealEstateListing b. Vacation c. CreditCardBill
> Create an application named Percentages whose main() method holds two double variables, and prompt the user for values. Pass both variables to a method named computePercent() that displays the two values and the value of the first number as a percentage
> Create an application named NumbersDemo whose main() method holds two integer variables. Prompt the user for values for the variables. In turn, pass each value to methods named displayTwiceTheNumber(), displayNumberPlusFive(), and displayNumberSquared().
> Suppose that you have created a program with only the following variables: int age = 34; int weight = 180; double height = 5.9; Suppose that you also have a method with the following header: public static void calculate(int age, double size) Which of the
> Create a class named BookBilling that includes three overloaded computeBill() methods for the Happy Memories Company, which sells photo books. ❯ When computeBill() receives no parameters, the method computes the price of one photo book at $14.99, adds 8
> Create a class named Form Letter Writer that includes two overloaded methods named Display Salutation(). The first method takes one String parameter that represents a customer’s first name, and it displays the salutation Dear followed by the first name.
> Suppose that you have created a program with only the following variables: int x = 2; int y = 3; Suppose that you also have a method with the following header: public static void mathMethod(int x) Which of the following method calls are legal? a. mathMet
> Write a program that allows the user to enter an integer number of dollars and calculates and displays the conversion into currency denominations—20s, 10s, 5s, and 1s. Save the program as Dollars.java.
> a. The Huntington Boys and Girls Club is conducting a fundraiser by selling chili dinners to go. The price is $7 for an adult’s meal and $4 for a child’s meal. Write a program that accepts the number of each type of meal ordered, and display the total mo
> Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display th
> Is each of the following method identifiers (a) legal and conventional, (b) legal but unconventional, or (c) illegal? a. associationRules() b. void() c. Golden Retriever() d. invoice#() e. 36542ZipCode() f. PayrollApp() g. getReady() h. 911() i.
> Write a program that declares a variable named inches, which holds a length in inches, and assign a value. Display the value in feet and inches; for example, 86 inches becomes 7 feet and 2 inches. Be sure to use a named constant where appropriate. Save t
> Write a program that declares named constants to represent the number of inches, feet, and yards in a mile. Also declare a variable named miles to represent a number of miles and assign a value to it. Compute and display, with explanatory text, the value
> Write a program that declares a named constant to hold the number of quarts in a gallon (4). Also declare a variable to represent the number of quarts needed for a painting job. Name the variable quartsNeeded, and assign 18 to it. Compute and display the
> Choose the best data type for each of the following so that any reasonable value is accommodated but no memory storage is wasted. Give an example of a typical value that would be held by the variable, and explain why you chose the type you did. a. the nu
> What is the value of each of the following Boolean expressions? a. 15 , 13 b. 8 ,5 (2 1 6) c. 15 55 15 d. 3 .5 3 e. 4 * 2 55 2 * 4 f. 5 , 8 2 3 g. 7 !5 7 h. 8 !5 (2 1 5) i. 10 2 20 55 210 j. 3 1 2 * 6 55 30
> Write a program that accepts as user input the names of three political parties and the number of votes each received in the last mayoral election. Display the percentage of the vote each party received. Save the program as ElectionStatistics.java.
> Write a program that accepts an integer number of minutes from a user and converts it both to hours and days. For example, 6,000 minutes equals 100 hours and equals 4.167 days. Save the program as MinutesConversion.java.
> What is the numeric value of each of the following expressions, as evaluated by Java? a. 4 1 6 * 2 b. 10 / 5 1 8 c. 12 / 4 1 16 / 2 d. 17 / 2 e. 22 / 5 f. 39 / 10 g. 19 % (2 1 3) h. 3 1 4 * 20 / 3 i. 36 % (6 1 2) j. 8 % 2 * 0
> From 1925 through 1963, Burma Shave advertising signs appeared next to highways across the United States. There were always four or five signs in a row containing pieces of a rhyme, followed by a final sign that read Burma Shave. For example, one set of
> Write, compile, and test a class that displays the following statement about comments on two lines: Program comments are nonexecuting statements you add to a file for documentation. Also include the same statement in three different comments in the class
> Is each of the following class identifiers (a) legal and conventional, (b) legal but unconventional, or (c) illegal? a. myClass b. void c. Golden Retriever d. invoice# e. 36542ZipCode f. Apartment g. Fruit h. 8888 i. display Total () j. Accounts_Receivab
> Jerford Company is a well-known manufacturing company with several wholly owned subsidiaries. The company’s stock is traded on the New York Stock Exchange, and the company files all appropriate reports with the SEC. Jerford’s financial statements are aud
> Title III of SOX specifies requirements for the membership of the audit committee and its authority. All publicly traded firms must follow SOX. Required a. Explain the role of the audit committee as SOX specifies, with regard to the annual audit conducte
> The purpose of the Securities Act of 1933 is to regulate the initial offering of a firm’s securities by ensuring that investors are given full and fair disclosure of all pertinent information about the firm. The Securities Exchange Act of 1934 was passed
> On July 1, 20X3, Barker Company purchased 20 percent of Acme Company’s outstanding common stock for $400,000 when the fair value of Acme’s net assets was $2,000,000. Barker does not have the ability to exercise signifi
> A variety of organizational structures are used by major companies, and different approaches to consolidation are sometimes found. Two large and familiar U.S. corporations are Union Pacific and ExxonMobil. Required a. Many large companies have tens or ev
> Match the items in the left-hand column with the descriptions/explanations in the right-hand column.
> What is the theoretically preferred method of presenting a noncontrolling interest in a consolidated balance sheet? a. As a separate item within the liability section. b. As a deduction from (contra to) goodwill from consolidation, if any. c. By means of
> Select the correct answer for each of the following questions. 1. When property other than cash is invested in a partnership, at what amount should the noncash property be credited to the contributing partner’s capital account? a. Contr
> The CDG/Carlos, Dan, and Gail/Partnership has decided to liquidate as of December 1, 20X6. A balance sheet on the date follows: Additional Information 1. Each partner’s personal assets (excluding partnership capital interests) and perso
> The U.S. parent company is preparing its consolidated financial statements for December 31, 20X4. The foreign company’s local currency (LCU) is the functional currency. Information is presented in Data Set A and Data Set B. Data Set B:
> On December 1, 20X1, Micro World Inc. entered into a 120-day forward contract to purchase 100,000 Australian dollars (A$). Micro World’s fiscal year ends on December 31. The direct exchange rates follow: Required Prepare all journal ent
> Select the correct answer for each of the following questions. 1. According to ASC 815, which of the following is not an underlying? a. A security price. b. A monthly average temperature. c. The price of a barrel of oil. d. The number of foreign currency
> In the preparation of a consolidated income statement: a. Income assigned to noncontrolling shareholders always is computed as a pro rata portion of the reported net income of the consolidated entity. b. Income assigned to noncontrolling shareholders alw
> Following is a list of transactions and events that may occur in private, not-for-profit entities. Indicate where each transaction or event should be reported on the entity’s statement of cash flows. Assume that the indirect method of reporting operating
> Pie Corporation acquired 80 percent of Slice Company’s common stock on December 31, 20X5, at underlying book value. The book values and fair values of Slice’s assets and liabilities were equal, and the fair value of th
> Not all business combinations are successful, and many entail substantial risk. Acquiring another company may involve a number of different types of risk. Obtain a copy of the 10-K report for Alphabet Inc. (parent company of Google Inc.) for the year end
> Match the items in the left-hand column with the descriptions/explanations in the right-hand column.
> Amber Corporation holds 80 percent of the stock of Movie Productions Inc. During 20X4, Amber purchased an inventory of snack bar items for $40,000 and resold $30,000 to Movie Productions for $48,000. Movie Productions Inc. reported sales of $67,000 in 20
> Popper Company established a subsidiary and transferred equipment with a fair value of $72,000 to the subsidiary. Popper had purchased the equipment with a 10-year expected life 4 years earlier for $100,000 and has used straight-line depreciation with no
> A 70 percent owned subsidiary company declares and pays a cash dividend. What effect does the dividend have on the retained earnings and noncontrolling interest balances in the parent company’s consolidated balance sheet? a. No effect on either retained
> Water Company owns 80 percent of Fire Company’s outstanding common stock. On December 31, 20X9, Fire sold equipment to Water at a price in excess of Fire’s carrying amount but less than its original cost. On a consolid
> Paragraph Corporation purchased land on January 1, 20X1, for $20,000. On June 10, 20X4, it sold the land to its subsidiary, Sentence Corporation, for $30,000. Paragraph owns 60 percent of Sentence’s voting shares. Required a. Give the worksheet consolida
> Upper Company holds 60 percent of Lower Company’s voting shares. During the preparation of consolidated financial statements for 20X5, the following consolidation entry was made: Investment in Lower 10,000 Land 10,000 Which of the following statements i
> Lorn Corporation purchased inventory from Dresser Corporation for $120,000 on September 20, 20X1, and resold 80 percent of the inventory to unaffiliated companies prior to December 31, 20X1, for $140,000. Dresser produced the inventory sold to Lorn for $
> Blue Company purchased 60 percent ownership of Kelly Corporation in 20X1. On May 10, 20X2, Kelly purchased inventory from Blue for $60,000. Kelly sold all of the inventory to an unaffiliated company for $86,000 on November 10, 20X2. Blue produced the inv
> Selected information from the separate and consolidated balance sheets and income statements of Power Inc. and its subsidiary, Spin Company, as of December 31, 20X8, and for the year then ended is as follows: Additional Information During 20X8, Power sol
> This case focuses on a governmental unit’s general fund. Required Using the CAFR for a governmental entity chosen by your instructor, answer the following questions that relate to the overall government and governmental funds: a. Find the budgetary compa
> Under its established rate structure, Dodge Hospital would have earned patient service revenue of $5,000,000 for the year ended December 31, 20X3. However, Dodge did not expect to collect this amount because of contractual adjustments of $500,000 to thir
> Refer to the data in exercise E16–8. During the liquidation process for the APB Partnership, the following events occurred: 1. During the first month of liquidation, noncash assets with a book value of $85,000 were sold for $65,000, and
> Adams, Peters, and Blake share profits and losses for their APB Partnership in a ratio of 2:3:5. When they decide to liquidate, the balance sheet is as follows: Liquidation expenses are expected to be negligible. No interest accrues on loans with partner