Questions
Convert this java code from hashmap into arraylist. import java.io.*; import java.util.*; public class Solution {...

Convert this java code from hashmap into arraylist.
import java.io.*;
import java.util.*;

public class Solution {

        public static void main(String[] args) throws IOException {

                Scanner sc = new Scanner(System.in);
                HashMap labs = new HashMap();

                while (true) {
                        System.out.println("Choose operation : ");
                        System.out.println("1. Create a Lab");
                        System.out.println("2. Modify a Lab");
                        System.out.println("3. Delete a Lab");
                        System.out.println("4. Assign a pc to a Lab");
                        System.out.println("5. Remove a pc from a Lab");
                        System.out.println("6. Quit");

                        int choice = sc.nextInt();
                        String name=sc.nextLine();
                        switch (choice) {
                        case 1:
                                System.out.println("Enter Lab name (i.e. LAB A or LAB B) : ");
                                name = sc.nextLine();
                                labs.put(name, new Lab(name));
                                break;
                        case 2:
                                System.out.println("Enter name of lab to modify : ");
                                name = sc.nextLine();
                                
                                if (labs.containsKey(name)) {
                                        System.out.println("Enter new name to modify : ");
                                        String name2 = sc.nextLine();
                                        Lab lab = labs.get(name);
                                        labs.remove(name);
                                        labs.put(name2, lab);
                                } else {
                                        System.out.println("Invalid name");
                                }

                                break;
                        case 3:
                                System.out.println("Enter name of lab to delete : ");
                                name = sc.nextLine();
                                if (labs.containsKey(name)) {
                                        Lab lab = labs.get(name);
                                        System.out.println("Total pc in this lab are : " + lab.pc_count);
                                        labs.remove(name);
                                } else {
                                        System.out.println("Invalid name");
                                }
                                break;
                        case 4:
                                System.out.println("Enter name of lab to assign a pc : ");
                                name = sc.nextLine();
                                if (labs.containsKey(name)) {
                                        if (labs.get(name).pc_count >= 50) {
                                                System.out.println("cannot assign more pc");
                                        } else {
                                                labs.get(name).pc_count++;
                                        }
                                } else {
                                        System.out.println("Invalid name");
                                }
                                break;
                        case 5:
                                System.out.println("Enter name of lab to assign a pc : ");
                                name = sc.nextLine();
                                if (labs.containsKey(name)) {
                                        if (labs.get(name).pc_count <= 0) {
                                                System.out.println("cannot remove pc");
                                        } else {
                                                labs.get(name).pc_count--;
                                        }
                                } else {
                                        System.out.println("Invalid name");
                                }
                                break;
                        case 6:
                                return;
                        default:
                                System.out.println("Invalid choice choose again.");
                                break;
                        }
                }

        }

        static class Lab {
                String name;
                int pc_count;

                Lab(String name) {
                        this.name = name;
                        pc_count = 0;
                }
        }
}

In: Computer Science

Wildhorse Company has provided information on intangible assets as follows. ● Wildhorse incurred research and development...

Wildhorse Company has provided information on intangible assets as follows.

● Wildhorse incurred research and development costs in 2017 as follows.

Materials and equipment

$150,000

Personnel

281,000

Indirect costs

21,000

$452,000


Wildhorse estimates that these costs will be recouped by December 31, 2020. The materials and equipment purchased have no alternative uses.

● A patent was purchased from Sandhill Company for $810,000 on January 1, 2016. Wildhorse estimated the remaining useful life of the patent to be 10 years. The patent was carried in Sandhill’s accounting records at a net book value of $1,790,000 when Sandhill sold it to Wildhorse.

● During 2017, a franchise was purchased from Clinton Company for $371,000. In addition, 5% of revenue from the franchise must be paid to Clinton. Revenue from the franchise for 2017 was $1,240,000. Wildhorse estimates the useful life of the franchise to be 10 years and takes a full year’s amortization in the year of purchase.

● On January 1, 2017, because of recent events in the field, Wildhorse estimates that the remaining life of the patent purchased on January 1, 2016, is only 5 years from January 1, 2017.

Prepare a schedule showing the intangibles section of Wildhorse’s balance sheet at December 31, 2017. (Enter account name only and do not provide descriptive information.)

WILDHORSE COMPANY
Intangibles Section of Balance Sheet

choose the accounting period                                                                      For the Year Ended December 31, 2017For the Month Ended December 31, 2017December 31, 2017

select an opening section name                                                                      Current AssetsCurrent LiabilitiesIntangible AssetsLong-term InvestmentsLong-term LiabilitiesProperty, Plant and EquipmentStockholders' EquityTotal AssetsTotal Current AssetsTotal Current LiabilitiesTotal Intangible AssetsTotal LiabilitiesTotal Liabilities and Stockholders' EquityTotal Long-term InvestmentsTotal Long-term LiabilitiesTotal Property, Plant and EquipmentTotal Stockholders' Equity

enter an account title

$enter a dollar amount

enter an account title

enter a dollar amount

select a closing section name                                                                      Current AssetsCurrent LiabilitiesIntangible AssetsLong-term InvestmentsLong-term LiabilitiesProperty, Plant and EquipmentStockholders' EquityTotal AssetsTotal Current AssetsTotal Current LiabilitiesTotal Intangible AssetsTotal LiabilitiesTotal Liabilities and Stockholders' EquityTotal Long-term InvestmentsTotal Long-term LiabilitiesTotal Property, Plant and EquipmentTotal Stockholders' Equity

$enter a total amount for this section

eTextbook and Media

List of Accounts

  

  

Prepare a schedule showing the income statement effect (related to expenses) for the year ended December 31, 2017, as a result of the facts above. (Enter account name only and do not provide descriptive information.)

WILDHORSE COMPANY
Income Statement Effect

choose the accounting period                                                                      For the Month Ended December 31, 2017December 31, 2017For the Year Ended December 31, 2017

select an opening name for section one                                                                      Research and Development CostsAmortization of Franchise for 2017Amortization of Patent for 2017Total Charged against IncomePatent from Sandhill CompanyFranchise from Clinton CompanyPayment to Clinton Company:

select an account title                                                                      Amortization of Patent for 2017Patent from Sandhill CompanyAmortization of Franchise for 2017Franchise from Clinton CompanyTotal Charged against IncomeResearch and Development CostsPayment to Clinton Company

$enter a dollar amount

select an opening name for section two                                                                      Amortization of Franchise for 2017Research and Development CostsPayment to Clinton CompanyAmortization of Patent for 2017Franchise from Clinton CompanyTotal Charged against IncomePatent from Sandhill Company:

select an account title                                                                      Total Charged against IncomeFranchise from Clinton CompanyResearch and Development CostsAmortization of Patent for 2017Patent from Sandhill CompanyPayment to Clinton CompanyAmortization of Franchise for 2017

$enter a dollar amount

select an account title                                                                      Payment to Clinton CompanyPatent from Sandhill CompanyTotal Charged against IncomeFranchise from Clinton CompanyAmortization of Franchise for 2017Research and Development CostsAmortization of Patent for 2017

enter a dollar amount

enter a subtotal of the two previous amounts

select an account title                                                                      Total Charged against IncomeAmortization of Franchise for 2017Franchise from Clinton CompanyPatent from Sandhill CompanyResearch and Development CostsPayment to Clinton CompanyAmortization of Patent for 2017

enter a dollar amount

select a closing name for this statement                                                                      Franchise from Clinton CompanyPayment to Clinton CompanyPatent from Sandhill CompanyTotal Charged against IncomeResearch and Development CostsAmortization of Franchise for 2017Amortization of Patent for 2017

$enter a total amount for this statement

In: Accounting

The reaction of nitric oxide, NO, with hydrogen, H2, produces nitrogen, N2, and water, H2O, according...

The reaction of nitric oxide, NO, with hydrogen, H2, produces nitrogen, N2, and water, H2O, according to the equation

2 NO + 2 H2 ? N2 + 2 H2O

A student obtained the following data:

Experiment

Initial [H2]/
mol L?

Initial [NO]/
mol L?

Initial rate/
mol L?1 s?1

1

0.20

0.20

3.2 x 10-3

2

0.40

0.20

1.3 x 10-2

3

0.20

0.40

6.4 x 10-3

(a) Determine the most probable rate equation for the reaction, with v for the reaction rate and k for the rate coefficient.

(b) Evaluate the numerical value (with units) of the rate coefficient.

(c) Choose the appropriate matches below. Note that some of the units have to be expressed in a particular way in the drop down menus, e.g. L4 shows as L4, s-1 looks like s-1, L4 s-1 looks like L4 s-1.

Background reading:

the Chemguide concentration dependence page (38kB)

the Chem guide orders and mechanism page (28kB)

Energy section Powerpoint lecture notes

Order with respect to [NO]

Answer 1Choose...0.4 L2 mol-2 s-12.0 L2 mol-2 s-121reaction rate0.4 s-10.08 L2 mol-2 s-1

Order with respect to [H2]

Answer 2Choose...0.4 L2 mol-2 s-12.0 L2 mol-2 s-121reaction rate0.4 s-10.08 L2 mol-2 s-1

v

Answer 3Choose...0.4 L2 mol-2 s-12.0 L2 mol-2 s-121reaction rate0.4 s-10.08 L2 mol-2 s-1

k

Answer 4Choose...0.4 L2 mol-2 s-12.0 L2 mol-2 s-121reaction rate0.4 s-10.08 L2 mol-2 s-1

In: Other

You are the CSCO for Swashbuckler Enterprises (SE). You CEO just left your office and she is not happy. She thinks all the SCM department does is spend, spend, spend and never creates value for the firm.

You are the CSCO for Swashbuckler Enterprises (SE). You CEO just left your office and she is not happy. She thinks all the SCM department does is spend, spend, spend and never creates value for the firm. Furthermore, she holds up the Marketing department as the primary source of revenue and hence, customer effectiveness. In order to exonerate the SCM department and ultimately, your own name, you have decided to run the numbers on your most recently concluded negotiation (Q4 of 2016) to show once and for all how SCM can create value. In this negotiation, you were able to get your supply base to reduce the COGS by 8%. Assignment: Using the numbers below , answer the questions below. Table 1 Earnings and Expenses for Q4. 2016: Pre-negotiation Sales $9,250,000 Cost of Goods Sold $8,500,000 Profit $750,000 

1. What is the new COGS after the 8% negotiated reduction? 

2. What is the resulting new profit? 

3. What is the difference between the old and new profit, both in terms of dollar amount and percentage? 

4. What is the resulting new contribution to profit, per dollar of sales? 

5. How much does the Marketing department need to increase sales in order to match the same increase in profit? NOTE: Round your answers up Your SCM department has been able to negotiate an additional 4% reduction in the COGS. Using the sales figure from Table 1 and your answers to questions 1-3, answer the following.

In: Finance

The following transactions and adjusting entries were completed by a local delivery company called Fast Delivery....

The following transactions and adjusting entries were completed by a local delivery company called Fast Delivery. The company uses straight-line depreciation for delivery vehicles, double-declining-balance depreciation for buildings, and straight-line amortization for franchise rights.


January 2 , 2015

Paid $179,000 cash to purchase a small warehouse building near the airport. The building has an estimated life of 20 years and a residual value of $3,700.

July 1 , 2015

Paid $47,000 cash to purchase a delivery van. The van has an estimated useful life of five years and a residual value of $9,400.

October 2 , 2015

Paid $700 cash to paint a small office in the warehouse building.

October 13 , 2015 Paid $100 cash to get the oil changed in the delivery van.
December 1 , 2015

Paid $84,000 cash to UPS to begin operating Fast Delivery business as a franchise using the name The UPS Store. This franchise right expires in five years.

December 31 , 2015

Recorded depreciation and amortization on the delivery van, warehouse building, and franchise right.

June 30 , 2016

Sold the warehouse building for $143,000 cash. (Record the depreciation on the building prior to recording its disposal.)

December 31 , 2016

Recorded depreciation on the delivery van and amortization on the franchise right. Determined that the franchise right was not impaired in value.


Required:

Prepare the journal entries required on each of the above dates. (If no entry is required for a transaction/event, select "No Journal Entry Required" in the first account field. Do not round intermediate calculations.)

In: Accounting

Observation: Hiking trails with more human foot traffic have less woody vegetation (e.g, trees) than hiking...

Observation: Hiking trails with more human foot traffic have less woody vegetation (e.g, trees) than hiking trails with less human traffic.

experiment:

  • Three trails were assessed during this experiment: one where the foot traffic was measured to be 75-100 pedestrians passing by each hour, the second with only 25-50 pedestrians each hour, and one where there was only 1-10 pedestrians per hour.
  • 10 x 10 foot quadrants were laid out at ten locations throughout the trail and the number of woody plants was counted and averaged.

Write a complete methods section describing your experiment design. This methods section should follow all the rules discussed in ecology lab.

In: Biology

7. Suppose that we are given that there exists a random variable X whose distribution is...

7. Suppose that we are given that there exists a random variable X whose distribution is binomial with parameters are n = 500 and p= 0.300, and here X represents the number of desired outcomes of the random experiment and n-X is the number of undesired outcomes obtained from a random experiment of n independent trials. From this random experiment   p̂ sample proportion is found as X/n. (Round your answers to 3 decimal places in all parts.)

  1. What is the expected value of this statistic?

Expected value:

  1. Within what limits will 99% of the sample proportion occur?

Value of sample proportion is between …................ and …................

  1. What is the probability that sample proportion exceed 0.353

Probability:

  1. What is the probability that sample proportion less than 0.247

Probability:

In: Statistics and Probability

Use the following to answer questions 7-8: ​The following table represents buyers' values and sellers' costs from a market experiment like the one you did in recitation


Use the following to answer questions 7-8: 

The following table represents buyers' values and sellers' costs from a market experiment like the one you did in recitation. The same assumptions apply: each agent may make only one transaction and fractions of a unit may not be traded.

image.png

7. Using the data from the market experiment, which of the following is closest to the total surplus generated in this market? 

A) 160 B) 410 C) 530 D) 950 

