create a Java application program that will add up the cost of three items, then print the final total with sales tax.
You should begin by prompting the user to enter three separate prices for three items that are being purchased. For each item you should ask for (in this order) the quantity of the product and the price of the product.
The program should compute, and be able to print to the screen:
the subtotal (the total amount due before tax)
sales tax (the amount of sales tax that will be added, assume 7% tax rate)
total due (subtotal + sales tax)
The following is an example of what your MIGHT see on the screen when your program runs. The exact output depends on what values that the user types in while the program runs. The user's values are shown below in italics:
Enter the quantity of the first product: 3
Enter the price of the first product: $5.25
Enter the quantity of the second product: 2
Enter the price of the second product: $1.83
Enter the quantity of the third product: 7
Enter the price of the third product: $0.89
Subtotal: $25.64
Sales Tax: $1.79
Total Due: $27.43
can post a screen shot of your java program Would like to learn the steps, i am doing intro to Java programing
In: Computer Science
You have $5,995.14 in a brokerage account, and you plan to deposit an additional $6,000 at the end of every future year until your account totals $280,000. You expect to earn 13% annually on the account. How many years will it take to reach your goal? Round your answer to two decimal places at the end of the calculations.
___ years
In: Finance
What are the major difference between univariate, bivariate, and multivariate analysis?
What is the difference between correlation and regression?
Inferential statistics allow us to
In: Math
You must use C Language.
End Goal:
HATFIELD, HEIDI
KAISER, RUSSELL
LIPSHUTZ, HOWARD
PENKERT, DAWN
WRIGHT, ELIZABETH
The user inputs the students first name and last names separately but within one loop. The loop should end when the user presses enter on the first name without entering any text. Upon completing entry of data, the output pictured above should display on the output.
Using the code given, follow the steps:
1. You should be able to enter up to 20 student first names. Also, change the input array to an appropriate size of 18 for the length of the first name. Use a meaningful name for the storage of first names array. Change prompts as needed. The loop should exit when the user presses enter when inputing the first name without adding any text. Compile and make sure it works from main(). At this point, you should be able to enter and alphabetize a list of up to 20 first names! Alphabetizing the first name is just a test!!! In the end, you will alphabetize the whole name string.
2. Add another array and get input for last name INSIDE the loop for your first names. This last name array will also be an array of 20 elements but with room for up to 25 characters. Again, do not use another loop! Just add code to input the last name to the first loop. The program should now ask the user to input the student's first name and then last name in that order for each individual. Then the program will loop to continue adding student names until the user presses enter on the student's first name. Make sure the last name is converted to all caps. You do not need to alphabetize this array, but you may want to print it out to make sure everything is working just as a test.
3. Make changes to convert the first name to all upper case using a function. (Example: User enters bob on the first name, then on the last name enters jenkins, it will look like Bob Jenkins instead of bob jenkins)
Last step: Combine last and first into an third array. This code is most easily added to the first loop. You just had the user enter first and last names. So the current value of the subscript used for these arrays can be used to combine content and store in the third array. Alphabetize THIS array (instead of the first name array) which means you need to send a different pointer to the stsrt() function. Print out the end result. Test that everything is working on this program.
Given Code:
void rollsheet(void) {
int ct = 0;
char *ptstr[LIMIT];
char input[LIMIT][SIZE];
int k;
printf("Enter up to %d student names, and I will sort them!\n",
LIMIT);
printf("To stop, press the Enter key at a line's start.\n");
while (ct < LIMIT && s_gets(input[ct], SIZE) !=
NULL
&& input[ct][0] != '\0')
{
ptstr[ct] = input[ct]; /* set ptrs to strings */
ct++;
}
stsrt(ptstr,ct);
puts("\nHere's the sorted list:\n");
for (k = 0; k < ct; k++)
puts(ptstr[k]) ; /* sorted pointers */
}
void stsrt(char *strings[], int num)
{
char *temp;
int top, seek;
for (top = 0; top < num-1; top++)
for (seek = top + 1; seek < num; seek++)
if (strcmp(strings[top],strings[seek]) > 0)
{
temp = strings[top];
strings[top] = strings[seek];
strings[seek] = temp;
}
}
char * s_gets(char * st, int n)
{
char * ret_val;
int i = 0;
ret_val = fgets(st, n, stdin);
if (ret_val)
{
while (st[i] != '\n' && st[i] != '\0')
i++;
if (st[i] == '\n')
st[i] = '\0';
else // must have words[i] == '\0'
while (getchar() != '\n')
continue;
}
return ret_val;
}
In: Computer Science
C4-2 From Recording Transactions (Including Adjusting Journal Entries) to Preparing Financial Statements and Closing Journal Entries (Chapters 2, 3, and 4) [LO 2-3, LO 3-3, LO 4-1, LO 4-2, LO 4-3, LO 4-4, LO 4-5, LO 4-6]
[The following information applies to the questions
displayed below.]
Brothers Harry and Herman Hausyerday began operations of their
machine shop (H & H Tool, Inc.) on January 1, 2016. The annual
reporting period ends December 31. The trial balance on January 1,
2018, follows (the amounts are rounded to thousands of dollars to
simplify):
|
Account Titles |
Debit |
Credit |
||||
|
Cash |
$ |
4 |
||||
|
Accounts Receivable |
4 |
|||||
|
Supplies |
11 |
|||||
|
Land |
0 |
|||||
|
Equipment |
68 |
|||||
|
Accumulated Depreciation |
$ |
7 |
||||
|
Software |
24 |
|||||
|
Accumulated Amortization |
8 |
|||||
|
Accounts Payable |
6 |
|||||
|
Notes Payable (short-term) |
0 |
|||||
|
Salaries and Wages Payable |
0 |
|||||
|
Interest Payable |
0 |
|||||
|
Income Tax Payable |
0 |
|||||
|
Common Stock |
83 |
|||||
|
Retained Earnings |
7 |
|||||
|
Service Revenue |
0 |
|||||
|
Salaries and Wages Expense |
0 |
|||||
|
Depreciation Expense |
0 |
|||||
|
Amortization Expense |
0 |
|||||
|
Income Tax Expense |
0 |
|||||
|
Interest Expense |
0 |
|||||
|
Supplies Expense |
0 |
|||||
|
Totals |
$ |
111 |
$ |
111 |
||
Transactions and events during 2018 (summarized in thousands of dollars) follow:
Data for adjusting journal entries as of December 31:
C4-2 Part 3
In: Accounting
A solution is made by dissolving 0.0500 mol of HF in 1.00 kg of water. The solution was found to freeze at -0.104C. Calculate the percent dissociation of HF in this solution.
In: Chemistry
A person walks into a room that has, on opposite walls, two plane mirrors producing multiple images. Find the distances from the person to the first three images seen in the left-hand mirror, when the person is 5.60 ft from the mirror on the left wall and 13.9 ft from the mirror on the right wall.
A. First Image= 11.2ft
B. Second Image?
C. Third Image?
In: Physics
Java Programming:
In the program shown below, I want to print the result in the output file. The main static method calls a method, displaySum which adds two integers and prints the result (sum). The problem is that I am not able to use "outputFile.print()" inside displaySum to print the content as the output file. I also want to display the content of two other methods, but I am facing this difficulty.
** DisplayOutput.java **
import java.io.*;
public class DisplayOutput
{
public static void main(String[] args) throws
IOException
{
FileWriter fw = new
FileWriter("output.txt");
PrintWriter outputFile = new
PrintWriter(fw);
outputFile.println("Suppose two
inetegers are 2 and 3.");
outputFile.println("Display the sum
of two inetegers (2 and 3).");
displaySum(2,3);
outputFile.close();
}
private static void displaySum(int n1, int n2)
{
int sum = n1 + n2;
outputFile.print("Sum of two integers (2 and 3)
is: " + sum); // Error: outputFile cannot be
resolved
}
}
In: Computer Science
Consider the following thermodynamic properties:
(i) work done on a system; (ii) heat absorbed; (iii) entropy; (iv)
enthalpy.
Which of these properties are state functions?
(a) (i) and (ii) only
(b) (i) and (iii) only
(c) (i) only
(d) (iii) and (iv) only
In: Physics
In: Chemistry
Determine the energy of 2.00 mol of photons for each of the following kinds of light. (Assume three significant figures.)
Infrared radiation (1590nm)
Visible light (500nm)
UV radiation (150nm)
In: Chemistry
This year Jack intends to file a married-joint return. Jack received $173,400 of salary and paid $8,600 of interest on loans used to pay qualified tuition costs for his dependent daughter, Deb. This year Jack has also paid moving expenses of $4,550 and $35,100 of alimony to his ex-wife, Diane, who divorced him in 2012. (Round your intermediate calculations and final answer to the nearest whole dollar amount.)
Suppose that Jack also reported income of $10,900 from a half share of profits from a partnership. Disregard any potential self-employment taxes on this income. What AGI would Jack report under these circumstances?
In: Accounting
The figure below shows a bar of mass m = 0.280 kg that
can slide without friction on a pair of rails separated by a
distance ℓ = 1.20 m and located on an inclined plane that makes an
angle θ = 29.5° with respect to the ground. The resistance
of the resistor is R = 1.50 Ω, and a uniform magnetic
field of magnitude B = 0.500 T is directed downward,
perpendicular to the ground, over the entire region through which
the bar moves. With what constant speed v does the bar
slide along the rails?
In: Physics
Part 2: Problem Solving - Consolidated Financials Assume that on 1/1/X0, a parent company acquires a 70% interest in its subsidiary for a price at $480,000 over book value. The excess is assigned as follows: Asset Fair Value Useful Life Patent $320,000 8 years Goodwill 160,000 Indefinite 70% of the goodwill is allocated to the parent. Included in the attached Excel spreadsheet are the pre-consolidation financial statements for both the parent and the subsidiary.
| ACT470-Portfolio-Option 1 | |||||||
| Consolidation Entries | |||||||
| Parent | Subsidiary | Dr | Cr | Consolidated | |||
| Income Statement: | |||||||
| Sales | 6,000,000 | 2,000,000 | 0 | ||||
| Cost of Goods sold | (4,000,000) | (1,200,000) | 0 | ||||
| Gross profit | 2,000,000 | 800,000 | 0 | ||||
| Income (loss) from subsidiary | 112,000 | 0 | |||||
| Operating expenses | (1,500,000) | (600,000) | 0 | ||||
| Net Income | 612,000 | 200,000 | 0 | ||||
| Consolidated NI attrib to NCI | 0 | ||||||
| Consolidated NI attrib to CI | 0 | ||||||
| Statement of Ret Earnings: | |||||||
| BOY retained earnings | 1,978,000 | 970,000 | 0 | ||||
| Net income | 612,000 | 200,000 | 0 | ||||
| Dividends | (190,000) | (100,000) | 0 | ||||
| EOY retained earnings | 2,400,000 | 1,070,000 | 0 | ||||
| Balance Sheet: | |||||||
| Cash | 200,000 | 120,000 | 0 | ||||
| Accounts receivable | 600,000 | 400,000 | 0 | ||||
| Inventory | 800,000 | 880,000 | 0 | ||||
| Equity investment | 1,400,000 | 0 | |||||
| PPE, net | 2,000,000 | 1,200,000 | 0 | ||||
| Patent | 320,000 | 0 | |||||
| Goodwill | 480,000 | 0 | |||||
| 5,800,000 | 2,600,000 | 0 | |||||
| Current liabilities | 500,000 | 200,000 | 0 | ||||
| Long-term liabilities | 1,100,000 | 600,000 | 0 | ||||
| Common stock | 600,000 | 280,000 | 0 | ||||
| APIC | 400,000 | 450,000 | 0 | ||||
| Retained earnings | 2,400,000 | 1,070,000 | 0 | ||||
| Noncontrolling interest | 0 | ||||||
| 5,000,000 | 2,600,000 | 0 | 0 | 0 | |||
In: Accounting
A projectile is shot from the edge of a cliff h= 245 m above ground level with an initial speed of v0= 155 m/s at an angle of 37.0 with the horizontal, as shown in the Figure.
a. What are the horizontal and vertical components of the initial velocity?
b. Determine the time taken by the projectile to hit point P at ground level
c. Determine the range X of the projectile as measured from the base of the cliff
d. Find the maximum height above the cliff top reached by the projectile
e. What is its speed right before it hits the ground?
Please Explain!! how to solve each step.!
In: Physics