Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6. Show what the following code will prin int first 10, second, third; double fourth, fifth6.66 String thingiCS162, thing2CS162; 10. fourth fifth3 11. first 12,

image text in transcribedimage text in transcribedimage text in transcribed

6. Show what the following code will prin int first 10, second, third; double fourth, fifth6.66 String thingi"CS162", thing2"CS162"; 10. fourth fifth3 11. first 12, second; first %7; 13. thirdfirst4 14. System.out.printin( "First"second" 15. System.out.printin( "Last"third "n" 16. first4 17. secondfirst2 3 18. third first 3 19, first t- third % 7 20. System.out.printIn "Number b" + first); 21. System.out.print("Answer" second) 22. System.out.printin( "Float"second third) 23. System.out.printin( "This"fourth) 24 25, if(4 % 7 26 27 else 28 29 18 % 7) System.out.println("Grand"); System.out.println("Valley"); System.out.println("State"); System.out.println("University") 39, if ( thing!" thing2) 31 else ystem 34. fourth9 35. if (first fourth) System.out.println("works" 5. Given a class like Dice: write a method that creates a Dice object and displays the value write a method accepts two Dice objects as parameters and determines which has the higher value (returns an int -> 1 or 2) a. b. Write a method below called getTax that returns the amount of tax for an employee. Tax is 12% of salary for married employees and 10% for single employees. If the salary is over $1,000 they are given an addition $20 of tax. 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Master The Art Of Data Storytelling With Visualizations

Authors: Alexander N Donovan

1st Edition

B0CNMD9QRD, 979-8867864248

More Books

Students also viewed these Databases questions

Question

Can workers be trained in ethics? How? Defend your answer.

Answered: 1 week ago