8. Using the data from the market experiment in the table above, which of the following is closest to the minimum deadweight loss that would arise from a price floor set at $300 

A) 0 B) 30 C) 100 D) 250 g

In: Economics

3. As we have seen in class, hypothesis testing and confidence intervals are the most common...

3. As we have seen in class, hypothesis testing and confidence intervals are the most common inferential tools used in statistics. Imagine that you have been tasked with designing an experiment to determine reliably if a patient should be diagnosed with diabetes based on their blood test results. Create a short outline of your experiment, including all of the following:

  1. A detailed discussion of your experimental design.
  2. How is randomization used in your sampling or assignment strategy?
  3. The type of inferential test utilized in your experiment.
  4. A formal statement of the null and alternative hypothesis for your test.
  5. A confidence interval for estimating the parameter in your test.
  6. An interpretation of your p-value and confidence interval, including what they mean in context of your experimental design

In: Statistics and Probability

Which of the following are ultimate decomposers? bacteria fungi millipedes Collembolans mites earthworms Only A and...

  1. Which of the following are ultimate decomposers?

    bacteria

    fungi

    millipedes

    Collembolans

    mites

    earthworms

    Only A and B.

    C, D, E, and F are all reducer decomposers. So are vultures!

  2. Which of the following are reducer decomposers?

    bacteria

    fungi

    millipedes

    Collembolans

    mites

    earthworms

    Only A and B.

    C, D, E, and F are all reducer decomposers. So are vultures!

    You want to conduct an experiment on decomposition in the temperate deciduous forest. Which of the following would be usable variables for your experiment?

    Mesh size in litter bags.

    Placement of a banana peel into several different biomes.

    Designing a lab experiment where you drop leaves into hydrochloric and nitric acids.

    Both A and B.

    Both B and C.

    Both A and C.

               

In: Biology