Questions
Write a simple phonebook using c++ that read text file name list.txt and has:  first name, last...

Write a simple phonebook using c++ that read text file name list.txt and has:  first name, last name, and phone number as the example:

MIKEL BUETTNER 3545044
ENOCH BUGG 2856220
BRENDON LAVALLEY 433312
QUINTIN CREEK 5200413
JAMISON MILLETT 6243458
FLORENCIO PUMPHREY 3296862
DARRICK FREGOSO 6868442
TOBIAS GLASSMAN 6040564

and then ask the user to add a new contact first name, last name, and phone number and same the information into a file.

Use array and pointer

In: Computer Science

In Python, write a function called user_name that takes two arguments, first_name and last_name and creates...

In Python, write a function called user_name that takes two arguments, first_name and last_name and creates a “user name” consisting of the first three letters of the first name concatenated with the first three letters of the last name.   You can assume ach name is at least three letters long.

Return the new user name.   

your results should yield something like these test cases.

>>> print(user_name("bob", "taft"))

bobtaf

>>>

>>> print(user_name("Ralph", "Waldo"))

RalWal

>>>

In: Computer Science

The cost is estimated to rise by 8.5% in 2017. If the interest rate is 4%, what is the cost of a delay in terms of dollars in 2016?

The cost of replacing a fleet of company trucks with more energy efficient vehicles was $100 million in 2016. The cost is estimated to rise by 8.5% in 2017. If the interest rate is 4%, what is the cost of a delay in terms of dollars in 2016?

A) $5.85 Million

B) $4.33 Million

C) $108.50 Million

D) $104.33 Million

In: Finance

Suppose in 2016 Paula's nominal income was $55,500 and in 2019 her nominal income was $61,000....

Suppose in 2016 Paula's nominal income was $55,500 and in 2019 her nominal income was $61,000. Also suppose the consumer price index in 2016 was 103 and the consumer price index in 2019 was 126. The percentage change in Paula's real income was,

a.

22.3%

b.

11.3%

c.

9.9%

d.

–10.2%

e.

-11.3%

In: Economics

The predetermined overhead rate for manufacturing overhead for 2016 is $5.00 per direct labor hour. Employees...

The predetermined overhead rate for manufacturing overhead for 2016 is $5.00 per direct labor hour. Employees are expected to earn $8.00 per hour and the company is planning on paying its employees $290,000 during the year. However, only 80% of the employees are classified as "direct labor." What was the estimated manufacturing overhead for 2016?

In: Accounting

Add more methods to SmartPhone. hasPhoneNumber: return true if the phone number has been initialized getAreaCode:...

Add more methods to SmartPhone.

  • hasPhoneNumber: return true if the phone number has been initialized
  • getAreaCode: returns the area code of the phone number
  • getPrefix: returns the prefix of the phone number
  • getLineNumber: returns the line number of the phone number.

Given Files:

public class Phone
{
    protected String name;
    protected long number;

    public Phone() {
        this("None", -1);
    }

    public Phone(String name) {
        this(name, -1);
    }

    public Phone(String name, long number) {
        this.name = name;
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public long getNumber() {
        return number;
    }
}

And:

public class Demo3 {

    public static void test(SmartPhone f)
    {
        System.out.print(f);
        if (f.hasPhoneNumber()) {
            System.out.println("Area code: " + f.getAreaCode());
            System.out.println("Prefix: " + f.getPrefix());
            System.out.println("Line number: " + f.getLineNumber());
        }
        System.out.println();
    }

    public static void main(String[] args) {
        SmartPhone test1 = new SmartPhone("Bret", "1234567890");
        SmartPhone test2 = new SmartPhone("Alice", "8059226966", "[email protected]");
        SmartPhone test3 = new SmartPhone();
        test(test1);
        test(test2);
        test(test3);
    }

}

And:

public class SmartPhone extends Phone
{
    private String email;
    private String phone;
    private String phone2;

    public SmartPhone()
    {
        super("None",-1);
        phone = "Not set";
        email = "None";
        phone2 = "Not set";
    }

    public SmartPhone(String name, String phone)
    {
        super(name, Long.parseLong(phone));
        this.phone = phone;
        this.email = "None";
    }

    public SmartPhone(String name, String phone, String email)
    {
        super(name, Long.parseLong(phone));
        this.email = email;
        this.phone = phone;
    }

    public String toString()
    {
        return "Name: " + name + "\n" +
                "Phone: " + phone + "\n" +
                "Email: " + email + "\n";
    }
}

////////////////////////////////////////// Output //////////////////////////////////////////

Name: Bret\n
Phone: 1234567890\n
Email: None\n
Area code: 123\n
Prefix: 456\n
Line number: 7890\n
\n
Name: Alice\n
Phone: 8059226966\n
Email: [email protected]\n
Area code: 805\n
Prefix: 922\n
Line number: 6966\n
\n
Name: None\n
Phone: Not set\n
Email: None\n
\n

In: Computer Science

Colonial Adventure Tours Case The owner of Colonial Adventure Tours knows that being able to run...

Colonial Adventure Tours Case

  • The owner of Colonial Adventure Tours knows that being able to run queries is one of the most important benefits of using a DBMS. In the following exercises, you will use the data in the Colonial Adventure Tours database shown in Figures 1-15 through 1-19 in Chapter 1. (If you use a computer to complete these exercises, use a copy of the Colonial Adventure Tours database so you will still have the original data when you complete Chapter 3 exercises.) In each step, use QBE to obtain the desired results. You can use the query feature in a DBMS to complete the exercises using a computer, or you can simply write a description of how you would complete the task. Check with your instructor if you are uncertain about which approach to take.
  • Save the file on your computer with your last name in the file name. (Example: case_1-1 _Jones.doc)
  • Click the Choose File button to find and select your saved document.
  1. List the name of each trip that does not start in New Hampshire (NH).
  2. List the name and start location for each trip that has the type Biking.
  3. List the name of each trip that has the type Hiking and that has a distance greater than six miles.
  4. List the name of each trip that has the type Paddling or that is located in Vermont (VT).
  5. How many trips have a type of Hiking or Biking?
  6. List the trip name, type, and maximum group size for all trips that have Susan Kiley as a guide.
  7. List the trip name and state for each trip that occurs during the Summer season. Sort the results by trip name within state.
  8. List the name of each trip that has the type Hiking and that is guided by Rita Boyers.
  9. How many trips originate in each state?
  10. How many reservations include a trip with a price that is greater than $20 but less than $75?
  11. List the reservation ID, customer last name, and the trip name for all reservations where the number of persons included in the reservation is greater than four.
  12. List the trip name, the guide’s first name, and the guide’s last name for all trips that originate in New Hampshire (NH). Sort the results by guide’s last name within trip name.
  13. List the reservation ID, customer number, customer last name, and customer first name for all trips that occur in July 2018.
  14. Colonial Adventure Tours calculates the total price of a trip by adding the trip price plus other fees and multiplying the result by the number of persons included in the reservation. List the reservation ID, trip name, customer’s last name, customer’s first name, and total cost for all trips where the number of persons is greater than four.
  15. Create a new table named Hiking that includes all columns in the Reservation table where the trip type is Hiking.
  16. Use an update query to change the OtherFees value in the Hiking table to $5.00 for all records on which the OtherFees value is $0.00.
  17. Use a delete query to delete all trips in the Hiking table where the trip date is 6/12/2018.
  18. One of the reservations agents at Colonial Adventure Tours created the query shown in Figure 2-49 to list each trip name and the last name and first name of each corresponding guide. The query results included 410 records, and he knows that this result is incorrect. Why did he get so many records? What should he change in the query design to get the correct query results?

In: Computer Science

On January 1, 2016, Aspen Company acquired 80 percent of Birch Company's voting stock for $424,000....

On January 1, 2016, Aspen Company acquired 80 percent of Birch Company's voting stock for $424,000. Birch reported a $425,000 book value and the fair value of the noncontrolling interest was $106,000 on that date. Then, on January 1, 2017, Birch acquired 80 percent of Cedar Company for $232,000 when Cedar had a $218,000 book value and the 20 percent noncontrolling interest was valued at $58,000. In each acquisition, the subsidiary's excess acquisition-date fair over book value was assigned to a trade name with a 30-year remaining life.

These companies report the following financial information. Investment income figures are not included.   

2016 2017 2018
Sales:
Aspen Company $ 652,500 $ 785,000 $ 885,000
Birch Company 292,500 335,750 611,200
Cedar Company Not available 213,100 236,600
Expenses:
Aspen Company $ 447,500 $ 485,000 $ 615,000
Birch Company 230,000 251,000 527,500
Cedar Company Not available 203,000 187,000
Dividends declared:
Aspen Company $ 20,000 $ 40,000 $ 50,000
Birch Company 10,000 15,000 15,000
Cedar Company Not available 2,000 10,000

Assume that each of the following questions is independent:

If all companies use the equity method for internal reporting purposes, what is the December 31, 2017, balance in Aspen's Investment in Birch Company account?

What is the consolidated net income for this business combination for 2018?

What is the net income attributable to the noncontrolling interest in 2018?

Assume that Birch made intra-entity inventory transfers to Aspen that have resulted in the following intra-entity gross profits in inventory at the end of each year:

Date Amount
12/31/16 $12,000
12/31/17 16,800
12/31/18 27,600

What is the accrual-based net income of Birch in 2017 and 2018, respectively?

In: Accounting

On January 1, 2016, Aspen Company acquired 80 percent of Birch Company's voting stock for $460,000....

On January 1, 2016, Aspen Company acquired 80 percent of Birch Company's voting stock for $460,000. Birch reported a $470,000 book value and the fair value of the noncontrolling interest was $115,000 on that date. Then, on January 1, 2017, Birch acquired 80 percent of Cedar Company for $164,000 when Cedar had a $124,000 book value and the 20 percent noncontrolling interest was valued at $41,000. In each acquisition, the subsidiary's excess acquisition-date fair over book value was assigned to a trade name with a 30-year remaining life.

These companies report the following financial information. Investment income figures are not included.   

2016 2017 2018
Sales:
Aspen Company $ 545,000 $ 630,000 $ 717,500
Birch Company 268,750 290,750 603,600
Cedar Company Not available 192,900 275,600
Expenses:
Aspen Company $ 382,500 $ 565,000 $ 627,500
Birch Company 211,000 222,000 525,000
Cedar Company Not available 181,000 245,000
Dividends declared:
Aspen Company $ 20,000 $ 45,000 $ 55,000
Birch Company 10,000 20,000 20,000
Cedar Company Not available 2,000 6,000

Assume that each of the following questions is independent:

