Note!
Submit your assignment to the Dropbox, located at the top of this page.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
iLAB OVERVIEW
Scenario/Summary
In this lab, you will create one project that uses inheritance and one simple Applet.
Deliverables
Program files for each of the following programs
1. InheritanceTest; and
2. Greeting.
At the beginning of all your programs, put a comment box that includes the program name, your name, and a brief description of the program.
Example:
/***********************************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************************/
How to submit your assignment:
1. The programs must have the same names as the assignment title.
2. Each Java source file (*.java) must include a corresponding class file (*.class) program as evidence of success.
3. In addition to the program source code files and byte code files, put all your program source code files and screen shots of your program output files into a Word document.
4. You must use a zipped folder to send your weekly assignment to the Dropbox. Do not send subfolders within your zipped folder. Place all of the .java and .class files for the week into the one zipped folder. The zip folder should be named CIS355A_YourLastName_iLab_Week3, and this zip folder will contain all the weekly programming assignments.
Required Software
Eclipse
Access the software at https://lab.devry.edu.
Steps: 1 and 2
iLAB STEPS
Step 1: InheritanceTest
Back to Top
Implement an inheritance hierarchy based on the following specifications for Account class, Checking Account class, and Savings Account class:
Account class
• Methods:
o processDeposit ( ) – accepts a single double parameter containing the deposit amount. Updates the balance by adding the deposit amount to the balance.
o processWithdrawal ( ) – accepts a single double parameter containing the withdrawal amount. Updates the balance by subtracting the withdrawal amount for the balance. Note: For now do not worry about negative balances.
o calcInterest ( ) – Coded as a double method with an empty body.
• Attributes:
o String Account Name
o Integer Account ID
o Double balance
• Constructor
o Prompt the user and accept input for the Account Name, Account ID and the initial balance.
The CheckingAcct class which is a derived class of the Account class.
• Attributes:
o Inherits all the attributes of the Account class.
o The overDraftFee is double and is populated in the constructor of the CheckingAcct class.
• Methods:
o calcInterest () – If the account balance is greater than or equal to 3000.00 an interest rate of 1% or .01 is applied to increase the balance.
• Constructor:
o Prompt the user for the OverDraftFee.
The SavingsAcct class which is a derived class of the Account class.
• Attributes:
o Inherits all the attributes of the Account class.
o There are no other attributes.
• Methods:
o calcInterest ( ) – If the account balance is greater than or equal to 5000.00 an interest rate of 4% or .04 is applied to increase the balance. If the balance is greater than or equal to 3000.00 an interest rate of 3% or .03 is applied to increase the balance. Otherwise use an interest rate of 2%. The new balance is returned to the calling program.
• Constructor:
o Inherited from the Account class. (no code needed)
Main:
Prompt the user for the bank name and routing number. Create at least two account objects (each of a different type). Process a deposit then withdraw then calculate the interest for each account. Generate the following report:
Bank Name: XXXXXXXX Routing Number: XXXXXX
Account Name: XXXXXX Account ID: XXXXXXXXX Balance: 9999.99
Account Name: XXXXXX Account ID: XXXXXXXXX Balance: 9999.99
Greeting Points Description
Standard header included 1 Must contain program’s name, student name, and description of the program
Program compiles 1 Program does not have any error
Program executes 1 Program runs without any error
Created the Account class 4 The Account class is created with the required attributes and methods.
Created the CheckingAccount, SavingsAccountclasses 8 The CheckingAccount and Savings Account classes are created with the required attributes and methods.
Created the main and displayed ouput 5 The main program is created and objects of each account class are created. The required methods are called and the output displayed.
Subtotal 20
Step 2: Greeting
Back to Top
Create an applet of size 500 by 500. The background color of the applet should be yellow. The four components to be included are
1. a Label object that has the text “Please enter your name;”
2. a Textfield object of size 20;
3. a Button object with the text “GREET;” and
4. a Label object with the text “Result goes here.” This label will change to “Hello,” followed by the entered name.
For this lab, you will need the actionPerformed method to provide event handling for the button.
The getText() method will be needed to get the string from the TextField.
The setText() method will be needed to change the text of the second Label.
Test your applet by entering your full name and confirming that the result label has changed.
Greeting Points Description
Standard header included 1 Must contain program’s name, student name, and description of the program
Program compiles 1 Program does not have any error
Program executes 1 Program runs without any error
Created instructions label and Name input textbox field 4 The Instructions label and Name input textbox show on the applet and users can enter a value in the textbox
Created Result label with given test 3 The Result label shows on the applet
Created Greet button with the appropriate handler 5 The Greet button shows on the applet and has an actionListener
Applet displays the correct output 5 Applet appears and displays Hello, full name when Greet button is clicked
Subtotal 20
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at [email protected].
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at [email protected] and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at [email protected].
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.