Without Loops/conditions execute a Java program that prints the following output. the numbers shown in the output
Question:
Without Loops/conditions execute a Java program that prints the following output. the numbers shown in the output should not be hardcoded (should not be written manually when printing), you should declare an integer variable, ask the user to give you lab and bonus marks, and then calculate the total and print the numbers accordingly. should also use "escape sequences" as well when printing out these drawings. The student info should be entered by the user. Make sure to have the spaces in your code, otherwise, marks will be deducted. DON'T ENTER/WRITE THE STUDENT NAMES/MARKS/TOTAL MARK MANUALLY (OTHERWISE MARKS WILL BE DEDUCTED).
highlighted one is sample
Preview File Edit View Go Tools Window Help Л1 Student inve ✓ Assignment1-ITEC1620.pdf Page 2 of 3 D Assignment1-ITEC1620.... for the bow YOU SHOULD NOT USE 100PS who CONDONAL to your understanding of primitive d Assignment 1: ITEC 1620 YORK UNIVERSITE UNIVERSITY Assignment 1: ITEC 1620 The output is as follows. Let's do some printing :) 31 32 that form a straight line, a second calculate the slope op-that form the equation of the straight line as follows: Then the art enter the imperyl codi of pint Area 33 34 The of the the the shop of the The of the penduar ne is called by cofni hen bp = YA - apxA Once you get the equation of the perpendicular line, you need to calculate the coordinates (x, y) of the intersection point between the original line and the perpendicular one as follows. Project A1 src Cas 24 AAAAW C C C C C C C C C A 36 37 35 30 1 x₁ = bp - b a-ap y₁ = ax + b 38 39 -- -- + [ - ]* YORK 40 e and the slope-latertag DONT ENTER THEM MANUALLY 41 42 43 44 45 445 46 Run: thehoudt be handed should not be willy when prinding you shoulder, theserve you aband o the tatal and print the numbers accendings You " well when printing at these drawings. The should be byther have the spec in your code, DON'T ENOWITE THE STUDENT NAMESTA MARC MANUALLY OTHERWISE MARKS WILL BE DEDUCTED 2 YORK Lastly, get the distance as follows: distance = √(x − x1)² + (YA - Y1)² When printing the slope and the slope-intercept values, DON'T ENTER THEM MANUALLY (otherwise marks will be deducted). The output should be as follows Enter the x coordinate of point 1: 3 Enter the y coordinate of point 1: 7 Enter the x coordinate of point 2: 5 Enter the y coordinate of point 2: 11 The slope of the line is: 2.0 The slope intercept of the line is: 1.0 The line equation is: y = 2.0x + 1.0!! Here is the line equation with integer format: y = 2x + 1!! Enter the x coordinate of point A: 1 Enter the y coordinate of point A: 1 The slope of the perpendicular line is: -0.5 The slope intercept of the perpendicular line is: 1.5 The corrdinates of the intersection point are x = 0.2 and y = 1.4 The distance from point A to the line is: 0.8944271909999159!! ப Structure ■ Bookmarks T there and the R THEM Good luck! 3 Ve All files are up-to-date (today 5:42 p.m.) Enter students names: John William Ann Enter info MaryLin Enter students lab marks: 34 56 45 75 Enter students bonus marks: Student info Name Lab John William 56 Ann MaryLin བྷ:སྐR༦ ཊྚ Search Bonus Total ཊྛིཀལག 37 60 47 ( ດາ Ő Wed Sep 28 7:20 PM YORK UNIVERSITE UNIVERSITY U \'Enjoy the term!' \\\\\ 3- Write a Java code that asks the user to enter the radius r of a sphere, reads it, and calculate the volume and area of the sphere as follows: Area = 4πr² 2- Write a Java program that prints the following output. Note that the numbers shown in the output should not be hardcoded (should not be written manually when printing), you should declare an integer variable, ask the user to give you lab and bonus marks, and then calculate the total and print the numbers accordingly. You should also use "escape sequences" as well when printing out these drawings. The student info should be entered by the user. Make sure to have the spaces in your code, otherwise, marks will be deducted. DON'T ENTER/WRITE THE STUDENT NAMES/MARKS/TOTAL MARK MANUALLY (OTHERWISE MARKS WILL BE DEDUCTED). Volume = 4 з прз For this question, you should use Math function for doing the "power" and "л". When printing the volume and the area values, DON'T ENTER THEM MANUALLY (otherwise marks will be deducted). Only print 2 numbers after the decimal points. The output should be as follows Enter the radius of the sphere: 10 The area of the sphere is: 1256.64 The volume of the sphere is: 4188.79 Good luck! SEP 28 <tv ☑ A Ο IJ W - Notifications al"); 33.60 102 CHAST UTF-8 4 spaces Preview File Edit View Go Tools Window Help Л1 Student inve ✓ Assignment1-ITEC1620.pdf Page 2 of 3 D Assignment1-ITEC1620.... for the bow YOU SHOULD NOT USE 100PS who CONDONAL to your understanding of primitive d Assignment 1: ITEC 1620 YORK UNIVERSITE UNIVERSITY Assignment 1: ITEC 1620 The output is as follows. Let's do some printing :) 31 32 that form a straight line, a second calculate the slope op-that form the equation of the straight line as follows: Then the art enter the imperyl codi of pint Area 33 34 The of the the the shop of the The of the penduar ne is called by cofni hen bp = YA - apxA Once you get the equation of the perpendicular line, you need to calculate the coordinates (x, y) of the intersection point between the original line and the perpendicular one as follows. Project A1 src Cas 24 AAAAW C C C C C C C C C A 36 37 35 30 1 x₁ = bp - b a-ap y₁ = ax + b 38 39 -- -- + [ - ]* YORK 40 e and the slope-latertag DONT ENTER THEM MANUALLY 41 42 43 44 45 445 46 Run: thehoudt be handed should not be willy when prinding you shoulder, theserve you aband o the tatal and print the numbers accendings You " well when printing at these drawings. The should be byther have the spec in your code, DON'T ENOWITE THE STUDENT NAMESTA MARC MANUALLY OTHERWISE MARKS WILL BE DEDUCTED 2 YORK Lastly, get the distance as follows: distance = √(x − x1)² + (YA - Y1)² When printing the slope and the slope-intercept values, DON'T ENTER THEM MANUALLY (otherwise marks will be deducted). The output should be as follows Enter the x coordinate of point 1: 3 Enter the y coordinate of point 1: 7 Enter the x coordinate of point 2: 5 Enter the y coordinate of point 2: 11 The slope of the line is: 2.0 The slope intercept of the line is: 1.0 The line equation is: y = 2.0x + 1.0!! Here is the line equation with integer format: y = 2x + 1!! Enter the x coordinate of point A: 1 Enter the y coordinate of point A: 1 The slope of the perpendicular line is: -0.5 The slope intercept of the perpendicular line is: 1.5 The corrdinates of the intersection point are x = 0.2 and y = 1.4 The distance from point A to the line is: 0.8944271909999159!! ப Structure ■ Bookmarks T there and the R THEM Good luck! 3 Ve All files are up-to-date (today 5:42 p.m.) Enter students names: John William Ann Enter info MaryLin Enter students lab marks: 34 56 45 75 Enter students bonus marks: Student info Name Lab John William 56 Ann MaryLin བྷ:སྐR༦ ཊྚ Search Bonus Total ཊྛིཀལག 37 60 47 ( ດາ Ő Wed Sep 28 7:20 PM YORK UNIVERSITE UNIVERSITY U \'Enjoy the term!' \\\\\ 3- Write a Java code that asks the user to enter the radius r of a sphere, reads it, and calculate the volume and area of the sphere as follows: Area = 4πr² 2- Write a Java program that prints the following output. Note that the numbers shown in the output should not be hardcoded (should not be written manually when printing), you should declare an integer variable, ask the user to give you lab and bonus marks, and then calculate the total and print the numbers accordingly. You should also use "escape sequences" as well when printing out these drawings. The student info should be entered by the user. Make sure to have the spaces in your code, otherwise, marks will be deducted. DON'T ENTER/WRITE THE STUDENT NAMES/MARKS/TOTAL MARK MANUALLY (OTHERWISE MARKS WILL BE DEDUCTED). Volume = 4 з прз For this question, you should use Math function for doing the "power" and "л". When printing the volume and the area values, DON'T ENTER THEM MANUALLY (otherwise marks will be deducted). Only print 2 numbers after the decimal points. The output should be as follows Enter the radius of the sphere: 10 The area of the sphere is: 1256.64 The volume of the sphere is: 4188.79 Good luck! SEP 28 <tv ☑ A Ο IJ W - Notifications al"); 33.60 102 CHAST UTF-8 4 spaces
Expert Answer:
Id be glad to help you create the Java program that adheres to the requirements and avoids condition... View the full answer
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Students also viewed these programming questions
-
Despite the glorious achievements of science in the 19th century, the century ended with a theoretical pessimism. Why?
-
Which of the following represents the GREATEST risk created by a reciprocal agreement for disaster recovery made between two companies? A. Developments may result in hardware and software...
-
Suppose that the U.S. division could sell as many chainsaws as it makes at $225 per unit in the U.S. market, net of all marketing and distribution costs. Required 1. From the viewpoint of the Burton...
-
Use a CAS to plot the implicitly defined level surfaces. x + y 2 - 3z 2 = 1
-
In 1940, the family of Thomas Back entered into an oil-and-gas lease with the Inland Gas Corporation. The lease held that Inland would pay to Backs family 12 cents per thousand cubic feet of gas...
-
In January 2014, Vanowski Corporation was organized and authorized to issue 2,000,000 shares of no-par common stock and 50,000 shares of 5 percent, $50 par value, noncumulative preferred stock. The...
-
Block 1 m m Block 2 Note: Figure not drawn to scale. Two blocks are connected by a string of negligible mass that passes over massless pulleys that turn with negligible friction, as shown in the...
-
Use Microsoft Visio or Visible Analyst to view and print the contextlevel data flow diagram for the computer inventory system as Chip and Anna did E2 Use the Repository feature or the Repository web...
-
the buyer for davidson's noticed that the previous december contained 22 selling days before Christmas. In the coming year there will be 23 selling days before Christmas. Davidson ='s is planning an...
-
Countinuing with Buns and Roses example:Eqipment with a $20,000 revalution increase in the current year. Now also suppose that the eqipment has cumulative revalution adjustment of the following...
-
Solve for x . log 2 ( x ) = 1 . 3
-
Give two different specific examples of actions Panera Bread has taken to increase its Customer Lifetime Value. Explain how each action has increased Panera's Customer Lifetime Value. Discuss each...
-
Katrina and Donald operate a gift business as partners. The partnership agreement provides that the profits or losses of the partnership should be divided equally after Donald, the active partner,...
-
Give two reasonable estimates (within an error of 10) for 1270 3.
-
Choose a company from the SEC EDGAR Web site for your Key Assignment to evaluate for the impact of convergence to IFRS. Review the financial reports and notes of the company you have chosen from the...
-
Why Vote? Voting is costly. If you vote in person, you have to find your polling place and often stand in line until you get to the voting booth to vote. If you vote by absentee ballot, you have to...
-
Annuities are streams of payments that the owner of an annuity receives for some specified period of time. The holder of an annuity can sell it to someone else who then becomes the recipient of the...
-
You have $10,000 sitting in a savings account, 600 hours of leisure time this summer and an opportunity to work at a $30 hourly wage. A: Next summer is the last summer before you start working for a...
-
The transfer function of a dynamic system is given by \[G(s)=\frac{s+1}{4 s^{4}+5 s^{3}+2 s^{2}+s+6} \] a. Using Routh's stability criterion, determine the stability of the system. b. Using MATLAB,...
-
Figure 10.40 shows a negative feedback control system. a. Design a P controller such that the damping ratio of the closed-loop system is 0.5 . b. Estimate the rise time, overshoot, and \(2 \%\)...
-
Consider the feedback system shown in Figure 10.26. a. Using Routh's stability criterion, determine the range of the control gain \(K\) for which the closed-loop system is stable. b. Use MATLAB...
Study smarter with the SolutionInn App