Question: Question 1 Suppose you own a bond that will pay a future value based on a given annual interest rate and the number of years
Question 1 Suppose you own a bond that will pay a future value based on a given annual interest rate and the number of years in the future. Here's the formula for determining the present value (what you can sell the bond for now presentvalue tutur value/(1 + tatayan Provide a Java assignment staternent that calculates the present value (using future value, rate, and years), rounds to the nearest dollar, and assigns the result to a variable named presentValue. Use Math class methods Question 2 Given the below program skeleton Replace the cinsert code here> items with appropriate code so that the program produces the output shown below. Try to mimic the output's format precisely. public class Caraventor Berort. public static void main(String args) final String HEADING FMT_STR cinsert code here>; final String DATA FMT STR = insert code here>> String item1 = "Ford Fusion": double price1 = 23215 int aty1-14 String item2 "Honda Accord": double price2 = 24570: intaly2 = 26. System.out.pdOHEADING_FMT_STR, "Atom,"Price", "inventory'); System.out.print HEADING FMT_STR, -"); System.out.pc(DATA FMT_STR, Itemt price, aty1); System.out.DATA FMT_STR, Item2, price2, 9ty2); } // end main // and class Carlawantory. Bonart Output Item Price Inventory Ford Fusion 23,215.00 14 Honda Accord 24.570.00 26
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
