Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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 method header: public static double futureInvestmentValue (double investmentAmount, double monthlyInterestRate, int years) For example. futureInvestmentValue(10000, 0.05/12, 5) returns 12833.59. Write a test program that prompts the user to enter the investment amount (e.g., 1000) and the interest rate (e.g., 9%) and prints a table that displays future value for the years from 1 to 30, as shown below: The amount invested: 1000 Annual interest rate: 9 Years 1 2 ellipsis 29 30 Future Value 1093.80 1196.41 13467.25 14730.57 (Conversions between Celsius and Fahrenheit) Write a class that contains the following two methods: Use JGrasp to design and implement the following programs (from the end of Chapter 6 in the textbook) and understand what they do. Each program includes a main method and the specified method(s) in the problem statement. Notice that the main method is used to test the specified method(s). Required: Use java assert statement to validate program input values when conditions applied to inputs (for int and char types). See Chapter 3 slides for code examples. Apply this requirement to both lab exercises and assignment programs. Design and implement a Java program for programming exercise 6.7, page 235, from the textbook (name it InvestmentValue). Implement the main method as stated in the problems statement. Sample output is given in the textbook. Document your code, and organize the outputs as shown in the sample output using escape characters. Design and implement a Java program for programming exercise 6.15, page 237, from the textbook (name it TaxTable). Design the program to print out separate tables for filing status (Single, Married Joint or Qualifying Widow(er), Married Separate, and Head of house). Document your code, and organize the outputs use escape characters. Design and implement two Java programs for programming exercise 6.19, page 238. The first program (called My Triangle) is to implement the specified methods. The second program (called TestMyTriangle) is to test the first program methods. Program TestMyTriangle is used to compute the area of a triangle if the input is valid. Notice that method isvalid () is used to validate the input before attempting to compute the area. See listings 10 and 11 (page 224) on how to write 2 programs (main program and test program). Design the test program main method such that it allows the user to re-run the program with different inputs ((i.e., use a loop structure). Document your code and organize the outputs properly using escape. Save both programs in the same folder. Design and implement a Java program for programming exercise 6.30, page 241, from the textbook (name it CrapsGame). Rolling a dice is simply generating a random integer number between 1 and 6. Write a separate method for this function, call it rollDie() to return the generated number (one number between 1 and 6). Do NOT print anything inside this method. Follow the game rules stated in the problem statement. Use escape characters to format the outputs as shown in the sample outputs

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

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions