Big Java Late Objects
Big Java Late Objects
2nd Edition
ISBN: 9781119330455
Author: Horstmann
Publisher: WILEY
Question
Book Icon
Chapter 9, Problem 10PP
Program Plan Intro

Amplifier

Program plan:

Filename: “Amplifier.java”

This program file is used to define a class “Amplifier”. In the code,

  • Define a class “Amplifier”.
    • Declare the class mmbers.
    • Define the method “getGain()”.
      • Return “1”.
    • Define the method “getDescription()”.
      • Return the string.

Filename: “InvertingAmplifier.java”

This program file is used to define a class “InvertingAmplifier” as extending from “Amplifier”. In the code,

  • Define a class “InvertingAmplifier”.
    • Declare class members.
    • Define the constructor “InvertingAmplifier()”.
      • Set the values of class members.
    • Define the method “getGain()”.
      • Return the calculated value.
    • Define the method “getDescription()”.
      • Return the values.

Filename: “NoninvertingAmplifier.java”

This program file is used to define a class “NoninvertingAmplifier” as extending from “Amplifier”. In the code,

  • Define a class “NoninvertingAmplifier”.
    • Declare class members.
    • Define the constructor “NoninvertingAmplifier ()”.
      • Set the values of class members.
    • Define the method “getGain()”.
      • Return the calculated value.
    • Define the method “getDescription()”.
      • Return the values.

Filename: “VdivAmplifier.java”

This program file is used to define a class “VdivAmplifier”. In the code,

  • Define a class “VdivAmplifier” as extending from “Amplifier”.
    • Declare class members.
    • Define the constructor “VdivAmplifier ()”.
      • Set the values of class members.
    • Define the method “getGain()”.
      • Return the calculated value.
    • Define the method “getDescription()”.
      • Return the values.

Filename: “AmplifierDemo.java”

This program file is used to define a class “AmplifierDemo” to test the class “Clock”. In the code,

  • Define a class “AmplifierDemo”.
    • Define a method “main()”.
    • Declare the required variables.
    • Creates the array list “amplifiers”.
    • Fill the array list using method “add()”.
    • Iterate a “for” loop.
      • Print the values.

Blurred answer

Chapter 9 Solutions

Big Java Late Objects

Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education