Tags:
tag this topic
create new tag
view all tags
---++ Sixth Lab, ITSC 121, Spring 2020 ---+++Overview Write the following programs. The first one deals with investments. The second deals with taxes. The third deals with strings. ---++++Program 1: Investments For this program you are to write a method that computes future investment value at a given interest rate for a specified number of years. The future investment is determined using the formula in Programming Exercise 2.21. Use the following header<br> <b>public static double futureInvestmentValue(double investmentAmount, double monthlyInterestRate, int years)<br></b> For example: <b>futureInvestnmentValue(10000,0.05/12,5)</b> returns <b>12833.59</b>. <br> Write a test program that prompts the user to enter the investment amount (e.g. 1,000) and the interest rate (e.g. 9%) and prints a table that displays future value for the years from 1 to 30, as show below (with the sample input above) :<br><pre> Years Future Value 1 1093.80 2 1196.41 ... 29 13457.25 30 14730.57 </pre> Quality testing is very important for this program and the rubric will reflect that ---++++Program 2: Taxes Listing 3.5 gives a program to compute tax. Write a method for computing tax using the following header:<br> <b>public static double computeTax(int status, double taxableIncome)</b><br> Use this method to write a program (that has no input) that prints a tax table for taxable income from $50,000 to $60,000 with intervals of $50 for all the following statuses:<br> <pre> Taxable Single Married Joint Married Head of Income or Qualifying Separate Household Widow(er) ------------------------------------------------------------------ 50000 8688 6665 8688 7353 50050 8700 6673 8700 7365 ... 59950 11175 8158 11175 9840 60000 11188 8165 11188 9853 </pre> Hint: round the tax into integers using Math.round ---++++Program 3: Strings write a method that finds the number of occurrences of a specified character in a string using the following header<br> <b>public static int count(String str, char a)</b><br> For example, <b>count("Welcome", 'e')</b> returns 2. Write a test program that does a quality job testing the method. It should not use input. It should call the method enough times to show that it works.The rubric will reflect the importance of testing. ---+++Reminders 1. Include proper comments for all 1. Use proper formatting, etc. 1. Test with more than one set of data where it is appropriate 1. Get the correct data outputted on the program before worrying about formatting ---+++Submissions 1. Create a software development report that includes the following for the program: * A problem summary (the big picture) * A list of requirements. (Things that this particular implementation of a solution must do) * A list of steps your program does * A testing report: What exact input you used and what output you got. * How long it took to write it, and how much time was on it each day! * Who you got help from (if you got help) * Changes (if any) you would make if you had more time and/or skill * At least two things you learned while writing the program 1. Create a <b>zip</b> folder with your software development report(s) and your java file and submit that to canvas. 1. Due date can be found on canvas
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2021-10-19
-
cathybareiss
Home
Site map
Assessment web
BethelAIResources2026 web
CenterForComputing web
ChatGPT web
Intro2AIatBethel web
Main web
Sandbox web
TWiki web
CenterForComputing Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback