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 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 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. 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 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.
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
In: Computer Science
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. 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:
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 | $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. 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