Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

csci 1 0 1 1 lab 2 Instructions Start Apache NetBeans. Create a new project called YourlastnameLab 2 Write the following program in the editor

csci 1011 lab2
Instructions
Start Apache NetBeans.
Create a new project called YourlastnameLab2
Write the following program in the editor window making sure to use your name
instead of Bram Stoker:
package cscilo11.lab2;
import java.util.Scanner;
??****
CSCI 1011 Lab 2
@author Bram Stoker
A program that calculates interest on a deposit
*/
public class BramStokerLab2{
??****
@param args the command line arguments
* APSU
public static void main(String[] args){
Scanner keyboard = new Scanner(
System.in);
System.out.println("Welcome to Bram Stoker's interest
calculator.");
System.out.println();
System.out.println("Please enter your initial deposit
amount:");
double balance = keyboard.nextDouble();
balance = balance balance **0.049;
$
System.out.println("With a 4.9% APR your deposit will be worth
}
}
Run the program and test it with sample input. Do this several times.
Modify the program so it uses a named constant in place of 0.049.
Run the program and test it to see if it gives the same values.
Modify the interest rate to 0.059.
Run the program again and test it to see the values it gives have changed.
Did you change the output, so it now says 5.9%? If not make that change and run the
program again.
Since it would be easier not to have to change the program in two places, declare a
new double variable called percent and set its value to 100 times the interest rate.
Modify your output statement so it uses the percent variable instead of 5.9.
Run the program again and test it to make sure it still works properly.
Add some additional statements to compute what the balance will be after a second
year of earning interest and display this result along with the original result.
Run the program again and test it to make sure that the new code works.
image text in transcribed

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 And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions