Questions
// -Type in your name in the space provided above in this comment header. // -Fill...

// -Type in your name in the space provided above in this comment header.
// -Fill in the code that will perform the actions. See the comments
//   (in the code) that describes what to do.

// -The output must match the output given to you by the instructor.
// -After the last brace, in this code on a new line, make a comment
//   stating your name and what your major is at PSU.
//=====================================================================

import java.util.Scanner;
import java.util.*;
import java.util.ArrayList;

public class W7_InClass_Lab
{

static ArrayList<String> players = new ArrayList<String>(Arrays.asList
("Frank", "Chase", "Ryan", "Carlos", "Cole", "Jimmy"));

//---------------------------------------------------------------------
public static void main(String[] args)
   {
   int n, idx;
   boolean itWorked;
   Scanner kb = new Scanner (System.in);
     
   System.out.println ("\n(1-6): Testing student knowldege with ArrayLists.");
   System.out.println ("Before: " + players.toString());


   //-- (1) Check to see if "Carlos" is on the list. Display a msg
   //-- stating whether he is in the list or not.

   //-- (2) Remove "Frank" from list.

   //-- (3) Add "Pedro" to the list, before "Jimmy".

   //-- (4) Add "Shane" to the end of list.

   //-- (5) Find out how many players are in the list.

   //-- (6) Print out the Array List with all of the changes.
   System.out.println ("After: " + players.toString());   // xxxx

   //-- (7) Use the code below that converts an integer to binary.
   //--   Add code so there is a spave between every 8 bits, to make the
   //--   output more redable.

   String binaryStr = "";
   int saveInt, intValue, quotient, remainder;
   int cnt = 0;
  
   System.out.println ("\n(7) Converting an unsigned Integer to binary.");
   System.out.print ("Enter an integer value: ");
   intValue = kb.nextInt();

   if (intValue >= 0)
       {
       saveInt = intValue;

       while (intValue > 0)
           {
           remainder = intValue % 2;
           intValue = intValue / 2;
           binaryStr = (char)(remainder+48) + binaryStr;
           }
       System.out.printf ("After Conversion: %d(10) = %s(2).\n", saveInt, binaryStr);
       }

   //-- (8) Use the array called grades, below.
   //--   starting with index 0m use a for loop to change every other
   //--   grade to 100.
   //--   Printf what the array was BEFORE the changes, and AFTER then Changes.
      
   System.out.println ("\n(8) Laying with an array");      

   int grades[] = { 87, 95, 65, 70, 77, 99, 0, 65, 25, 80, 90, 11 };


   //-- (9) Don't allow the quadratic formula below to crash.
   //-- Add checks for the two possible ways the formula can crash.
   //-- Print out different msgs stating what the problem is,
   //--   Otherwise do the calculations
              
   double a, b, c;
   double underRadical, denominator, answer1, answer2;
  
   System.out.println ("\n(9)Calculating the quadratic formula: ");
   System.out.print ("Enter a value for a: ");
   a = kb.nextDouble();
   System.out.print ("Enter a value for b: ");
   b = kb.nextDouble();
   System.out.print ("Enter a value for c: ");
   c = kb.nextDouble();

   underRadical = (b * b) - (4 * a * c);
   denominator = 2 * a;
  
   answer1 = ((-1.0 * b) - Math.sqrt(underRadical)) / denominator;
   answer2 = ((-1.0 * b) + Math.sqrt(underRadical)) / denominator;
   System.out.println();
   System.out.printf ("Quad.Form., negative answer = %.4f.\n", answer1);
   System.out.printf ("Quad.Form., positive answer = %.4f.\n", answer2);
   } // end-main
} // end-class

In: Computer Science

5.32 Fuel efficiency of manual and automatic cars, Part I: Each year the US Environmental Protection...

5.32 Fuel efficiency of manual and automatic cars, Part I: Each year the US Environmental Protection Agency (EPA) releases fuel economy data on cars manufactured in that year. Below are summary statistics on fuel efficiency (in miles/gallon) from random samples of cars with manual and automatic transmissions manufactured in 2012. Do these data provide strong evidence of a difference between the average fuel efficiency of cars with manual and automatic transmissions in terms of their average city mileage? Assume that conditions for inference are satisfied.

City MPG, Automatic City MPG, Manual
Mean 16.12 19.85
SD 3.58 4.51
n 26 26



The hypotheses for this test are:

  • Ho: μautomatic = μmanual
    Ha: μautomatic < μmanual
  • Ho: μautomatic = μmanual
    Ha: μautomatic > μmanual
  • Ho: μautomatic = μmanual
    Ha: μautomatic ≠ μmanual


The test statistic is:  (please round to two decimal places)
The p-value is:  (please round to four decimal places)
Interpret the result of the hypothesis test in the context of the problem:

  • The data do not provide sufficient evidence that there is a difference between the average fuel efficiency of manual and automatic cars in terms of their average city mileage
  • The data provide sufficient evidence that there is a difference between the average fuel efficiency of manual and automatic cars in terms of their average city mileage
  • The data provide sufficient evidence that there is no difference between the average fuel efficiency of manual and automatic cars in terms of their average city mileage

In: Math

scenario:You have been asked to serve on a committee that advises the World Bank about how...

scenario:You have been asked to serve on a committee that advises the World Bank about how to fund a healthcare system in the developing world. As part of this role you need to design a healthcare system for the country described below costing no more than $500 million that keeps the largest possible number of people healthy:
This country is about the size of Texas—250,000 square miles. A mountain range separates the country into two regions.
Ten million people live in the coastal region, while five million live in the inland region.
Half the people live in urban areas, and the other half are evenly distributed through the country.
The coastal region has a hot, moist, tropical climate that supports lush jungles and fertile farmland.
The inland region is dry and cool and is predominantly grassland and forest.
The coastal region is well serviced by roads, but only about half the people in the inland region have convenient access to roads.
Only the largest cities and towns have modern sanitation.
Malnutrition and malaria are problems, few people are vaccinated, and there is little health care currently available.
Most people grow their own food and have little extra money to spend. Few children attend school.
Challenge: Think of health care options for this country in terms of:
1. What are some options which should be included?
2. What are some options which should not be included ?

In: Economics

scenario:You have been asked to serve on a committee that advises the World Bank about how...

scenario:You have been asked to serve on a committee that advises the World Bank about how to fund a healthcare system in the developing world. As part of this role you need to design a healthcare system for the country described below costing no more than $500 million that keeps the largest possible number of people healthy:
This country is about the size of Texas—250,000 square miles. A mountain range separates the country into two regions.
Ten million people live in the coastal region, while five million live in the inland region.
Half the people live in urban areas, and the other half are evenly distributed through the country.
The coastal region has a hot, moist, tropical climate that supports lush jungles and fertile farmland.
The inland region is dry and cool and is predominantly grassland and forest.
The coastal region is well serviced by roads, but only about half the people in the inland region have convenient access to roads.
Only the largest cities and towns have modern sanitation.
Malnutrition and malaria are problems, few people are vaccinated, and there is little health care currently available.
Most people grow their own food and have little extra money to spend. Few children attend school.
Challenge: Think of health care options for this country in terms of:
1. What are some options which should be included?
2. What are some options which should not be included ?

In: Economics

Fork Motor Company is an automobile manufacturer operating in the US. It has divided its market...

Fork Motor Company is an automobile manufacturer operating in the US.

It has divided its market into three regions and has built three regional distribution centers (RDC) to serve these markets. The RDCs are located in California, Florida and Texas.

The annual demand at each regional distribution center is estimated as follows and the company wants to meet all the demand.

- RDC – California: 1.5M automobiles (i.e., 1.5 million)

- RDC – Florida: 0.5M automobiles

- RDC – Texas: 1M automobiles

Fork Motor has two plants in Michigan and Nevada and wants to distribute the automobiles to the RDCs at the lowest cost. So they need to decide how many cars to ship from each of the plants to each of the RDCs to achieve minimum cost. You are asked to model and solve this allocation problem.

Below, you are given the shipping distance between Fork Motor’s facilities in miles.

Plant – Michigan

Plant – Nevada

RDC – California

2000

300

RDC – Florida

1000

1300

RDC – Texas

1200

800

The head of supply chain informs you that you need to consider the capacity limits of the plants. The Michigan plant is much larger than the one in Nevada. He adds that the capacity limits are as follows:

- Plant – Michigan: 2.5M

- Plant – Nevada: 0.7M

The company estimates that transportation of each car will cost 8.53 dollars per mile.

What is the minimum cost of shipping cars to RDCs in million dollars?

In: Accounting

scenario:You have been asked to serve on a committee that advises the World Bank about how...

scenario:You have been asked to serve on a committee that advises the World Bank about how to fund a healthcare system in the developing world. As part of this role you need to design a healthcare system for the country described below costing no more than $500 million that keeps the largest possible number of people healthy:
This country is about the size of Texas—250,000 square miles. A mountain range separates the country into two regions.
Ten million people live in the coastal region, while five million live in the inland region.
Half the people live in urban areas, and the other half are evenly distributed through the country.
The coastal region has a hot, moist, tropical climate that supports lush jungles and fertile farmland.
The inland region is dry and cool and is predominantly grassland and forest.
The coastal region is well serviced by roads, but only about half the people in the inland region have convenient access to roads.
Only the largest cities and towns have modern sanitation.
Malnutrition and malaria are problems, few people are vaccinated, and there is little health care currently available.
Most people grow their own food and have little extra money to spend. Few children attend school.
Challenge: Think of health care options for this country in terms of:
1. What are some options which should be included?
2. What are some options which should not be included ?

In: Nursing

scenario:You have been asked to serve on a committee that advises the World Bank about how...

scenario:You have been asked to serve on a committee that advises the World Bank about how to fund a healthcare system in the developing world. As part of this role you need to design a healthcare system for the country described below costing no more than $500 million that keeps the largest possible number of people healthy:
This country is about the size of Texas—250,000 square miles. A mountain range separates the country into two regions.
Ten million people live in the coastal region, while five million live in the inland region.
Half the people live in urban areas, and the other half are evenly distributed through the country.
The coastal region has a hot, moist, tropical climate that supports lush jungles and fertile farmland.
The inland region is dry and cool and is predominantly grassland and forest.
The coastal region is well serviced by roads, but only about half the people in the inland region have convenient access to roads.
Only the largest cities and towns have modern sanitation.
Malnutrition and malaria are problems, few people are vaccinated, and there is little health care currently available.
Most people grow their own food and have little extra money to spend. Few children attend school.
Challenge: Think of health care options for this country in terms of:
1. What are some options which should be included?
2. What are some options which should not be included ?

In: Nursing

scenario:You have been asked to serve on a committee that advises the World Bank about how...

scenario:You have been asked to serve on a committee that advises the World Bank about how to fund a healthcare system in the developing world. As part of this role you need to design a healthcare system for the country described below costing no more than $500 million that keeps the largest possible number of people healthy:
This country is about the size of Texas—250,000 square miles. A mountain range separates the country into two regions.
Ten million people live in the coastal region, while five million live in the inland region.
Half the people live in urban areas, and the other half are evenly distributed through the country.
The coastal region has a hot, moist, tropical climate that supports lush jungles and fertile farmland.
The inland region is dry and cool and is predominantly grassland and forest.
The coastal region is well serviced by roads, but only about half the people in the inland region have convenient access to roads.
Only the largest cities and towns have modern sanitation.
Malnutrition and malaria are problems, few people are vaccinated, and there is little health care currently available.
Most people grow their own food and have little extra money to spend. Few children attend school.
Challenge: Think of health care options for this country in terms of:
1. What are some options which should be included?
2. What are some options which should not be included ?

In: Nursing

"A contributing factor to an airplane's duel consumption is the bypass ratio of the engine system....

"A contributing factor to an airplane's duel consumption is the bypass ratio of the engine system. The bypass ratio is the amount of air passing around the engine core relative to the amount of air passing through the core. An airplane manufacturer is designing a new airplane and wants to determine the bypass ratio for the airplane's engine system. The airplane will fly 4,100 hours per year and will average 480 miles per hour. The amount of fuel that the airplane consumes can be expressed as:
z = 0.0497 - (7.92*10^-4) * y
for 4 < y < 12
where y is the bypass ratio (a unitless number) and z is the number of gallons of fuel consumed per mile flown by the airplane. The cost of fuel remains constant at $4.29 per gallon.
The initial cost of the engine system as a function of the bypass ratio is $312,000 + $2,800y^2.
The engine system will be used for 9 years. At the end of 9 years, the salvage value of the engine system as a function of bypass ratio is $10,000y. The airplane manufacturer wants to minimize the annual equivalent cost (AEC) of the engine system (which includes the initial cost, the annual cost of fuel, and the salvage value). The manufacturer's MARR is 13.9%. What is the optimal bypass ratio rounded to the nearest tenth that minimizes the AEC of the engine system?
(The optimal answer for the bypass ratio is between 4 to 12, but it should not be necessary to consider that constraint in your calculations.)"

In: Finance

Natalie is also thinking of buying a van that will be used only for business. The...

Natalie is also thinking of buying a van that will be used only for business. The cost of the van is estimated at $38,500. Natalie would spend an additional $2,500 to have the van painted. In addition, she wants the back seat of the van removed so that she will have lots of room to transport her mixer inventory as well as her baking supplies. The cost of taking out the back seat and installing shelving units is estimated at $1,500. She expects the van to last her about 5 years, and she expects to drive it for 100,000 miles. The annual cost of vehicle insurance will be $2,400. Natalie estimates that at the end of the 5-year useful life the van will sell for $6,500. Assume that she will buy the van on August 15, 2018, and it will be ready for use on September 1, 2018. Natalie is concerned about the impact of the van’s cost on her income statement and balance sheet. She has come to you for advice on calculating the van’s depreciation. Instructions:

(a) Determine the cost of the van.

(b) Prepare a depreciation table for straight-line depreciation (similar to the one in Illustration 9-9). Recall that Cookie Creations has a December 31 fiscal year-end.

(c) What method should Natalie use for tax purposes? Provide a justification for your choice. Is she required to use the same approach for financial reporting and tax reporting?

In: Accounting