Java Practice It | Exercise 9.11: FilteredAccount | implementing, inheritance, instance method смотреть онлайн
More practice its:
https://youtube.com/playlist?list=PLZPy7sbFuWVgDWN1GImGRm_2Lh6IydaEH
Problem:
https://practiceit.cs.washington.edu/problem/view/bjp5/chapter9/e11-FilteredAccount
Question:
A cash processing company has a class called Account used to process transactions:
Method/Constructor Description
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:
Method/Constructor Description
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:
Method/Constructor Description
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.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Java Practice It | Exercise 9.11: FilteredAccount | implementing, inheritance, instance method» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.