  1. If all companies use the equity method for internal reporting purposes, what is the December 31, 2017, balance in Aspen's Investment in Birch Company account?

  2. What is the consolidated net income for this business combination for 2018?

  3. What is the net income attributable to the noncontrolling interest in 2018?

  4. Assume that Birch made intra-entity inventory transfers to Aspen that have resulted in the following intra-entity gross profits in inventory at the end of each year:

Date Amount
12/31/16 $11,500
12/31/17 16,400
12/31/18 32,900

What is the accrual-based net income of Birch in 2017 and 2018, respectively?

In: Accounting

On January 1, 2016, Aspen Company acquired 80 percent of Birch Company’s voting stock for $288,000....

On January 1, 2016, Aspen Company acquired 80 percent of Birch Company’s voting stock for $288,000. Birch reported a $300,000 book value, and the fair value of the noncontrolling interest was $72,000 on that date. Then, on January 1, 2017, Birch acquired 80 percent of Cedar Company for $104,000 when Cedar had a $100,000 book value and the 20 percent noncontrolling interest was valued at $26,000. In each acquisition, the subsidiary’s excess acquisition-date fair over book value was assigned to a trade name with a 30-year remaining life.

These companies report the following financial information. Investment income figures are not included.

2016

2017

2018

Sales:

Aspen Company

$415,000

$545,000

$688,000

Birch Company

200,000

280,000

400,000

Cedar Company

Not available

160,000

210,000

Expenses:

Aspen Company

$310,000

$420,000

$510,000

Birch Company

160,000

220,000

335,000

Cedar Company

Not available

150,000

180,000

Dividends declared:

Aspen Company

$ ?20,000

$?40,000

$?50,000

Birch Company

10,000

20,000

20,000

Cedar Company

Not available

2,000

10,000

Assume that each of the following questions is independent:

If all companies use the equity method for internal reporting purposes, what is the December 31, 2017, balance in Aspen’s Investment in Birch Company account?

What is the consolidated net income for this business combination for 2018?

What is the net income attributable to the noncontrolling interest in 2018?

Assume that Birch made intra-entity inventory transfers to Aspen that have resulted in the following intra-entity gross profits in inventory at the end of each year:

Date

Amount

12/31/16

?$10,000

12/31/17

?16,000

12/31/18

?25,000

What is the accrual-based net income of Birch in 2017 and 2018, respectively?

In: Accounting