Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NFO - C 2 1 0 ( Problem Solving and Programming I ) Homework# 1 5 0 points * No late submission * Solve the

NFO-C 210(Problem Solving and Programming I)
Homework#150 points
*No late submission*
Solve the following programming problems: Keep in mind that these exercises require careful
reading of the related module sections in Canvas and the related chapters. Make sure to
document your code very well and follow proper programming practices.
Grading rubric for this assignment is provided
Problem 1(Decision Structure)
Assume that the taxes for citizens are calculated based on the annual income according to the
following hypotheticals:
For incomes of $20,000 or less, calculate taxes as: taxes = income *3%
For incomes more than $20,000 but less than $40,000, citizens pay 3% on the first
$20,000 and 5% on the remaining income
For incomes equal or above to $40,000 but less than or equal to $100,000, citizens pay
5% plus $500 fixed amount
For incomes above $100,000, citizens pay 10%
The amount of taxes citizens pay per year must not exceed $20,000, regardless of income
Create a program that allows the user to enter the income as input. Once the user enters the
income, your program determines and displays the amount of taxes for that user.
Use any means you wish to get the users input (terminal or Input Dialog) and display the output
using either terminal or a Message Dialog.
Name your class as Q1Taxes.java
Problem 2(Decision & Looping Structures)
Write a program that simulates a simple currency conversion between US dollars and Euros
according to the following sample run. Use this conversion rate, 1 US Dollar equals to 0.89 Euro.
Please notice the simple validation of the users input. The user needs to enter the name of the
currency correctly (case-insensitive). Name your class as Q2Currency.java

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions