1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
k0ka [10]
3 years ago
12

Write the AddressList method newBusiness. This method searches addresses for an existing business with an identical address (i.e

. an address object for which street matches st and number matches no). If this is found, then the method updates the item in the list to an address with name nm, street st and number no. If no entry with a matching street and number exists, then the method adds a new address to the end of the list with name nm, street st and number no. The method should return the index on Addresses where the address has been updated or added.
Business
1 answer:
max2010maxim [7]3 years ago
5 0

Answer:

See explaination

Explanation:

// Address.java

public class Address {

/**

* The name of the business

*/

private String name;

/**

* The name of the street the business is on

*/

private String street;

/**

* The street number of the business

*/

private int number;

/**

* Constructs an Address that represents a business with name nm,

* at number no on the street st

*/

public Address(String nm, String st, int no)

{

name = nm;

street = st;

number = no;

}

/**

* Returns the name of the business

*/

public String getName()

{

return name;

}

/**

* Returns the name of the street on which the business is located

*/

public String getStreet()

{

return street;

}

/**

* Returns the street number of the business

*/

public int getNumber()

{

return number;

}

}

//end of Address.java

//AddressBook.java

import java.util.ArrayList;

import java.util.List;

public class AddressBook {

/**

* The list of business addresses. No two businesses in the list

* can have the same address (both the same street and street number)

*/

private List<Address> addresses;

/**

* Constructs an empty AddressBook

*/

public AddressBook()

{

addresses = new ArrayList<Address>();

}

/**

* atparam st the name of a street

* atreturn a list with the names of each business with an address on that street

*/

public List<String> onStreet(String st)

{

// create an empty output list of names of business

List<String> businessName = new ArrayList<String>();

// loop over the list of addresses

for(int i=0;i<addresses.size();i++)

{

// if ith street of address = nm, add the name of the business to the output list

if(addresses.get(i).getStreet().equalsIgnoreCase(st))

businessName.add(addresses.get(i).getName());

}

return businessName; // return the list

}

/**

* Searches for an existing business with an identical address (street and number

* both match). Updates the record to an address with name nm, street st and number no.

* If no entry already exists adds a new address to the end of the list with these parameters.

*

* atparam nm the name of the business

* atparam st the street the business is on

* atparam no the street number of the business

* atreturn the index of where the business address is on the list

*/

public int newBusiness(String nm, String st, int no)

{

// loop over the list of addresses

for(int i=0;i<addresses.size();i++)

{

// if ith index addresses match the street and number of the input st and no

if((addresses.get(i).getStreet().equalsIgnoreCase(st)) && (addresses.get(i).getNumber() == no))

{

addresses.remove(i); // remove the ith address from list

addresses.add(i, new Address(nm,st,no)); // add a new address with the input name, street and number at ith index

return i; // return the index i

}

}

// if no address match, add the business at the end of the list

addresses.add(new Address(nm,st,no));

return addresses.size()-1; // return the last index

}

}

//end of AddressBook.java

You might be interested in
To record a​ 6% stock​ dividend, accountants use​ ________. To record a​ 55% stock​ dividend, accountants use​ ________. A. par
RoseWind [281]

Answer:

Computers

Explanation:

They use computers these days.

5 0
3 years ago
Read 2 more answers
A plaintiff in a successful lawsuit was awarded a judgment of $4800 per month for 5 years. The plaintiff has the need of a fairl
tatiyna

Answer:

58.81% annual

or 3.93% monthly

Explanation:

Using a financial calculator, we can determine the internal rate of return of this investment. The initial outlay is -$110,000, and the 60 $4,800 cash flows follow. The IRR is 3.93 per month. In order to determine the effective annual rate, we can use the following formula:

effective annual rate = (1 + 3.93%)¹² - 1 = 58.81%

8 0
3 years ago
Cost leadership is a sustainable source of competitive advantage only if no barriers exist that prevent competitors from achievi
krek1111 [17]

Answer: false

Explanation:

The statement is false because cost leadership is not really sustainable as it's cost effective due to the maintenance charge required to keep them in a great care despite the low operational cost being runned by the organization

6 0
3 years ago
Sarah's Muffler Shop has one standard muffler that fits a large variety of cars. Sarah wishes to establish a reorder point syste
GarryVolchara [31]

Answer:

Following is the solution for the given problem.

Explanation:

Best order size, EOQ =√2DS/H

EOQ = √2*4700*60/5

EOQ = 336 units.

D = 4700/300 = 15.66.

σ L= √∑σ²

= √3*(5)² = 8.66.

Reorder point, R = D*L+ z σ L

Reorder point, R = 15.66*3 + 1.282*8.66

Reorder point, R = 58 units.

4 0
3 years ago
Port Ormond Carpet Company manufactures carpets. Fiber is placed in process in the Spinning Department, where it is spun into ya
Schach [20]

Answer:

Port Ormond Carpet Company

1. Journal Entries:

Jan. 1:

Debit Materials $82,000

Credit Accounts payable $82,000

To record the purchase of materials on account.

Jan. 2:

Debit Work-in-Process - Spinning $42,600

Credit Materials $42,600

To record the materials requisitioned.

Jan. 2:

Debit Work-in-Process -Tufting $34,700

Credit Materials $34,700

To record carpet backing

Jan. 2:

Debit Overhead - Spinning $3,300

Debit Overhead - Tufting $2,900

Credit Materials $6,200

To record indirect materials used.

Jan. 31:

Debit Work-in-Process - Spinning $26,300

Debit Work-in-Process - Tufting $17,200

Credit Factory labor $43,500

To record direct labor costs.

Jan. 31:

Debit Overhead - Spinning $12,500

Debit Overhead - Tufting $11,900

Credit Factory labor $24,400

To record indirect labor costs.

Jan. 31:

Debit Overhead - Spinning $5,300

Debit Overhead - Tufting $3,100

Credit Factory Depreciation $8,400

To record depreciation costs.

Jan. 31:

Debit Overhead - Spinning $1,000

Debit Overhead - Tufting $800

Credit Factory Insurance $1,800

To record insurance costs.

Jan. 31:

Debit Work-in-Process - Spinning $22,400

Debit Work-in-Process - Tufting $18,250

Credit Factory Overhead $40,650

To record overhead costs applied.

Jan. 31:

Debit Work-in-Process - Tufting $90,000

Credit Work-in-Process - Spinning $90,000

To record the transfer to Tufting department.

Debit Finished Goods Inventory $153,200

Credit Work-in-Process- Tufting $153,200

To record the transfer to Finished Goods.

Jan. 31:

Debit Cost of Goods Sold $158,000

Credit Finished Goods $158,000

To record the cost of goods sold.

2. January 31 balances of the inventory accounts:

Finished Goods = $3,500

Work-in-Process - Spinning = $3,300

Work-in-Process - Tufting = $9,550

Materials = $600

3. Factory Overhead Accounts- Spinning:

Account Titles                   Debit      Credit

Jan. 31 Materials (Indirect)  3,300

Indirect labor                     12,500

Depreciation exp.               5,300

Factory insurance               1,000

Applied overhead                         22,400

Overapplied overhead         300

Factory Overhead Accounts- Tufting:

Account Titles                   Debit      Credit

Materials (Indirect)          $2,900

Indirect labor                    11,900

Depreciation expenses    3,100

Insurance expense             800

Applied overhead  -WIP-Tufting       18,250

Underapplied overhead                       450

Explanation:

a) Data and Calculations:

January 1 Inventories:

Finished Goods = $3,500

Work in Process- Spinning = $2,000

Work in Process - Tufting = $2,600

Materials = $4,800

Finished Goods

Account Titles                      Debit      Credit

Beginning balance             $8,300

Work-in-Process-Tufting  153,200

Cost of Goods Sold                          $158,000

Ending balance                                      3,500

Work-in-Process - Spinning

Account Titles                   Debit      Credit

Beginning balance        $2,000

Materials                        42,600

Direct labor                    26,300

Applied overhead         22,400

Work-in-Process -Tufting        $90,000

Ending balance                            3,300        

Work-in-Process - Tufting

Account Titles                   Debit      Credit

Beginning balance        $2,600

Carpet backing              34,700

Direct labor                     17,200

 Applied overhead          18,250

WIP- Spinning               90,000

Finished Goods                        $153,200

Ending balance                              9,550

 

Cost of Goods Sold

Finished Goods    $158,000

Materials

Account Titles                   Debit       Credit

Beginning balance          $4,800

Accounts payable           82,000

Work-in-Process - Spinning            $42,600

Work-in-Process - Tufting                 37,400

Manufacturing overhead- Spinning   3,300

Manufacturing overhead- Tufting     2,900

Ending balance                                     600

8 0
3 years ago
Other questions:
  • A stadium has two sponsorship deals. Deal A has revenue of $100,000 and expenses of $10,000. Deal B has revenue of $50,000 and e
    7·2 answers
  • This information relates to Hanshew Real Estate Agency.
    14·1 answer
  • Baldwin's turnover rate for this year is 6.27%. This rate is projected to remain the same next year and no further downsizing wi
    7·1 answer
  • Goals that someone else sets for you are more motivational than goals you set for yourself.​ question 1 options:
    13·1 answer
  • A statement of what a company brought in and paid out is called an
    10·1 answer
  • Christina Tilson has been operating a stationary business out of her home. She receives a letter that she is violation of a zoni
    13·1 answer
  • Which of the following claims best indicates the policy that the United States government followed toward business during World
    13·1 answer
  • How is a loan obtained through a pawnshop typically paid off?
    9·1 answer
  • What is Ministry of Freedom ?
    8·1 answer
  • In the buying center, ryan answers the phones, receives and opens the mail, and monitors the incoming email. He sorts through al
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!