The following transactions and adjusting entries were completed by Legacy Furniture Co. during a three-year period. All are related to the use of delivery equipment. The double-declining-balance method of depreciation is used. Year 1 Jan. 4 Purchased a used delivery truck for $26,960, paying cash. Nov. 2 Paid garage $600 for miscellaneous repairs to the truck. Dec. 31 Recorded depreciation on the truck for the year. The estimated useful life of the truck is four years, with a residual value of $5,250 for the truck. Year 2 Jan. 6 Purchased a new truck for $50,150, paying cash. Apr. 1 Sold the used truck purchased on Jan. 4 of Year 1 for $14,400. (Record depreciation to date in Year 2 for the truck.) June 11 Paid garage $465 for miscellaneous repairs to the truck. Dec. 31 Recorded depreciation for the new truck. It has an estimated residual value of $8,850 and an estimated life of five years. Year 3 July 1 Purchased a new truck for $55,520, paying cash. Oct. 2 Sold the truck purchased January 6, Year 2, for $17,473. (Record depreciation to date for Year 3 for the truck.) Dec. 31 Recorded depreciation on the remaining truck purchased on July 1. It has an estimated residual value of $12,565 and an estimated useful life of eight years. Journalize the transactions and the adjusting entries. Refer to the Chart of Accounts for exact wording of account titles.
In: Accounting
Write a program FileCounter.java that reads a text file text1.txt and reports the number of characters and lines contained in the file. For example, the output should be as follows:
Lines: 5 Chars: 124
Note: Write a main() method to test in the FileCounter.java. The file path should use relative path. Must use the provided text file text1.txt.
The text file say
This is an example 1
This is an example 1 2.
This is an example 1 2 3.
This is an example 1 2 3 4.
This is an example 1 2 3 4 5.
2. Suppose you have a binary file geo.dat (see provided data file) of data for a geological survey, such that each record consists of a longitude, a latitude, and an amount of rainfall, all represented by double. Write a program GeologicalData.java to read this file’s data and print them on the screen, one record per line.
Note: Write a main() method to test the code in the GeologicalData.java. The file path should use relative path and the actually file path should be passed into the method getData(String fileName) in the main() method. Must use the provided file geo.dat which has already contained the following data.
-143.78914479979002 59.482245058443084 17.645846630300042 -117.80303714838257 -25.94559103704657 4.513879725440151 49.63942128783603 129.1664680590585 6.825838082783708 -79.66606860669573 -18.800024954102696 9.501515919083086 62.82522223390336 -60.409595996464006 2.6984128008196984
The partial Coding is
public class FileCounter {
}
The other Coding
public class GeologicalData {
public static void getData(String fileName){
}
}
In: Computer Science
write cplus programs for exercises
Drink Machine Simulator
Create a class that simulates and manages a soft drink machine.
Information on each drink
type should be stored in a structure that has data members to hold
the drink name, the
drink price, and the number of drinks of that type currently in the
machine.
The class should have an array of five of these structures, initialized with the following data.
Drink Name Cost Number in
Machine
Cola 1.00 20
Root beer
1.00 20
Orange soda 1.00
20
Grape soda 1.50 20
Bottled water 1.50
20
The class should have two public member functions,
displayChoices (which displays a
menu of drink names and prices) and buyDrink (which handles a
sale). The class should
also have at least two private member functions, inputMoney, which
is called by buyDrink
to accept, validate, and return (to buyDrink) the amount of money
input, and
dailyReport, which is called by the destructor to report how many
of each drink type
remain in the machine at the end of the day and how much money was
collected.
You may want to use additional functions to make the program
more modular.
The client program that uses the class should have a main
processing loop which calls the
displayChoices class member function and allows the patron to
either pick a drink or
quit the program. If the patron selects a drink, the buyDrink class
member function is
called to handle the actual sale. This function should be passed
the patron’s drink choice.
Here is what the buyDrink function should do:
• Call the inputMoney function, passing it the patron’s drink
choice.
• If the patron no longer wishes to make the purchase, return all
input money.
• If the machine is out of the requested soda, display an
appropriate “sold out” message and return all input money.
• If the machine has the soda and enough money was entered,
complete the sale by updating the quantity on hand and money
collected information, calculating any change due to be returned to
the patron, and delivering the soda.
This last action can be simulated by printing an appropriate
“here is your beverage” message.
Input Validation: Only accept valid menu choices. Do not deliver a
beverage if the
money inserted is less than the price of the selected drink.
For exact input
output messages and menu choices, please refer to the test cases
file below.
TEST CASE1: Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 1 How much money has been inserted: $5 Do you still want to make a purchase? (Y / N) : y Here is your Cola, and your change of $4.00 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 2 How much money has been inserted: $6 Do you still want to make a purchase? (Y / N) : y Here is your Root Beer, and your change of $5.00 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 3 How much money has been inserted: $4 Do you still want to make a purchase? (Y / N) : y Here is your Orange Soda, and your change of $3.00 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 4 How much money has been inserted: $8 Do you still want to make a purchase? (Y / N) : y Here is your Grape Soda, and your change of $6.50 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 5 How much money has been inserted: $3 Do you still want to make a purchase? (Y / N) : y Here is your Bottled Water, and your change of $1.50 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 6 Thank you for shopping! Drink Machine Daily Report Cola : 19 Root Beer : 19 Orange Soda : 19 Grape Soda : 19 Bottled Water : 19 Total amount collected : $6.00 TEST CASE 2: Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 1 How much money has been inserted: $1 Do you still want to make a purchase? (Y / N) : y Here is your Cola, and your change of $0.00 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 2 How much money has been inserted: $1 Do you still want to make a purchase? (Y / N) : n Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 3 How much money has been inserted: $4 Do you still want to make a purchase? (Y / N) : y Here is your Orange Soda, and your change of $3.00 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 4 How much money has been inserted: $1 Not enough money, please enter $1.50 or more: $1 Not enough money, please enter $1.50 or more: $2 Do you still want to make a purchase? (Y / N) : t Please enter Y or N: a Please enter Y or N: b Please enter Y or N: c Please enter Y or N: d Please enter Y or N: y Here is your Grape Soda, and your change of $0.50 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 9 Please enter a valid choice (1 - 6): 1 How much money has been inserted: $6 Do you still want to make a purchase? (Y / N) : y Here is your Cola, and your change of $5.00 Drink Machine Menu 1. Cola : $1.00 2. Root Beer : $1.00 3. Orange Soda : $1.00 4. Grape Soda : $1.50 5. Bottled Water : $1.50 6. Quit Drink Machine Please make a selection : 6 Thank you for shopping! Drink Machine Daily Report Cola : 18 Root Beer : 20 Orange Soda : 19 Grape Soda : 19 Bottled Water : 20 Total amount collected : $4.50
In: Computer Science
2 parts: Part B is different numbers
a.)Each extra worker produces two extra units of output up to 4 workers. After 4 workers, each extra worker produces one extra unit of output. Draw the total product, average product of labor and marginal product of labor curves on two graphs.
b.)Suppose inputs are only substitutable at two units of labor for every one unit of capital. Assume that the production function q = f(L, K) has constant returns to scale and that f(2, 0) = 1 and f(0, = 1. What would be the equation for the production function? What is the average and marginal product of labor in this case?
In: Economics
Which of the following are associated with genetic drift? Select all that apply.
1.)reduced numbers of alleles
2.)small population
3.)increased mutation
4.)increased variation
5.)large population
Which of the following are ways in which natural selection can shape the population? Select all that apply.
1.)A new mutation causes baby mice to die in their sleep.
2.)The sex of developing alligators depends on the incubation temperature of the egg.
3.)Female garter snakes mate with any male that comes by.
4.)Larger gorillas lead the tribe and produce more offspring.
5.)A disease only infects and kills people who lack certain types of white blood cells.
In: Biology
1. Discuss Professional Responsibility of engineers in a situation of ethical dilemma. CLO1(2.5)
2. How individualism effect the situation when whistle blowing is going on? CLO2 (2.5)
3. Why safety is important in state of practicing whistle blowing? CLO3 (2.5)
4. How much the impact of personality and cultural norms effect on engineer's responsibilities in society? CL04 (2.5)
CLO 1: Discuss awareness of professional, social and ethical responsibility in engineering practice
CLO 2: Distinguish between individual behavior and behavior in a group
CLO 3: Choose different safety issues in engineering practice
CLO 4: Explain the impact of personality and cultural norms on engineer's responsibilities in society
In: Mechanical Engineering
Q1/ Answer the following:
1. What is the main advantage of direct acting thermostats?
2. What is the purpose of using a capacitor in a two-phase reversible induction motor?
3. What does the controller circuit consist of?
4. what is the pressure equalizing connection and when it is used?
5. What does the damper loss coefficient depend upon?
Q2/ Answer the following:
1. What should the damper motor power overcome?
2. What is the function of the starting relay?
3. What are two techniques used for defrost purposes in automatic defrost refrigerator.
4. How is the cooling plate heater connected?
5. What is the function of the super switch in the domestic deep freezer?
In: Mechanical Engineering
: Students from Elementary school were randomly separated into 4 groups and each group was taught a mathematical concept using a different teaching method. At the end of the teaching period, progress was measured by a unit test. The scores of shown below: (one child in group three was absent on the day the test was administered.)
(1) Construct an ANOVA table
(2) Do the data present significant evidence to indicate a difference in the average scores for the four teaching methods? Tabulated. (critical) F at α .05 = 3.29.
|
group |
|||
|
1 |
2 |
3 |
4 |
|
112 |
111 |
140 |
101 |
|
92 |
129 |
121 |
116 |
|
124 |
102 |
130 |
105 |
|
89 |
136 |
106 |
126 |
|
97 |
99 |
--- |
119 |
In: Statistics and Probability
| Output | Total cost | Marginal cost | Quantity demanded | Price | Marginal revenue |
|---|---|---|---|---|---|
|
0 |
$75 |
0 |
$180 |
||
|
1 |
120 |
$_____ |
1 |
165 |
$_____ |
|
2 |
135 |
_____ |
2 |
150 |
_____ |
|
3 |
165 |
_____ |
3 |
135 |
_____ |
|
4 |
210 |
_____ |
4 |
120 |
_____ |
|
5 |
270 |
_____ |
5 |
105 |
_____ |
|
6 |
345 |
_____ |
6 |
90 |
_____ |
|
7 |
435 |
_____ |
7 |
75 |
_____ |
|
8 |
540 |
_____ |
8 |
60 |
_____ |
|
9 |
660 |
_____ |
9 |
45 |
_____ |
|
10 |
795 |
_____ |
10 |
30 |
_____ |
(a) At what output level and at what price will the firm produce in the short run? What will be the total profit?
(b) What will happen to demand, price, and profit in the long run?
In: Economics
Journalize the following business transactions in general
journal form. Identify each transaction by number. You may omit
explanations of the transaction. (Credit account titles
are automatically indented when amount is entered. Do not indent
manually. If no entry is required, select "No Entry" for the
account titles and enter 0 for the
amounts.)
| 1. | Owner invested $60,000 in exchange for common stock of the corporation. | |
| 2. | Hired an employee to be paid $400 per week, starting tomorrow. | |
| 3. | Paid two years’ rent in advance, $7,200. | |
| 4. | Paid the worker’s weekly wage. | |
| 5. | Recorded service revenue earned and received for the week, $1,500. |
|
No. |
Account Titles and Explanation |
Debit |
Credit |
|
1. |
|||
|
2. |
|||
|
3. |
|||
|
4. |
|||
|
5. |
|||
In: Accounting