Skip to navigation Skip to content
jarviscodinghub
  • Our Services
  • How It Works
  • Ask Your Question Now
  • Sign In/Up
  • Ask Your Question Now
  • About Us
    • Exclusive Programming Help
    • Terms of Usage
    • Refund and Returns Policy
    • News
  • How It Works
  • Our Services
  • My Account
  • Ask Your Question Now
  • About Us
    • Exclusive Programming Help
    • Terms of Usage
    • Refund and Returns Policy
    • News
  • How It Works
  • Our Services
  • My Account
  • $0.00 0 items
Home / CSCI231 / CSCI231 Project Eleven Account Classes solution
Sale!
CSCI231 Project Eleven Account Classes solution

CSCI231 Project Eleven Account Classes solution

$29.99 $17.99

Original Work ?

Download Details:

  • Name: 11.ProjectEleven-bwwftn.zip
  • Type: zip
  • Size: 26.45 KB

Category: CSCI231 Tags: Account Classes, CSCI231, polymorphism You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work
Share This
  • Description

Description

5/5 - (4 votes)

Purpose: The purpose for this project is to reinforce the knowledge learned in
Chapter 11.
Objectives:
1. Write base class and derived classes
2. Apply theory of polymorphism
Problem description:
Write bank Account family classes. The Account class is base class. CheckingAccount
and SavingsAccount are derived classes. The class diagrams are following:
Account
-id: int
-balance: double
+Account()
+Account(id: int, balance: double)
+setBalance(balance:double):void
+getBalance():double
+setId(id:int):void
+getId():int
+deposit(amount:doube): void
+withdraw(amount:double):void
+toString():String
CheckingAccount
+withdraw(amount:double):void
+toString():string
SavingAccount
-interestRate: double
+setInterestRate(rate:double):void
+getInterestRate():double
+withdraw(amount:double):void
+addInterest():void
+toString():string
Requirement:
The class design could be better. However, we are limited with the knowledge we
have now. So the above class diagram is reasonable. All methods are explained by
their names. Please pay attention to withdraw methods.
The Account class withdraw method is implemented by doing nothing. The
CheckingAccount withdraw method must fulfill the policy that the withdraw amount
must greater than 0 and less than or equal to current account balance. The
SavingsAccount withdraw method must fulfill the policy that the minimum balance
of the account must be 500 all the time. Also the withdraw amount must greater
than 0. If the condition cannot be fulfilled, either withdraw method will do nothing
but return.
When addInterest method in SavingsAccount class, the account balance updated to
current_balance * (1 + interestRate) where interestRate is in decimal form. For
instane, 6% is 0.06.
The students must write a main function to test these accounts. In main function,
polymorphism must be used to handle a collection of accounts.
Sample pseudo code for main function
1. Declare an array of Account, named accounts, of size 4
2. Initialize every element in accounts array. Make accounts[0] and accounts[1]
be CheckingAccount and accounts[2] and accounts[3] be SavingsAccount
3. Make deposit and withdraw for each account and print out the account
information to see the result
4. If the account is SavingsAccount, call addInterest function to update the
account balance. Then print out the account information
Submission:
Submit the YourProj11.java file via blackboard link. The due date will be announce
on blackboard

Related products

  • CSCI231 Project 09 Temperature Class solution

    CSCI231 Project 09 Temperature Class solution

    Sale! $35.00 $21.00
    Buy Answer
  • CSCI231 Project Seven An Array Festive solution

    CSCI231 Project Seven An Array Festive solution

    Sale! $29.99 $17.99
    Buy Answer
  • CSCI231 Project 02. Java Basic solution

    CSCI231 Project 02. Java Basic solution

    Sale! $29.99 $17.99
    Buy Answer
CSCI231 Project 10 MyString Class solution CSCI231 Project 10 MyString Class solution CSCI231 Project 01. Introduction to BlueJ solution CSCI231 Project 01. Introduction to BlueJ solution
Email Us: jarviscodinghub@gmail.com
Tel:+1 (541)-423-7793
New York
United States
Scan to Get Help
We follow the DMCA and remove content immediately if requested by the copyright owner.

Latest Trends

  • CS7637 Mini-Project 5: Monster Diagnosis Summer 2025
  • CS7637 Mini-Project 4: Monster Identification Summer 2025
  • CS7637 Mini-Project 3: Sentence Reading Summer 2025
  • CS7637 Mini-Project 2: Block World Summer 2025
  • CS7637 Mini-Project 1: Sheep & Wolves Summer 2025
Terms

While the solutions we provide are very correct and accurate they should only be used as tutorials to make the final copy for submission by students.

© jarviscodinghub 2025
Privacy PolicyBuilt with Storefront & WooCommerce.
  • My Account
  • Search
  • Basket 0
CSCI231 Project Eleven Account Classes solution
You're viewing: CSCI231 Project Eleven Account Classes solution $29.99 $17.99
Buy Answer
WhatsApp us Now