A quick word on blocking ads

It looks like you are using an ad blocker. That's okay. Who doesn't? But without advertising revenue, we can't keep making this site awesome. Click the link below for instructions on disabling adblock.

How to disable ad-blocker for Newschoolers

  • Home
  • News
    • Latest
    • Top Rated
    • Features
    • Podcasts
    • Tags
    • Interviews
    • Event Coverage
    • Opinions
    • Industry News
    • Gear
  • Forums
    • Categories
    • Ski Gabber
    • Non-Ski Gabber
    • Site Discussion
    • Media & Arts
    • Gear
    • Lady Gabber
    • Content Creators
    • AT & Backcountry
    • Regionals
  • Gear
    • Gear Guide 2024-25
    • Gear Guide 2023-24
    • The Roofbox Reviews
    • Editors' Picks
    • Gear Talk
  • Buy/Sell
    • Map View
  • Photos
    • Latest
    • Top Rated
  • Videos
    • Latest
    • Top Rated
    • Ladies
  • Store
  • More
    • Terrain Parks Guide
    • Contests
    • NS Giveaway
    • Top Rated Members
  • Search
  • Login
  • Login

Login to Newschoolers

Register Lost password?

Search Newschoolers

Preview

LOADING...
  • Forums
  • Media And Arts
  • Java Help
  • Reply

Replying to Java Help

sconnyFC:
so i am taking a bogus intro to programming class and need some assitance.

we were given:

Account (double balance, double interest)
Account (double balance)
double getBalance ()
double getInterest ()
void setInterest (double newInterest)
void addInterest ()
void changeBalance(double ammount)

What is the output for this code segment?

double bonus = 53.75;
double raise = bonus;
Account acct1 = newAccount (raise);
Account acct2 = acct1;
bonus = 42.25
acct1.changeBalance (32.50);
System.out.println(raise + ":");
System.out.println(acct2.getBalance());

(i think i have this answer already)

and also...
Supposing the Account class is in the banking package. I need to write a complete Java program that does the following:

-creates an account with initial balance of $500 and interest rate of 1.2%,

- deposits $76.42 into account,

-adds ammount of interest to the account balance,

-increases the balance by 3%,

-withdraws $200,

and

-prints the final balance.



Can anyone help a brother out?
thanks

Click to expand post

Follow Us

Newsletter

Subscribe to our newsletter and stay up-to-date with the latest news from Newschoolers and our partners

Subscribe
Register Contact Advertise Privacy Policy Terms of Use
Newschoolers has affiliate partnerships so we may receive compensation for some links to products and services.
© 2025 NEWSCHOOLERS, INC.
NEWSCHOOLERS is a registered trademark of NEWSCHOOLERS, INC.
  • Bike
  • Fantasy Surfer
  • Newschoolers
  • Powder
  • Ridemonkey
  • Snowboarder
  • Surfer
  • TransWorld Skateboarding