Find Jobs
Hire Freelancers

Private auction for Jtaborda (from Kanth90) on 10/20/2008 9:14:33 PM(repost)

$15-20 USD

Dibatalkan
Dibuat lebih dari 15 tahun yang lalu

$15-20 USD

Dibayar ketika dikirim
Small Java Program for school. ## Deliverables Q 1: This problem? is related to inheritance. You need to define three classes named **Accounts**, **Saving_Account**, and **Bonus_Saver_Account**. ? Following are the important points of the problem / assignment. ? (a)? ? ? class **Saving_Account** will have the following instance variables. **? ** private int account? ? ? ? ? ? ? ? ? ? //? this field will represent the account number private double balance? //? this field will represent the balance of the account private double rate;? ? ? ? ? ? ? ? ? ? // this field will represent the interest rate ? (b)? ? class **Bonus_Saver_Account** is derived from class **Saving_Account.** ? (c)? ? ? Interest rate will be applied to the balance according to the formula as balance*rate. This will give new balance after applying the interest rate. ? (d)? ? You will develop following methods as part of your **Saving_Account** class. ? A constructor A method for deposit named as deposit ( ) A method for withdrawl named as withdrawl ( ) A method for adding interest named as add_interest ( ) ? (e)? ? ? the derived class **Bonus_Saver_Account** will have following two instance variables : ? PENALTY and it will have value (double 25.00 ) which cannot be changed in the program. BONUS_RATE, it will have value (double 0.03) and cannot be changed. ? ? ? ? ? ? Following methods will be part of the derived class: ? ? ? ? ? A constructor. ? ? ? ? ? A withdrawl method (*call super class withdrawl method* passing suitable parameters.) ? ? ? ? ? An add_interest method (this method will add additional BONUS_RATE to the? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? existing interest rate. *Call super class Add_interest ( )* ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? passing BONUS_RATE as parameter) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (f)? ? ? class **Accounts** will contain the main ( ) method. You will use the following data for creating the objects of the class **Saving_Account** and **Bonus_Saver_Account** : ? **for Saving_Account object :**? account number = 4321 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? balance = 8921.39 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? interest rate = 0.02 ? **for Bonus_Saver_Account object:** account number = 6543 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? balance = 1225.00 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? interest_rate = 0.02 In addition to the creation of two objects with above data, you will call the following methods for each of the above objects: ? **Add_interest ( )** ??" pass BONUS_RATE parameter ? **deposit ( ) method** with parameter value 390.23 for Saving_Account object and parameter value 250.45 for Bonus_Saver _Account object. **? ** **Withdrawl ( ) method** with parameter value 432.34 for Saving_Account object and parameter value 875.95 for Bonus_Saver _Account object. ### ? C:\myjava>java? Accounts ? ? Interest added to account # : 4321 ? New balance:9099.817799999999 ====================================== ? ? Interest added to account # : 6543 ? New balance:1286.25 ====================================== ? ? Deposit into account: 4321 ? Amount:390.23 ? New balance: 9490.047799999998 ========================================= ? ? Deposit into account: 6543 ? Amount:250.45 ? New balance: 1536.7 ========================================= ? ? Withdrawl from account #: 4321 ? Amount:432.34 ? New balance: 9057.707799999998 ========================================= ? Penalty Incurred: 25.0 ? ? Withdrawl from account #: 6543 ? Amount:900.95 ? New balance: 635.75 ========================================= #### C:\myjava>
ID Proyek: 3356737

Tentang proyek

Proyek remot
Aktif 15 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan

Tentang klien

Bendera CANADA
Canada
5,0
8
Anggota sejak Jan 24, 2007

Verifikasi Klien

Pekerjaan lain dari klien ini

Java applet Assignment
$30-35 USD
Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.