Company A is the Lessee.
Company B is the Lessor.
Company B rents an asset to Company A for a term of 3 years. The economic life of the asset is 3 years. Therefore both Company A and Company B conclude that this lease contract is a Finance lease from Company A’s point of view. At the end of the lease term the asset is expected to have no residual value and so “residual value” is NOT a relevant matter to prepare the Lessee’s accounting.
The lease contract provides that lease payments are made in ADVANCE. The three equal annual Lease payments will be $10,000. You should describe the three years as YEAR 1, YEAR 2 and YEAR 3. You should have the lease payments made on 1/1 of each year and each lease year run from 1/1/ to 12/32
Company B discloses that is implied lease rate is 3%.
Use the following table for any Present Value or Annuity Factors you require for calculations:
|
Table |
||||||||
|
FACTORS |
||||||||
|
YEAR “n” |
PRESENT VALUE of 1 TABLE 6-2 |
FUTURE VALUE of 1 Table 6-1 |
PV of ORDINARY ANNUITY of 1 Table 6-4 Payments at End |
PV of ANNUITY DUE of 1 Table 6-5 Payments at Beginning |
||||
|
Discount Rates (“j”) |
3% |
4% |
4% |
5% |
4% |
5% |
3% |
4% |
|
1 |
.97087 |
.96154 |
1.04000 |
1.05000 |
.96154 |
.95238 |
1.00000 |
1.00000 |
|
2 |
.94260 |
.92456 |
1.08160 |
1.10250 |
1.88609 |
1.85941 |
1.97087 |
1.96154 |
|
3 |
.91514 |
.88900 |
1.12486 |
1.15763 |
2.77509 |
2.72325 |
2.91347 |
2.88609 |
|
4 |
.88849 |
.85480 |
1.16986 |
1.21551 |
3.62990 |
3.54595 |
3.82861 |
3.77509 |
|
5 |
.86261 |
.82193 |
1.21665 |
1.27628 |
4.45182 |
4.32948 |
4.71710 |
4.62990 |
In: Accounting
In this homework, we will write the code that will take an expression (input) from the user in infix notation and convert that to corresponding postfix notation and evaluate its value.
Task 0: Use the starter code to start. All the needed functions and their functionalities are given in the starter code.
Task 1: Complete the startercodeinfixtopostfix.c file
Task 2: Complete the startercodeevaluatepostfix.c file
Sample Input/Output:
(Infix to postfix)
Input: (A + B)*C-D*E
Output: A B + C * D E * -
Input: ( ( A + B ) * D ) ↑ ( E - F)
Output: A B + D * E F-^
Input: ((A – (B + C)) * D) ↑ (E + F)
Output: A B C + - D * E F + ↑
Input: a + b * c + (d * e + f) * g
Output: a b c * + d e * f + g * +
Input: (4+8)*(6-5)/((3-2)*(2+2))
Output: 4 8 + 6 5 - * 3 2 – 2 2 + * /
Input: 3+4*5/6
Output: 3 4 5 * 6 /+
Input: 3 + (4 * 5 – (6 / 7 ↑ 1 ) * 9 ) * 1
Output: 345*671^/9*-1*+
(Evaluate postfix expression)
Input: 4 8 + 6 5 - * 3 2 – 2 2 + * /
Evaluation result: 3
Input: 3 4 5 * 6 /+
Evaluation result: 6
Input: 345*671^/9*-1*+
Evaluation result: 23
StarterCodeEvaluatePostfix.c:
#define SIZE 50 /* Size of Stack */
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
int stack[SIZE];
int top=-1; /* Global declarations */
/* Function for PUSH operation */
void push(int item)
{
}
/* Function for POP operation */
int pop()
{
}
/* Function for precedence */
int pr(char elem)
{
}
//Evaluate postfix expression
void evaluatepostfix (char pofx[])
{
}
/* main function begins */
int main()
{
char postfix[SIZE];
printf("ASSUMPTION: The postfix expression contains single letter variables and single digit constants only.\n");
printf("\nEnter postfix expression : ");
scanf("%s",postfix);
evaluatepostfix(postfix);
return 0;
}
StarterCodeInfixToPostfix.c
#define SIZE 50 /* Size of Stack */
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
char stack[SIZE];
int top=-1; /* Global declarations */
/* Function for PUSH operation */
void push(char item)
{
}
/* Function for POP operation */
char pop()
{
}
/* Function for precedence */
int pr(char elem)
{
}
/* Function for infix to postfix conversion */
void InfixToPostfix(char infx[], char pofx[])
{
}
/* main function begins */
int main()
{
char infix[SIZE], postfix[SIZE]; /* declare infix string and postfix string */
printf("ASSUMPTION: The infix expression contains single letter variables and single digit constants only.\n");
printf("\nEnter Infix expression : ");
scanf("%s",infix);
InfixToPostfix(infix,postfix); /* call to convert */
printf("\n\nGiven Infix Expn: %s Postfix Expn: %s\n",infix,postfix);
return 0;
}In: Computer Science
|
Condition 1 Scores |
Condition 2 Scores |
|
|
1 |
8 |
|
|
2 |
3 |
|
|
3 |
4 |
|
|
3 |
10 |
|
|
4 |
2 |
|
|
4 |
8 |
|
|
4 |
7 |
|
|
5 |
7 |
|
|
2 |
8 |
|
|
6 |
9 |
|
|
2 |
10 |
|
|
5 |
10 |
|
|
Column Mean |
||
|
Column Median |
||
|
Column Mode |
||
|
Standard Deviation |
||
|
Column Range |
1. The correct mean for Condition One is _______ while the correct mean for Condition Two is ______:
A. 3.50 and 8.00
B. 3.42 and 7.17
C. 4.00 and 8.00
D. 1.51 and 2.76
E. 7.17 and 3.42
2. The correct standard deviation for Condition One is ________ while the correct standard deviation for Condition Two is _______
A. 3.50 and 8.00
B. 3.42 and 7.17
C. 4.00 and 8.00
D. 1.51 and 2.76
E. 7.17 and 3.42
3. Which of the following is true about the mode?
A. Condition One has one mode while Condition Two has two modes
B. Condition Two has one mode while Condition One has two modes
C. The mode(s) for Conditions One and Two are different
D. The mode(s) for Conditions One and Two are the same
3. Imagine you ran a t-Test on this data to see if Condition One differs significantly from Condition Two. You got the following Independent Samples Test table
Levene's Test for Equality of variances t-test for Equality of Means
F-------- -----Sig---------t -----------df ------Sig. (2-tailed)
2.985. -----.098--- --4.135. -----22. -----------.000
--------------------------4.135. ----17.018---------.001
4. What is the best interpretation for this t-Test?
A. It was significant, t(17.02) = 4.14, p < .05
B. It was significant, t(22) = 4.14, p < .001
C. It was significant, t(22) = 0.00, p < .001
D. It was not significant, t(17.02) = 4.14, p > .05
E. It was not significant, t(22) = 4.14, p > .05
5. Use the Independent Samples Test table as well as your findings for the mean and SDs (from question #1) to determine which of the following is t-Test write-ups correct:
A. We ran an independent samples t-Test with score as the dependent variable and condition (1 versus 2) as the independent variable, which was significant, t(17.02) = 4.14, p < .05. Scores were higher in condition 1 (M = 3.42, SD = 1.51) than in condition 2 (M = 7.17, SD = 2.76).
B. We ran an independent samples t-Test with score as the dependent variable and condition (1 versus 2) as the independent variable, which was significant, t(22) = 4.14, p < .001. Scores were higher in condition 1 (M = 3.42, SD = 1.51) than in condition 2 (M = 7.17, SD = 2.76).
C. We ran an independent samples t-Test with score as the dependent variable and condition (1 versus 2) as the independent variable, which was significant, t(22) = 4.14, p < .001. Scores were lower in condition 1 (M = 3.42, SD = 1.51) than in condition 2 (M = 7.17, SD = 2.76).
D. We ran an independent samples t-Test with score as the dependent variable and condition (1 versus 2) as the independent variable, which was not significant, t(17.02) = 4.14, p > .05. Scores did not differ significantly between condition 1 (M = 3.42, SD = 1.51) and condition 2 (M = 7.17, SD = 2.76).
E. We ran an independent samples t-Test with score as the dependent variable and condition (1 versus 2) as the independent variable, which was not significant, t(22) = 4.14, p > .05. Scores did not differ significantly between condition 1 (M = 3.42, SD = 1.51) and condition 2 (M = 7.17, SD = 2.76).
In: Statistics and Probability
Return on Investment, Margin, Turnover
Ready Electronics is facing stiff competition from imported goods. Its operating income margin has been declining steadily for the past several years. The company has been forced to lower prices so that it can maintain its market share. The operating results for the past 3 years are as follows:
Sales: Year 1 $12,000,000, Year 2 $ 9,500,000, Year 3 $9,000,000
Operating income: Year 1 $1,200,000, Year 2 $1,445,000, Year 3 $945,000
Average assets: Year 1 15,000,000, Year 2 15,000,000, Year 3 17,000,000
For the coming year, Ready's president plans to install a JIT purchasing and manufacturing system. She estimates that inventories will be reduced by 70% during the first year of operations, producing a 20% reduction in the average operating assets of the company, which would remain unchanged without the JIT system. She also estimates that sales and operating income will be restored to Year 1 levels because of simultaneous reductions in operating expenses and selling prices. Lower selling prices will allow Ready to expand its market share. (Note: Round all numbers to two decimal places.)
Required: 1. Compute the ROI, margin, and turnover for Years 1, 2, and 3.
Required 2. Conceptual Connection: Suppose that in Year 4 the sales and operating income were achieved as expected, but inventories remained at the same level as in Year 3. Compute the expected ROI, margin, and turnover.
Required 3. Conceptual Connection: Suppose that the sales and net operating income for Year 4 remained the same as in Year 3 but inventory reductions were achieved as projected. Compute the ROI, margin, and turnover.
Required 4. Conceptual Connection: Assume that all expectations for Year 4 were realized. Compute the expected ROI, margin, and turnover.
In: Accounting
Elite Apparel Inc. is considering two investment projects. The estimated net cash flows from each project are as follows:
| Year | Plant Expansion | Retail Store Expansion | ||
| 1 | $151,000 | $127,000 | ||
| 2 | 124,000 | 148,000 | ||
| 3 | 107,000 | 102,000 | ||
| 4 | 97,000 | 71,000 | ||
| 5 | 30,000 | 61,000 | ||
| Total | $509,000 | $509,000 | ||
Each project requires an investment of $275,000. A rate of 12% has been selected for the net present value analysis.
| Present Value of $1 at Compound Interest | |||||
| Year | 6% | 10% | 12% | 15% | 20% |
| 1 | 0.943 | 0.909 | 0.893 | 0.870 | 0.833 |
| 2 | 0.890 | 0.826 | 0.797 | 0.756 | 0.694 |
| 3 | 0.840 | 0.751 | 0.712 | 0.658 | 0.579 |
| 4 | 0.792 | 0.683 | 0.636 | 0.572 | 0.482 |
| 5 | 0.747 | 0.621 | 0.567 | 0.497 | 0.402 |
| 6 | 0.705 | 0.564 | 0.507 | 0.432 | 0.335 |
| 7 | 0.665 | 0.513 | 0.452 | 0.376 | 0.279 |
| 8 | 0.627 | 0.467 | 0.404 | 0.327 | 0.233 |
| 9 | 0.592 | 0.424 | 0.361 | 0.284 | 0.194 |
| 10 | 0.558 | 0.386 | 0.322 | 0.247 | 0.162 |
Required:
1a. Compute the cash payback period for each project.
| Cash Payback Period | |
| Plant Expansion | (1, 2, 3, 4, or 5 years) |
| Retail Store Expansion | (1, 2, 3, 4, or 5 years) |
1b. Compute the net present value. Use the present value of $1 table above. If required, round to the nearest dollar.
| Plant Expansion | Retail Store Expansion | |
| Present value of net cash flow total | $ | $ |
| Less amount to be invested | $ | $ |
| Net present value | $ | $ |
2. Because of the timing of the receipt of the net cash flows, the (plant expansion / retail store expansion) offers a higher (net present value / net cash flow).
In: Accounting
Create a class called Height
Copy the code for Height given below into the class.
Remember – test the methods as you go
Take a few minutes to understand what the class does. There are comments where you will have to be changing code. A list of changes are given
Test the Height class to make sure the methods you added/changed work correctly.
Code for class Height
public class Height
{
private String name;
private int feet;
private double inches;
public Height()
{
name = "";
feet = 0;
inches = 0.0;
}
public Height(String name, int feet, double inches)
{
// use the sets to create an object with the values passed in
}
public void setHeight(int newFeet, double newInches)
{
// use the sets to set the feet and inches with the values passed in
}
public void setName(String name)
{
this.name = name;
}
public void setFeet(int newFeet)
{
// write the code to set the feet to the formal
// parameter - since the feet can't be less than 0
// make the code check and if that might happen,
// it should set the feet to 0
}
public void setInches(double newInches)
{
// write the code to set the inches to the formal
// parameter - since the inches can't be less than 0
// make the code check and if that might happen,
// it should set the inches to 0
}
public String getName()
{
return name;
}
public int getFeet()
{
return feet;
}
public double getInches()
{
return inches;
}
// write the method totalInches. This method returns the total
// number of inches tall the person is. For example, if the
// person is 5 feet 3.5 inches, this method would return 63.5 since
// 63.5 inches is the height of the person in inches
// write the method totalFeet. This method returns the total feet
// tall the person is as a decimal. For example, if a person
// is 5 feet 6 inches tall, this method would return 5.5, the height
// of the person in feet
}
System.out.println("1. Change Person 1 Data");
System.out.println("2. Change Person 2 Data");
System.out.println("3. Print Person 1 Data");
System.out.println("4. Print Person 2 Data");
System.out.println("5. Compare Heights of Person 1 and 2 with graph");
System.out.println("6. Exit");
System.out.print("Enter Selection: ");
Enter the name: Lori
Enter number of feet: -8
Invalid feet - try again!!!
Enter number of feet: -1
Invalid feet - try again!!!
Enter number of feet: 3
Enter number of inches: -4
Invalid inches - try again!!!
Enter number of inches: -5
Invalid inches - try again!!!
Enter number of inches: 2.5
printPersonData – Directions in comments in main
printLineOfGraph – Directions in comments in main - make sure you uncomment the method calls in the method printTotalInchesGraph
Put a loop in main so the menu will keep displaying until the user types choice to quit
When you have it running correctly, upload the Height and Main class to zybook and submit it for grading.
Code for class Main
import java.util.Scanner;
public class Main
{
public static Scanner keyboard = new Scanner(System.in);
public static void main(String [] args)
{
Height person1 = new Height();
Height person2 = new Height("John", 6, 2);
// Part A
// Write the statement to change the name of person1
// to be "Lori"
// Part B
// Write the statement to change the height of person1
// to be 5 foot 6 inches
int choice = 0;
// Implement each of the methods called from the switch statement below.
// I have put a number in comments, they are only suggestions as
// to the order you might want to implement them
// So for each comment method call, uncomment it and then implement it
// below main. A description is given for each method below main.
// After you have them implemented put the switch statement into a loop so
// that the menu will continue to display on the screen until the
// user chooses option 6
// 1. choice = printMenu();
switch(choice)
{
case 1:
// 4. changePersonData(person1);
break;
case 2:
// 4. changePersonData(person2);
break;
case 3:
// 2. printPersonData(person1);
break;
case 4:
// 2. printPersonData(person2);
break;
case 5:
// 3. Do the method printLineOfGraph which is called from in printTotalInchesGraph - directions are below
printTotalInchesGraph(person1, person2);
break;
case 6:
break;
default:
System.out.println("Invalid - Try Again!!!");
break;
}
// This should only display on the screen after the
// user has quite the menu
System.out.println("The End");
}
// printMenu
// This method prints the menu on the screen. It then
// asks the user to type in their selection (as an integer) and
// the method returns the selection. You do NOT have
// to type all of the menu in - see directions in Zybooks
// to copy and paste
// changePersonData
// This method has an object of the Height class passed in
// It then asks the user to type in a new name and
// calls the method to change the name.
// Then it asks the user to type in the height in feet
// the method will error check the feet and continue asking
// the user to enter the feet until a valid feet is entered.
// the feet must be zero or larger.
// It then calls the method to update the feet
// Lastly, the method asks the user to type in the inches.
// Similarly to the feet, it will error check and continue
// asking to type it in until the user types a valid (zero
// or greater) inches
// Finally it calls the method to change the inches
// See instructions on zbooks, too
// Points for this method might not show up until you put the loop in main
// printPersonData
// This method has an object of the height class passed in.
// It uses the object and the methods for the object to print the
// objects information in the form:
/*
Height Data
Name: John
Height: 6 feet 2.0 inches
Height in Inches: 74.00 inches
Height in Feet: 6.17 feet
*/
// This method calls printLineGragh - make sure you uncomment the two method calls in this method
// when you implement printLineOfGraph
public static void printTotalInchesGraph(Height obj1, Height obj2)
{
System.out.println("Name: " + obj1.getName());
// printLineOfGraph(obj1.totalInches());
System.out.println("Name: " + obj2.getName());
// printLineOfGraph(obj2.totalInches());
}
// printLineOfGraph
// This method has a double passed into it
// It will print as many asterisks as the value passed in
// for example: printLineOfGraph(4.8) will print ****
// Notice: it does not worry about the decimal, it just
// prints the number of asterisks as the whole number
// after printing the asterisks in a row it prints a new line
// you can typecast the double formal parameter and
// store it in a new variable, and then use that in the loop
} // End of Main class
A sample output is given
1. Change Person 1 Data 2. Change Person 2 Data 3. Print Person 1 Data 4. Print Person 2 Data 5. Compare Heights of Person 1 and 2 with graph 6. Exit Enter Selection: 4 Height Data Name: John Height: 6 feet 2.0 inches Height in Inches: 74.00 inches Height in Feet: 6.17 feet 1. Change Person 1 Data 2. Change Person 2 Data 3. Print Person 1 Data 4. Print Person 2 Data 5. Compare Heights of Person 1 and 2 with graph 6. Exit Enter Selection: 2 Enter the name: Minnie Enter number of feet: -1 Invalid feet - try again!!! Enter number of feet: -8 Invalid feet - try again!!! Enter number of feet: 3 Enter number of inches: 2.8 1. Change Person 1 Data 2. Change Person 2 Data 3. Print Person 1 Data 4. Print Person 2 Data 5. Compare Heights of Person 1 and 2 with graph 6. Exit Enter Selection: 3 Height Data Name: Lori Height: 5 feet 6.0 inches Height in Inches: 66.00 inches Height in Feet: 5.50 feet 1. Change Person 1 Data 2. Change Person 2 Data 3. Print Person 1 Data 4. Print Person 2 Data 5. Compare Heights of Person 1 and 2 with graph 6. Exit Enter Selection: 1 Enter the name: Mickey Enter number of feet: 4 Enter number of inches: -1 Invalid inches - try again!!! Enter number of inches: -8 Invalid inches - try again!!! Enter number of inches: 2.5 1. Change Person 1 Data 2. Change Person 2 Data 3. Print Person 1 Data 4. Print Person 2 Data 5. Compare Heights of Person 1 and 2 with graph 6. Exit Enter Selection: 3 Height Data Name: Mickey Height: 4 feet 2.5 inches Height in Inches: 50.50 inches Height in Feet: 4.21 feet 1. Change Person 1 Data 2. Change Person 2 Data 3. Print Person 1 Data 4. Print Person 2 Data 5. Compare Heights of Person 1 and 2 with graph 6. Exit Enter Selection: 4 Height Data Name: Minnie Height: 3 feet 2.8 inches Height in Inches: 38.80 inches Height in Feet: 3.23 feet 1. Change Person 1 Data 2. Change Person 2 Data 3. Print Person 1 Data 4. Print Person 2 Data 5. Compare Heights of Person 1 and 2 with graph 6. Exit Enter Selection: 5 Name: Mickey ************************************************** Name: Minnie ************************************** 1. Change Person 1 Data 2. Change Person 2 Data 3. Print Person 1 Data 4. Print Person 2 Data 5. Compare Heights of Person 1 and 2 with graph 6. Exit Enter Selection: 6 The End
In: Computer Science
Consider the following code:
sw $8, 4($16)
addi $16, $16, 4
Iw $9, 0($16)
e. Which of the following is true?
1. After executing the above code, the contents of $8 and $9 will be same
2. After executing the above code, the contents of $16 will be incremented by 4
3. All of the above instructions are I type instructions.
4. All of the above statement are true
In: Computer Science
Determine the Pearson product-moment correlation coefficient for
the following data.
x 1 10 9 8 5 3 2
y 10 4 4 5 7 7 10
(Do not round the intermediate values. Round your
answer to 3 decimal places.)
Correlation coefficient, r = ___
The Y values are actually:
Y 9 4 4 5 7 7 8
In: Statistics and Probability
Develop a least-squares estimated regression line. Also, compute the coefficient of determination and explain its meaning.
| Price (x) | Units sold (y) |
| 34 | 4 |
| 36 | 4 |
| 32 | 6 |
| 35 | 5 |
| 31 | 9 |
| 38 | 2 |
| 39 | 1 |
In: Statistics and Probability
Develop a least-squares estimated regression line. Also, compute the coefficient of determination and explain its meaning.
| Price (x) | Units sold (y) |
| 34 | 4 |
| 36 | 4 |
| 32 | 6 |
| 35 | 5 |
| 31 | 9 |
| 38 | 2 |
| 39 | 1 |
In: Statistics and Probability