Objects First with Java Transaction List, error checking & aggregation

Slides:



Advertisements
Similar presentations
Class Relationships Part 1: Composition and Association CS 21a: Introduction to Computing I First Semester,
Advertisements

What’s New in GE Part 1 (AR, AP, PO, Job Cost Presented by: Derek Kratz.
Project Part 3 Putting the pieces together. Modifications on previous parts In part 1 you created a : BankAccount class, with several fields. Increment.
Gateway Program Go to along the left side, in the third section, click on The Gateway.
Checking Account Register
Lab 10: Bank Account II Transaction List, error checking & aggregation.
Big Java by Cay Horstmann Copyright © 2009 by John Wiley & Sons. All rights reserved. Chapter Three - Implementing Classes.
Understanding class definitions Looking inside classes 3.0.
Grouping Objects 1 Introduction to Collections.
Understanding class definitions – Part II –. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling Main.
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
More about inheritance Exploring polymorphism 3.0.
McGraw-Hill/Irwin Introduction to QuickBooks Pro, 2004 © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved. Chapter 4 Bank Reconciliation.
Inheritance One of the biggest advantages of object-oriented design is that of inheritance. A class may be derived from another class, the base class.
Writing Methods Using if, loops, and variables to implement algorithms Copyright © 2012 Pearson Education, Inc.
Glenn David Blank Computer Science & Engineering Department Lehigh University, Bethlehem, PA, USA With support from the National Science Foundation (Grants.
FINANCIAL AWARENESS Checking & Savings Accounts Lesson 4: Managing a Savings Account – Part 2 Instructor PowerPoint Copyright © 2009, Thinking Media, a.
Using Assets with Dashboards A Guide. About this Guide This guide shows how to create, export, and load a dashboard that requires an asset This guide.
1-4 Adding Integers Course 3 Warm Up Warm Up Problem of the Day Problem of the Day Lesson Presentation Lesson Presentation.
Creating and running a Java program. Eclipse Interactive Development Environment (IDE)  Eclipse is an Interactive Development Environment (IDE) for Java.
Lecture 101 CS110 Lecture 10 Thursday, February Announcements –hw4 due tonight –Exam next Tuesday (sample posted) Agenda –questions –what’s on.
Lab 7: Tree & Forest. Drawing a Forest Created by Emily Hill & Jerry Alan Fails.
1 CSC/ECE 517 Fall 2010 Lec. 3 Overview of Eclipse Lectures Lecture 2 “Lecture 0” Lecture 3 1.Overview 2.Installing and Running 3.Building and Running.
Understanding class definitions
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
CSCI 6962: Server-side Design and Programming JSF DataTables and Shopping Carts.
Workflow Demo: Upload, Review and Approve. Cpay : Users & Functionalities Customer AdministratorCustomer AuthorizerUploaderReviewerApproverInterceptor.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class A note on methodsA note on methods ObjectsObjects Creating your.
MashupAds Lesson 1: Making a One-Way Widget Example: AT&T Store Locator Widget.
Outline Anatomy of a Class Encapsulation Anatomy of a Method Graphical Objects Graphical User Interfaces Buttons and Text Fields Copyright © 2012 Pearson.
Bank Reconciliation Chapter 4. PAGE REF #CHAPTER 4: Bank Reconciliation SLIDE # 2 Objectives Reconcile your checking Create bank reconciliation reports.
More About Objects and Methods
Module Road Map Refactoring Why Refactoring? Examples
CS3010 Beacon Module 3 Contacts
Recitation #3 Comp Semion Piskarev.
Requisitions from Stock
suggested reading: Java Ch. 6
Click here to see your question
Objects First with Java
Understanding class definitions
Objects First with Java A Practical Introduction using BlueJ
Page-builder: fundraising
Chapter Three - Implementing Classes
Chapter 10 Defining Classes. Chapter 10 Defining Classes.
Some Tips for Using Eclipse
Understanding class definitions
Check Writing All About Checks.
Overview of Eclipse Lectures
NextGen Trustee Class Reports
CSC 113: Computer programming II
More about inheritance
ITunes Lab Copyright © 2012 Pearson Education, Inc.
COS 260 DAY 18 Tony Gauvin.
Qbprosolution.com. QuickBooks Gateway ServicesQuickBooks Gateway Services- Record Merchant Service Deposits helps to discover the mode of a hit-transaction.
Anatomy of a Method.
תירגול 9 אובייקטים.
CS2011 Introduction to Programming I Objects and Classes
Objects First with Java A Practical Introduction using BlueJ
Understanding class definitions
Creating cooperating objects
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Objects First with Java A Practical Introduction using BlueJ
Comp1202: Inheritance I Super and Sub-classes.
Bell Ringer: Answer these questions:
1-4 Adding Integers Warm Up Problem of the Day Lesson Presentation
Improving structure with inheritance
Test Manager Plugin for Trac Part 2/3 Roberto Longobardi
Requisitions RX Document
Introduction to Computer Science and Object-Oriented Programming
Presentation transcript:

Objects First with Java Transaction List, error checking & aggregation Project Part 1 Transaction List, error checking & aggregation Replace this with your course title and your name/contact details. © David J. Barnes and Michael Kölling

Last time we created a BankAccount class: (This was done) Objects First with Java Last time we created a BankAccount class: (This was done) Fields to store: Current balance Account number Customer name Customer address * Think about what types these should be. For example, should the account number actually be stored as a number? What about leading 0’s? Write a constructor that takes the customer’s name, address, and account number, and initializes the balance to 0. Write getter and setter methods for the name and address fields. Get method for the Account number. Write a deposit and a debit method.The method signatures are similar in that there is no return value and one parameter. Created by Emily Hill & Jerry Alan Fails © David J. Barnes and Michael Kölling

And we tested BankAccount in main: Objects First with Java And we tested BankAccount in main: Write a print method that prints out the account information, including the current balance. Make sure to use proper formatting so both dollars and cents are displayed correctly. This method should take no parameters and return nothing. Write a main method that creates a new, empty BankAccount stored in local variable myBankAccount. Deposit $5.00 into your BankAccount & print the balance Debit $1.50 into your BankAccount & print the balance Before submitting you were told to be sure your BankAccount has the following methods: 1 constructor only (not 2) that takes 3 parameters getCustomerName, getCustomerAddress, getAccountNumber setCustomerName, setCustomerAddress deposit, debit, print, main Created by Emily Hill & Jerry Alan Fails © David J. Barnes and Michael Kölling

For the Part 1 of the Project Objects First with Java For the Part 1 of the Project Update debit to check the balance before deducting Update debit & deposit to only work with positive values Create new deposit and debit methods that also take a String description as a parameter Add a Transaction class too keep track of all deposits and debits (See next page for information on the Transaction class and the enumerated type that you need to use) Created by Emily Hill & Jerry Alan Fails © David J. Barnes and Michael Kölling

Adding a Transaction class Objects First with Java Adding a Transaction class Create a Transaction class & enumerated type: * You can use Eclipse’s source code generation to create getters and setters for the fields © David J. Barnes and Michael Kölling

Submitting your project Objects First with Java Submitting your project Be sure that you include a Transaction in your BankAccount, and that the program run using the main method. When you think you are done: Save your project with the name Part1_netID, by exporting it, and upload it to Canvas. © David J. Barnes and Michael Kölling