DIFFERENT NUMBERS ARE INVOLVED, NOT THE SAME AS THE SIMILAR PROJECT Q/A TO THIS.
**VERY IMPORTANT**
**VERY IMPORTANT**
Accounting Cycle Project
Transaction Practice Set – SUNG Co.
ACC5100 – Winter 2019 – Prof. Chung
You have been hired as an accountant for SUNG Co., a corporation performing diverse consulting services in Detroit, Michigan. SUNG Co. prepares financial statements on monthly bases.
Project Scope: You are to record the transactions for December, prepare the monthly adjustments, and prepare the financial statements using the Excel workbook provided. Then you will close the fiscal year and prepare the books for next year.
Directions: The assignment encompasses two files: Directions and Transactions (this Word document) and Forms (a separate Excel workbook). Your solution should be worked in Excel and the completed Excel workbook submitted for grading.
You should use Excel formula where appropriate and cell references to carry forward values and numbers between worksheets within the workbook. Simply typing values in Excel will result in a reduced score, even if the correct solution is provided. You should use formula wherever possible.
Due Date: Apr. 24th, 2019.
Transactions in December 2018:
|
Dec. |
1 |
The equipment was completely destroyed by the regional earth quake. “Loss by earthquake” was recognized. |
|
1 |
Lent cash to another company and received a 2 year, $30,000 zero-interest-bearing note. The market rate of interest for a note of similar risk is 9 percent. |
|
|
1 |
Purchased new equipment that costs $12,000 and issued 1,200 shares of common stock (no-par stock) to the equipment seller. |
|
|
3 |
Cash payment on accounts payable amounted to $6,000. |
|
|
4 |
Sold land for $13,000 cash. |
|
|
10 |
Collected $16,000 as payment for amounts previously billed (suppose the payment was made within the discount period). |
|
|
13 |
One of the customers went bankrupt. SUNG Co. wrote off $1,500 account receivable. |
|
|
15 |
Paid monthly salaries of $20,000 to employees |
|
|
16 |
Issued 1,000 shares of preferred stock at $15 per share |
|
|
17 |
Purchased 500 shares of ABC corporation’s common stock at $20 (per share) and classify the securities as available-for-sales securities |
|
|
20 |
Found that the company incorrectly overstated its November account receivable and sales revenue by $2,000 and made a journal entry to correct the error. |
|
|
29 |
Performed services for a customer for $40,000 cash |
|
|
30 |
Performed $30,000 services on account with the following terms: 2/15, n/30. SUNG Co. records credit sales using the net method |
|
|
31 |
Dividends of $5,000 were declared and paid. $ 1,500 is paid to preferred stockholders and the rest is paid to the common stock holders. |
|
|
31 |
ABC corporation declared $ 5 dividend per share (to common stock holders). It will be paid in 2018. |
* Additional information
| SUNG Co. | |||
| Post-closing Trial Balance | |||
| November 30th, 2018 | |||
| ACCOUNT | DEBIT | CREDIT | |
| Cash | $42,500 | ||
| Accounts Receivable | 20,000 | ||
| Allowance for doubtful account | 1,000 | ||
| Supplies | 9,000 | ||
| Equipment | 10,000 | ||
| Accumulated Depreciation | $5,000 | ||
| Land | 10,500 | ||
| Accounts Payable | 8,000 | ||
| Salaries Payable | 10,000 | ||
| Common Stock* | 50,000 | ||
| Retained Earnings | 18,000 | ||
| $92,000 | $92,000 | ||
| * 50,000 shares authorized, 20,000 shares issued and outstanding | |||
In: Accounting
Program Behavior
This program will analyze real estate sales data stored in an input file. Each run of the program should analyze one file of data. The name of the input file should be read from the user.
Here is a sample run of the program as seen in the console window. User input is shown in blue:
Let's analyze those sales!
Enter the name of the file to process? sales.txt
Number of sales: 6
Total: 2176970
Average: 362828
Largest sale: Joseph Miller 610300
Smallest sale: Franklin Smith 199200
Now go sell some more houses!
Your program should conform to the prompts and behavior displayed above. Include blank lines in the output as shown.
Each line of the data file analyzed will contain the buyer's last name, the buyer's first name, and the sale price, in that order and separated by spaces. You can assume that the data file requested will exist and be in the proper format.
The data file analyzed in that example contains this data:
Cochran Daniel 274000
Smith Franklin 199200
Espinoza Miguel 252000
Miller Joseph 610300
Green Cynthia 482370
Nguyen Eric 359100
You can download that sample data file here https://drive.google.com/file/d/1bkW8HAvPtU5lmFAbLAJQfOLS5bFEBwf6/view?usp=sharing to test your program, but your program should process any data file with a similar structure. The input file may be of any length and have any filename. You should test your program with at least one other data file that you make.
Note that the average is printed as an integer, truncating any fractional part.
Your program should include the following functions:
read_data - This function should accept a string parameter representing the input file name to process and return a list containing the data from the file. Each element in the list should itself be a list representing one sale. Each element should contain the first name, last name, and purchase price in that order (note that the first and last names are switched compared to the input file). For the example given above, the list returned by the read_data function would be:
[['Daniel', 'Cochran', 274000], ['Franklin', 'Smith', 199200], ['Miguel', 'Espinoza', 252000], ['Joseph', 'Miller', 610300], ['Cynthia', 'Green', 482370], ['Eric', 'Nguyen', 359100]]
Use a with statement and for statement to process the input file as described in the textbook.
compute_sum - This function should accept the list of sales (produced by the read_data function) as a parameter, and return a sum of all sales represented in the list.
compute_avg - This function should accept the list of sales as a parameter and return the average of all sales represented in the list. Call the compute_sum function to help with this process.
get_largest_sale - This function should accept the list of sales as a parameter and return the entry in the list with the largest sale price. For the example above, the return value would be ['Joseph', 'Miller', 610300].
get_smallest_sale - Like get_largest_sale, but returns the entry with the smallest sale price. For the example above, the return value would be ['Franklin', 'Smith', 199200].
Do NOT attempt to use the built-in functions sum, min, or max in your program. Given the structure of the data, they are not helpful in this situation.
main - This function represents the main program, which reads the file name to process from the user and, with the assistance of the other functions, produces all output. For this project, do not print output in any function other than main.
Other than the definitions of the functions described above, the only code in the module should be the following, at the end of the file:
if __name__ == '__main__':
main()
That if statement keeps your program from being run when it is initially imported into the Web-CAT test environment. But your program will run as normal in Thonny. Note that there are two underscore characters before and after name and main.
Include an appropriate docstring comment below each function header describing the function.
Do NOT use techniques or code libraries that have not been covered in this course.
Include additional hashtag comments to your program as needed to explain specific processing.
A Word about List Access
A list that contains lists as elements operates the same way that any other lists do. Just remember that each element is itself a list. Here's a list containing three elements. Each element is a list containing integers as elements:
my_list = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
So my_list[0] is the list [1, 2, 3, 4] and my_list[2] is [9, 10, 11, 12].
Since my_list[2] is a list, you could use an index to get to a particular value. For instance, my_list[2][1] is the integer value 10 (the second value in the third list in my_list).
In this project, the sales list is a list of lists. When needed, you can access a particular value (first name, last name, or sales price) from a particular element in the sales list.
In: Computer Science
C++
Given Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
//declare variables to store user input
bool cont = true;
//implement a loop so that it will continue asking until the
user provides a positive integer
// the following provides ONLY part of the loop body, which you
should complete
{
cout <<"How many words are in your message? \n";
cout <<"Enter value: ";
// get user input integer here
cout <<"\nInvalid value. Please Re-enter a number of positive
value\n";
}
//declare a dynamic array of string type with the specified number of elements
//
while(cont)
{
cout <<"\nSelect one of these options: (1) Get Message (2)
Encrypt (3) Print (4) Quit";
cout <<"\nSelection: ";
// obtain user input option (an integer)
// based on the input the program will perform one of the following
operations using switch statement
switch(selection)
{
case 1://Get Message
// Get the specified number of words from the user
break;
case 2: //Encrypt
// Based on the shifting encryption strategy described above,
encrypt the individual words
// Be careful about the difference between the lower case letters
and upper case letters
break;
case 3: //Print
// Print out the encrypted words
break;
case 4:
cont = false;
break;
default:
break;
}
}
// Remember to release the memory you allocate above!!
return 0;
}
Encryption using Pointers and Dynamic Arrays
Objective:
Agent James Vond, one of our secret agents, Agent 008, has recently been captured in the Caribbean. We have been able to establish contact with him, but need help sending him messages in secret to let him know help is on the way. We believe we can send him messages using a Caesar Cipher, but need your help encoding it. Agent Vond, we task you with encrypting the message and helping Agent 008 escape the Caribbean
Sincerely, M.
Assignment:
The Caesar Cipher technique is one of the earliest and simplest method of encryption. It’s a substitution cipher, i.e., each letter of a given text is replaced by a letter some fixed number of positions down the alphabet. For example with a shift of 1, A would be replaced by B, B would become C, and so on.
The encryption equation is E(x) = (x + n) % 26.
The x = the numeric letter value, n = number of shifts, and (% 26) is so that whatever value your result is, it will stay within the alphabet range (0-25).
However, since we will be looking at characters in strings, you need to implement ASCII code so that your equation will look more like:
letter = ( ( (letter - 'A') + shift ) % 26 + 'A')) if it is upper case
Or
letter = ( ( (letter - 'a') + shift ) % 26 + 'a' ) ) if it is lower case.
You subtract 'A' and 'a' in order to get the value of the letter. In ASCII code, letters are assigned values. For example, 'B' is 66. If I subtract the value of 'A' (65) then I get 1. This helps me encode because I can get the values 0-25 for each letter.
Your assignment is to implement a dynamic string array in order to store a message of variable length, and then a pointer to iterate through each letter of the string in order to encrypt it using the equations given above.
You will need to ask the user for the amount of words in the message and then create your dynamic array that way. If the amount of words is a negative number or equal to zero you should output to the screen "Invalid value. Please Re-enter a number of positive value" until they have the correct input.
Get Message
Use cin to get each word the user wishes to put into the message.
After they have input all the strings required, ask for the number of letter shifts they would like to do
Encrypt
Encrypt each letter in each string using the equations provided above if the getMessage pointer isn't null (aka if Get Message option has already been called)
Print Message
Print out the encrypted or unencrypted message
Quit
Simply quits out of the loop
Input:
You many assume that the input to be encrypted will only consist of capital and lower letters, and no other symbols such as white spaces, numbers, or special characters will have to be encrypted.
In order to choose the different options you will take an integer value as input. 1 is for Get Message, 2 is for Encrypt, 3 is for Print, 4 is for Quit
Requirements:
Use a dynamic array to store a message of variable length (not using dynamic array will receive 50% penalty)
Use a pointer to iterate through each string and encrypt it
Do not allow for number of letter shifts to be > 26 (Must be in the range of 0-25 aka the range of 26) [Ex: If I give you 27, your shift should end up being 1] [Hint: %]
Do not expect int to hold all possible values when I input the value of shift, test very large numbers
Print out your message using pointer arithmetic (ex: *p; p++;)
DO NOT iterate through your pointer like an array when printing!!
In: Computer Science
QUESTION 1
ENG 190W QUIZ #1 (revised)
Part I (5 points)
Concisely define FIVE of the following literary terms in your own words. Provide one example of each term from any work of literature we have read so far.
1.Denouement
Definition –denouement is the final outcome of the story, generally occurring after the climax of the plot
Example:
……………………………………………………………………………………………………
2. Dynamic Character
Definition –a literary or dramatic character who undergoes an important inner change, as a change in personality or attitude
Example:
………………………………………………………………………………………………………
3. Flashback
Definition –a literary device wherein the author depicts the occurrence of specific events to the reader, which have taken place before the present time the narration is following, or events that have happened before the events that are currently unfolding in the story
Example:
……………………………………………………………………………………………………..
4. Innocent (Naïve) Narrator
Definition –A naive narrator is a narrator who is unreliable becuase they are inexperienced orinnocent, and do not understand the implications of their story
Example:
………………………………………………………………………………………………………
5. Omniscient Narrator
Definition –a literary technique of writing a narrative in third person, in which the narrator knows the feelings and thoughts of every character in the story
Example:
................................................................................................................................................................................
6. Symbolism
Definition-A figure of speech where an object, person, or situation has another meaning other than its literal meaning. The actions of a character, word, action, or event that have a deeper meaning in the context of the whole story
Example:
……………………………………………………………………………………………………………………………………………………
7. Irony
Definition- a figure of speech in which words are used in such a way that their intended meaning is different from the actual meaning of the words. It may also be a situation that ends up in quite a different way than what is generally anticipated.
Example:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Part II (5 points)
A. Briefly explain how the title of a story can contribute to its plot, or characters, or theme.
Refer to two stories read so far with text-based examples. 2.5
AND
B. Style is sometimes an elusive element in literature; yet style is often the defining aspect of a story. All authors use common literary techniques to achieve their effect, but they all seem to use them in unique ways. Discuss briefly how either , Kate Chopin in “Story of an Hour” or Ernest Hemingway in “Hills Like White Elephants” put her/his stamp or style on the story. 2.5
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Part III (Do A and B)
A. Match the following literary terms/technique to the story quotes they embody or exemplify:
(5 points)
Epiphany c.Internal or psychological conflict e. Characterization
Theme d. Foreshadowing
(If you feel you could match 2 terms to a quote, do so, but briefly justify your response either right on the page or in the area for comments..
_____ “And Dee. I see her standing off under the sweet gum tree…as she watched the last dingy gray board of the house fall in toward the red-hot brick chimney. Why don’t you do a dance around the ashes? I’d wanted to ask her”… “This house is in a pasture too, like the other one. No doubt when Dee sees it she will want to tear it down” ( Walker’s “Everyday Use” )
______ ”When he came home, though, Henry was very different, and I’ll say this: the change was no good…he was quiet, so quiet, and never comfortable sitting still anywhere but always up and moving around”. ( Erdrich’s “ The Red Convertible” )
______ ”Once…a nun from my school came by…’You live there?’ ‘There’…The way she said it made me feel like nothing…I knew then I had to have a house. A real house”. ( “House on Mango Street”
______ “ It seemed gloomy in the little cove in which she found herself. The air was damp, the silence close and deep”. (Walker’s “The Flowers”)
______ ” In New York…the natives were unfriendly, the country inhospitable, so I took root in the language… When I was done, I read over my words, and my eyes filled. I finally sounded like myself in English.” (Alvarez, “Daughter of Invention”)
B III Match the following literary techniques with the story quotes:
a. Allusion c. Dramatic Irony e. Situational Irony
b. Setting as place d. Symbolism
1.______ ‘“They look like white elephants, she said.” (“Hills Like White Elephants)
2.______”That Sunday evening, I was reading some poetry to get myself inspired: Whitman in an old book with an engraved cover…” (Alvarez “Daughter of Invention”)
3. _____ “ It was Brently Mallard who entered…But Richards was too late. When the doctors came they said she had died of heart disease-of a joy that kills”. (Chopin, “The Story of an Hour”)
4. _____ “The hills across the valley of the Ebro were long and while. On this side there was no shade, and no tree and the station was between two lines of rails in the sun”. (Hemingway “Hills Like White Elephants”)
5._______ “Can I have these old quilts”? (Dee)
In: Psychology
Write a C++ program that will require users to enter an automobile VIN number and you will check certain aspects: The VIN number must be 17 characters exactly in length The VIN number may contain only letters and numbers The first character is the location of manufacture; we will check for this to be 1 to 5 (made in North America). The 10th character indicates the manufacture year. We will check for this being a letter between A and I (years 2010 to 2018)
Deliverables: Word document with copy of code and screenprints of all test runs.
|
writing a program that will require users to enter the VIN number of their car. You want to write a function named chkVIN() that will check for a certain things (see below). The chkVIN() function will test if the VIN number meets the rules shown above. The function will be passed a character array (not a string variable) containing the VIN number. It is required that the function use a pointer in processing the array. Here is the prototype for the function: bool chkVIN(char vin[]); The function is passed a char array; it returns true if the VIN passes all tests and false if any tests fail. It returns immediately after reporting a problem. In the main function, use the following code to declare a VIN number variable: const int SIZE = 30; char VIN[SIZE]; We are using an array of larger than 17 because the user might enter more characters. Our main program will have a loop that will enter VIN numbers and check them by passing the array to chkVIN(). chkVIN() returns fail if the VIN fails any tests and returns true if the VIN passed all tests. The problems will be displayed by chkVIN(). The main function just reports if the VIN passed or failed and asks if the user wants to enter more VIN numbers. Test your code with these values:
|
||||||||||||||
|
Step 2: Processing Logic |
||||||||||||||
|
You may use this pseudocode for the program or code it differently as long as you meet the requirements listed above (using the function, passing a char array, function uses a pointer).. Place Program Documentation Header here. Declare two int constants SIZE and NUMCHARS (SIZE is 30; NUMCHARS is 17) bool chkVIN(char vin[]) //function prototype Main Function Declare character array: char vin[SIZE] Declare string variable, answer, and assign “yes” for loop control Display "Verify VIN Number Program" Display "- The VIN number should be exactly 17 characters long" Display "- The VIN number should only contain letters and numerals” Display "- The VIN number should indicate the car is manufactured in North America.” Display "- The VIN number should be for a car manufactured in 2010 or later.” While answer equals “yes” //start of while loop Display “Enter your VIN number: “ Input into char array using the cin.getline function //important to use cin.getline(arrayName, SIZE) if chkVIN(vin) equals true then Display “The VIN number is valid and acceptable” else Display “The VIN number was invalid or unacceptable” end if
Display “Do you want to enter another VIN number? (yes or no): “ input answer End While Loop END main function //Start chkVIN function bool chkVIN(char VIN[]) //check for 17 characters if strlen(VIN) not equal to NUMCHARS then Display “VIN number must have “ + NUMCHARS + “ characters” return false End if //check that all characters are digits or letters //NOTE: to check for letters or digits, we use the isalpha(char) and isdigit(char) functions //These return true if the character is a letter or digit, respectively. //They return something else if not a letter or digit – not necessarily false. //Pass a pointer to the array – the array name – plus the for loop iterator variable For Loop 0 to NUMCHARS if current character is a letter, continue loop else if current character is a digit, continue loop else Display “VIN number can only contain letters and digits” return false End If End for Loop //check that the first character in the array is in the range 1 to 5 //remember these are characters – not numbers – so you need single quote marks if first character is less than ‘1’ or the first character is greater than ‘5’ then Display “VIN number should indicate a car manufactured in North America but did not” return false End If //check that the 10th character is between A and I; allow for small and capital letters //suggestion: use the toupper(char) function and then compare to ‘A’ and ‘I’ //Must use array name and offset to pass to toupper() if 10th character is less than ‘A’ or 10th character greater than ‘I’ then Display “VIN number should indicate a car manufactured in 2010 or later, but did not” return false End If //if we got here, we passed all the error checks return true End chkVIN function |
In: Computer Science
C++
1. Modify the code from your HW2 as follows:
Your triangle functions will now return a string object. This string will contain the identification of the triangle as one of the following (with a potential prefix of the word “Right ”):
Not a triangle
Scalene triangle
Isosceles triangle
Equilateral triangle
2. All output to cout will be moved from the triangle functions to the main function.
3. The triangle functions are still responsible for rearranging the values such that c is at least as large as the other two sides.
4. Please run your program with all of your test cases from HW2. The results should be identical to that from HW2. You must supply a listing of your program and sample output
CODE right now
#include <cstdlib> //for exit, atoi, atof
#include <iostream> //for cout and cerr
#include <iomanip> //for i/o manipulation
#include <cstring> //for strcmp
#include <cmath> //for fabs
using namespace std;
//triangle function
void triangle(int a, int b, int c)
{
if (a + b <= c || a + c <= b || b + c <= a) //conditions for an invalid triangle
cout << a << " " << b << " " << c << " "
<< "Not a triangle";
else //if above returned false, then it is a valid triangle
{
int temp;
cout << a << " " << b << " " << c << " "; //print the side values
//logic to find out the largest value and store it to c.
if (a > b && a > c)
{
temp = a;
a = c;
c = temp;
}
else if (b > a && b > c)
{
temp = b;
b = c;
c = temp;
}
if (a == b && b == c) //condition for equilateral triangle
{
cout << "Equilateral triangle";
return;
}
else if (a * a == b * b + c * c ||
b * b == c * c + a * a ||
c * c == a * a + b * b) //condition for right triangle i.e. pythagoras theorem
cout << "Right ";
if (a == b || b == c || a == c) //condition for Isosceles triangle
cout << "Isosceles triangle";
else //if both the above ifs failed, then it is a scalene triangle
cout << "Scalene triangle";
}
}
//overloaded triangle function
void triangle(double a, double b, double c)
{
//equality threshold value for absolute difference procedure
const double EPSILON = 0.001;
if (a + b <= c || a + c <= b || b + c <= a) //conditions for an invalid triangle
cout << fixed << setprecision(5)
<< a << " " << b << " " << c << " "
<< "Not a triangle";
else //if above returned false, then it is a valid triangle
{
double temp;
cout << fixed << setprecision(5)
<< a << " " << b << " " << c << " "; //print the side values
//logic to find out the largest value and store it to c.
if (a > b && a > c)
{
temp = a;
a = c;
c = temp;
}
else if (b > a && b > c)
{
temp = b;
b = c;
c = temp;
}
if (fabs(a - b) < EPSILON &&
fabs(b - c) < EPSILON) //condition for equilateral triangle
{
cout << "Equilateral triangle";
return;
}
else if (fabs((a * a) - (b * b + c * c)) < EPSILON ||
fabs((b * b) - (c * c + a * a)) < EPSILON ||
fabs((c * c) - (a * a + b * b)) < EPSILON) //condition for right triangle i.e. pythagoras theorem
cout << "Right ";
if (fabs(a - b) < EPSILON ||
fabs(b - c) < EPSILON ||
fabs(a - c) < EPSILON) //condition for Isosceles triangle
cout << "Isosceles triangle";
else //if both the above ifs failed, then it is a scalene triangle
cout << "Scalene triangle";
}
}
//main function
int main(int argc, char **argv)
{
if (argc == 3 || argc > 5) //check argc for argument count
{
cerr << "Incorrect number of arguments. " << endl;
exit(1);
}
else if (argc == 1) //if no command arguments found then do the following
{
int a, b, c; //declare three int
cin >> a >> b >> c; //read the values
if (a <= 0 || b <= 0 || c <= 0) //if values are negative then exit
{
cerr << "Data must be a positive integer. " << endl;
exit(1);
}
triangle(a, b, c); //call the function if inputs are valid
}
else //if command arguments were found and valid
{
if (strcmp(argv[1], "-i") == 0)
{
int a, b, c, temp; //declare required variables
if (argc == 5)
{
//convert char to int using atoi()
a = atoi(argv[2]);
b = atoi(argv[3]);
c = atoi(argv[4]);
}
else
{
cin >> a >> b >> c; // read the values
}
if (a <= 0 || b <= 0 || c <= 0) //if values are negative then exit
{
cerr << "Data must be a positive integer. " << endl;
exit(1);
}
//call the function
triangle(a, b, c);
}
else if (strcmp(argv[1], "-d") == 0)
{
double a, b, c, temp; //declare required variables
if (argc == 5)
{
//convert char to int using atoi()
a = atof(argv[2]);
b = atof(argv[3]);
c = atof(argv[4]);
}
else
{
cin >> a >> b >> c; // read the values
}
if (a <= 0 || b <= 0 || c <= 0) //if values are negative then exit
{
cerr << "Data must be a positive double. " << endl;
exit(1);
}
//call the overloaded function
triangle(a, b, c);
}
}
cout << endl;
return 0;
}In: Computer Science
Please read the background information and answer the following questions
Background: Country Table Potato Chip Company is a small, privately owned company that produces a limited line of snack foods sold in a three-state range including most of Illinois, Indiana, and Iowa. The company has been in business for 57 years and was started by Franklin Brewster. Frank developed a faithful following for his chips as a result of a cooking process that sealed in flavor. The brand name is well respected in the region. The company was run by George Brewster (third generation) for the past 31 years until his recent death. The company has been handed over to the fourth generation of the Brewster family, Ms. Emily Brewster. Emily has a financial background and has worked in the company in the accounting department for the past eight years.
She wants to take the company in a new direction, knowing from her accounting knowledge of the company that some changes need to be made. She admittedly understands the “bottom line”, but little else about running a business. She has brought in a new team to assist her. You have been hired as the marketing team member to develop the new direction for the company.
From background interviews, you have learned the basics of the company’s history. The company has been regional since its inception. There was some interest in a potential buyout of the company by Frito-Lay five years ago, but the negotiations stalled and Frito-Lay lost interest. Emily has expressed interest for some sort of merger of the company in the future.
The company’s product line consists of six types of potato chips (regular, barbeque, and cheddar cheese flavors all in a thin chip and ruffled chip texture). In addition, the company has regular and cheese flavored popcorn, pretzels, and peanuts. All potato chip products are fried in peanut oil while the other products are baked. Ten products in all, with no change to the product line in the past eight years. Products are packaged in “family sized” bags of seven to ten ounces, depending upon the product.
Years ago, Country Table chips were seen as a “premium” product and priced above other competitors. In the last five years, retail prices to consumers have decreased in response to competition and to the large grocery chains pushing for lower prices to them. Originally, the company sourced their potatoes from a premium supplier in Idaho. Those potatoes were part of the original “flavor formula” that gave their chips a distinctive taste. A few years ago, George Brewster decided to source potatoes from a co-op in order to lower costs. These potatoes were indeed cheaper, but the quality and flavor profile were not as good.
All products are made in five factories, spread out across the three states mentioned above. All distribution is done through a fleet of company owned trucks and delivery vehicles working out of a total of 27 regional offices. Frank Brewster relied on “word of mouth” advertising based on the company’s brand. Also, their fleet of company trucks acted as rolling billboards for the products. Country Table has concentrated on placing their products in grocery store chains and larger convenience stores.
The company is “old school” in that very little has been done to keep up with technology. The company does have a website and offers customers a way to suggest improvements. One consistent theme from customers is a need to expand the flavors of potato chips to keep up with competitor product offerings.
Overall, the industry for snack foods has been increasing. In the past five years, industry sales have increased at a rate of 3% per year. However, the mix of product lines has been shifting. Traditional fried chip products have seen an annual decrease of 4% over the same period. Other new, more healthy snack products have seen a growth rate of over 6% a year.
Country Tables’ unit sales have been essentially flat for the past three years. Profits have been decreasing about 3% per year as a result of higher costs and lower prices. Lower prices have been offered in order to offset competitive efforts to take sales away from Country Table.
Questions:
In: Operations Management
Lindsey was recently hired by Swift Ltd. as a junior budget analyst. She is working for the Venture Capital Division and has been given for capital budgeting projects to evaluate. She must give her analysis and recommendation to the capital budgeting committee.
Lindsey has a B.S. in accounting from CWU (2014) and passed the CPA exam (2017). She has been in public accounting for several years. During that time she earned an MBA from Seattle U. She would like to be the CFO of a company someday--maybe Swift Ltd.-- and this is an opportunity to get onto that career track and to prove her ability.
As Lindsey looks over the financial data collected, she is trying to make sense of it all. She already has the most difficult part of the analysis complete -- the estimation of cash flows. Through some internet research and application of finance theory, she has also determined the firm’s beta.
Here is the information that Lindsey has accumulated so far:
The Capital Budgeting Projects
She must choose one of the four capital budgeting projects listed below:
Table 1
|
t |
A |
B |
C |
D |
|
0 |
(22,500,000) |
(24,000,000) |
(23,000,000) |
(21,000,000) |
|
1 |
9,600,000 |
7,700,000 |
8,200,000 |
7,500,000 |
|
2 |
9,600,000 |
8,400,000 |
8,200,000 |
6,900,000 |
|
3 |
4,500,000 |
9,800,000 |
6,500,000 |
5,400,000 |
|
4 |
4,500,000 |
4,900,000 |
5,900,000 |
4,500,000 |
|
Risk |
Average |
Average |
High |
Low |
Table 1 shows the expected after-tax operating cash flows for each project. All projects are expected to have a 4 year life. The projects differ in size (the cost of the initial investment), and their cash flow patterns are different. They also differ in risk as indicated in the above table.
The capital budget is $20 million and the projects are mutually exclusive.
Capital Structures
Swift Ltd. has the following capital structure, which is considered to be optimal:
|
Debt |
30% |
|
Preferred Equity |
15% |
|
Common Equity |
55% |
|
100% |
Cost of Capital
Lindsey knows that in order to evaluate the projects she will have to determine the cost of capital for each of them. She has been given the following data, which he believes will be relevant to her task.
(1)The firm’s tax rate is 35%.
(2) Swift Ltd. has issued a 8% semi-annual coupon bond with 14 years term to maturity. The current trading price is $960.
(3) The firm has issued some preferred stock which pays an annual 8.5% dividend of $50 par value, and the current market price is $52.
(4) The firm’s stock is currently selling for $35 per share. Its last dividend (D0) was $2.00, and dividends are expected to grow at a constant rate of 5%. The current risk free return offered by Treasury security is 2.8%, and the market portfolio’s return is 10.80%. Swift Ltd. has a beta of 1.1. For the bond-yield-plus-risk-premium approach, the firm uses a risk premium of 3.5%.
(5) The firm adjusts its project WACC for risk by adding 2.5% to the overall WACC for high-risk projects and subtracting 2.5% for low-risk projects.
Lindsey knows that Swift Ltd. executives have favored IRR in the past for making their capital budgeting decisions. Her professor at Seattle U. said NPV was better than IRR. Her textbook says that MIRR is also better than IRR. She is the new kid on the block and must be prepared to defend her recommendations.
First, however, Lindsey must finish the analysis and write her report. To help begin, she has formulated the following questions:
(1) What is the estimated cost of common equity using the CAPM approach?
(2) What is the estimated cost of common equity using the DCF approach?
(3) What is the estimated cost of common equity using the bond-yield-plus-risk-premium approach?
(4) What is the final estimate for rs?
Table 2
|
A |
B |
C |
D |
|
|
WACC |
||||
|
NPV |
||||
|
IRR |
||||
|
MIRR |
Instructions
1.Your answers should be Word processed, submitted via Canvas.
2.Questions 5, 8, 9, and 11 are discussion questions.
3.Place your numerical solutions in Table 2.
4.Show your steps for calculation questions.
In: Finance
6.13 Lab: Patient Class - process an array of Patient objects
This program will create an array of 100 Patient objects and it will read data from an input file (patient.txt) into this array. Then it will display on the screen the following:
Finally, it writes to another file (patientReport.txt) a table as shown below:
Weight Status Report ==================== === ====== ====== ============= Name Age Height Weight Status ==================== === ====== ====== ============= Jane North 25 66 120 Normal Tim South 64 72 251 Obese . . . ==================== === ====== ====== ============= Number of patients: 5
Assume that a name has at most 20 characters (for formatting). Write several small functions (stand-alone functions). Each function should solve a specific part of the problem.
On each line in the input file there are four items: age, height, weight, and name, as shown below:
25 66 120 Jane North 64 72 251 Tim South
Prompt the user to enter the name of the input file. Generate the name of the output file by adding the word "Report" to the input file's name.
Display the output file's name as shown below:
Report saved in: patientReport.txt
If the user enters the incorrect name for the input file, display the following message and terminate the program:
Input file: patients.txt not found!
Here is a sample output:
Showing patients with the "Underweight" status: Tim South Linda East Paul West Victor Smith Tom Baker Showing patients with the "Overweight" status: none Showing patients with the "Obese" status: none Report saved in: patient1Report.txt
Main.cpp:
#include "Patient.h"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;
const int MAX_SIZE = 100;
/* Write your code here:
declare the function you are going to call in this program
*/
int main()
{
Patient patArr[MAX_SIZE];
int size = 0;
string fileName;
cout << "Please enter the input file's name: ";
cin >> fileName;
cout << endl;
/* Write your code here:
function calls
*/
return 0;
}
/* Write your code here:
function definitions
*/
/*
OUTPUT:
*/
Patient.h:
/*
Specification file for the Patient class
*/
#ifndef PATIENT_H
#define PATIENT_H
#include <string>
using std:: string;
class Patient
{
private:
string name;
double height;
int age;
int weight;
public:
// constructors
Patient();
Patient(string name, int age, double height, int weight);
// setters
void setName(string name);
void setHeight(double height);
void setAge(int age);
void setWeight(int weight);
//getters
string getName() const;
double getHeight() const;
int getAge() const;
int getWeight() const;
// other functions: declare display and weightStatus
void display() const;
string weightStatus() const;
};
#endif
Patient.cpp:
/*
Implementation file for the Patient class.
*/
#include "Patient.h"
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
/*******
This is the default constructor; it sets everything to 0 or
"".
*/
Patient::Patient()
{
name = "";
height = 0;
age = 0;
weight = 0;
}
/*******
This is an overloaded constructor.
It sets the variables according to the parameters.
*/
Patient::Patient(string name, int age, double height, int
weight)
{
this->name = name;
this->height = height;
this->age = age;
this->weight = weight;
}
void Patient::setName(string name)
{
this->name = name;
}
void Patient::setHeight(double height)
{
this->height = height;
}
void Patient::setAge(int age)
{
this->age = age;
}
void Patient::setWeight(int weight)
{
this->weight = weight;
}
string Patient::getName() const
{
return this->name;
}
double Patient::getHeight() const
{
return this->height;
}
int Patient::getAge() const
{
return this->age;
}
int Patient::getWeight() const
{
return this->weight;
}
/*******
This function displays the member variables
in a neat format.
*/
void Patient::display() const
{
cout << fixed;
cout << " Name: " << getName() << endl;
cout << " Age: " << getAge() << endl;
cout << " Height: " << setprecision(0) <<
getHeight() << " inches" << endl;
cout << " Weight: " << getWeight() << " pounds"
<< endl;
cout << "Weight Status: " << weightStatus() <<
endl;
}
/*******
This function calculates the BMI using the following formula:
BMI = (weight in pounds * 703) / (height in inches)^2
Then, it returns a string reflecting the weight status according to
the BMI:
<18.5 = underweight
18.5 - 24.9 = normal
25 - 29.9 = overweight
>=30 = obese
*/
string Patient::weightStatus() const
{
double bmi;
string stat = "";
if (height > 0)
{
bmi = (getWeight() * 703) / (getHeight() * getHeight());
if (bmi < 18.5)
{
stat = "Underweight";
}
else if (bmi >= 18.5 && bmi <= 24.9)
{
stat = "Normal";
}
else if (bmi >= 25 && bmi <= 29.9)
{
stat = "Overweight";
}
else
{
stat = "Obese";
}
}
return stat;
}
In: Computer Science
Person class
You will implement the Person Class in Visual Studio. A person
object may be associated with multiple accounts. A person initiates
activities (deposits or withdrawal) against an account that is
captured in a transaction object.
A short description of each class member is given below:
Person
Class
Fields
- password : string
Properties
+ «C# property, setter private» IsAuthenticated :
bool
+ «C# property, setter absent» SIN : string
+ «C# property, setter absent» Name : string
Methods
+ «Constructor» Person(name : string, sin :
string)
+ Login(password : string) : void
+ Logout() : void
+ ToString() : string
Fields:
⦁ password – this private string field represents the
password of this person.
(N.B. Password are not normally stored as text but as a hash value.
A hashing function operates on the password and the result is
stored in the field. When a user supplies a password it is passed
through the same hashing function and the result is compared to the
value of the field.).
Properties:
⦁ SIN – this string property represents the sin number
of this person. This getter is public and setter is absent.
⦁ IsAuthenticated – this property is a bool
representing if this person is logged in with the correct password.
This is modified in the Login() and the Logout() methods. This is
an auto-implemented property, and the getter is public and setter
is private
⦁ Name – this property is a string representing the
name of this person. The getter is public and setter is
absent.
Methods:
⦁ public Person( string name, string sin ) – This
public constructor takes two parameters: a string representing the
name of the person and another string representing the SIN of this
person. It does the following:
⦁ The method assigns the arguments to the appropriate
fields.
⦁ It also sets the password to the first three letters
of the SIN. [use the Substring(start_position, length) method of
the string class]
⦁ public void Login( string password ) – This method
takes a string parameter representing the password and does the
following:
⦁ If the argument DOES NOT match the password field, it
does the following:
⦁ Sets the IsAuthenticated property to false
⦁ Creates an AccountException object using argument
AccountEnum.PASSWORD_INCORRECT
⦁ Throws the above exception
⦁ If the argument matches the password, it does the
following:
⦁ Sets the IsAuthenticated property is set to
true
This method does not display anything
⦁ public void Logout( ) – This is public method does
not take any parameters nor does it return a value.
This method sets the IsAuthenticated property to false
This method does not display anything
⦁ public override string ToString( )– This public
method overrides the same method of the Object class. It returns a
string representing the name of the person and if he is
authenticated or not.
ITransaction interface
You will implement the ITransaction Interface in Visual Studio. The
three sub classes implement this interface.
A short description of each class member is given below:
ITransaction
Interface
Methods
Withdraw(amount : double, person : Person) :
void
Deposit(amount : double, person : Person) : void
Methods:
⦁ void Withdraw(double amount, Person person).
⦁ void Deposit(double amount, Person person).
Transaction class
You will implement the Transaction Class in Visual Studio. The only
purpose of this class is to capture the data values for each
transaction. A short description of the class members is given
below:
All the properties are public with the setter absent.
Transaction
Class
Properties
+ «C# property, setter absent » AccountNumber :
string
+ «C# property, setter absent» Amount : double
+ «C# property, setter absent» Originator :
Person
+ «C# property, setter absent» Time : DateTime
Methods
+ «Constructor» Transaction(accountNumber : string,
amount : double, endBalance : double, person : Person, time :
DateTime)
+ ToString() : string
Properties:
All the properties are public with the setter absent
⦁ AccountNumber – this property is a string
representing the account number associated with this transaction.
The getter is public and the setter is absent.
⦁ Amount – this property is a double representing the
account of this transaction. The getter is public and the setter is
absent.
⦁ Originator – this property is a Person representing
the person initiating this transaction. The getter is public and
the setter is absent.
⦁ Time – this property is a DateTime (a .NET built-in
type) representing the time associated with this transaction. The
getter is public and the setter is absent.
Methods:
⦁ public Transaction( string accountNumber, double
amount, Person person, DateTime time ) – This public constructor
takes five arguments. It assigns the arguments to the appropriate
fields.
⦁ public override string ToString( ) – This method
overrides the same method of the Object class. It does not take any
parameter and it returns a string representing the account number,
name of the person, the amount and the time that this transition
was completed. [you may use ToShortTimeString() method of the
DateTime class]. You must include the word Deposit or Withdraw in
the output.
A better type would have been a struct instead of a class.
ExceptionEnum enum
You will implement this enum in Visual Studio. There are seven
members:
ACCOUNT_DOES_NOT_EXIST,
CREDIT_LIMIT_HAS_BEEN_EXCEEDED,
NAME_NOT_ASSOCIATED_WITH_ACCOUNT,
NO_OVERDRAFT,
PASSWORD_INCORRECT,
USER_DOES_NOT_EXIST,
USER_NOT_LOGGED_IN
The members are self-explanatory.
AccountException class
You will implement the AccountException Class in Visual Studio.
This inherits from the Exception Class to provide a custom
exception object for this application. It consists of seven strings
and two constructors:
AccountException
Class
→ Exception
Fields
Properties
Methods
+ «Constructor» AccountException(reason :
ExceptionEnum)
Fields:
There are no fields
Properties:
There are no properties
Methods:
⦁ AccountException( ExceptionEnum reason )– this public
constructor simply invokes the base constructor with an appropriate
argument. Use the ToString() of the enum type.
In: Computer Science