Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help with these two D | Question 26 20 pts Programming Question 3: The Kingdom of Mars, where the unit of currency is the

image text in transcribed

image text in transcribed

need help with these two

D | Question 26 20 pts Programming Question 3: The Kingdom of Mars, where the unit of currency is the Rock, has the following income tax code: First 3.000 Rocks: 0% tax Next 5,000 Rocks: 5% tax Next 10,000 Rocks: 10% tax Rocks after 18,000: 15% tax For example, someone earning 30,000 Rocks would owe (3,000 x 0.00 + 5,000+ 0.05 +10 000 0.10+ 12.000 0.15, or) 3,050 Rocks. Write a JAVA program that inputs incomes and calculates the tax owed in the Kingdom of Mars in Rocks. Upload the answer in a .java file or a zip file containing answer to all program files. Upload Choose a File 0 pts | Question 27 The following fragment is a if - else if - else code. Rewrite using switch and case: if (ch- 'A) a grade++ else if (ch'B' b grade++ else if (ch ) c grade++: else if (ch-D d grade++ f grade++: Paragraph

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

More Books

Students also viewed these Databases questions

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago