You must disable your AdBlock software in your browser to use this site.
Disable ad blocking for practiceit.cs.washington.edu, then refresh this page to continue.
It is easy to disable AdBlock for just one site while leaving it enabled for other sites.
Just click the "stop sign" icon in the top-right of your browser, then un-check the "Enabled for this site" checkbox.
Thank you for your understanding and helping us to keep Practice-It free of cost for all students to use.
If you are still seeing this message after disabling your ad blocker, try clearing your browser history and refreshing the page.
Also make sure you don't have any other ad-blocking software running outside of your browser, such as a HOSTS file or proxy.
If you are certain that you are not running AdBlock or any other ad-blocking software, but you are still seeing this message,
please Contact Us.
A cash processing company has a class called Account used to process transactions:
public Account(Client c)
constructs an account using client information
public boolean process(Transaction t)
processes the next transaction, returning true if transaction was approved, false otherwise
Account objects interact with Transaction objects, which have many methods including:
public int value()
returns the value of this transaction in pennies (could be negative, positive or zero)
The company wishes to create a slight modification to the Account class that filters out zero-valued transactions. Design a new class called FilteredAccount whose instances can be used in place of an Account object but which include the extra behavior of not processing transactions with a value of 0. More specifically, the new class should indicate that a zero-valued transaction was approved but shouldn't call the process method in the Account class to process it. Your class should have a single constructor that accepts a parameter of type Client, and it should include the following method:
public double percentFiltered()
returns the percent of transactions filtered out (between 0.0 and 100.0); returns 0.0 if no transactions submitted
Assume that all transactions enter the system by a call on the process method described above.