Write a java program that represents the amplifier as a


Problem

Part (a) of the figure below shows a symbolic representation of an electric circuit called an amplifier. The input to the amplifier is the voltage vi and the output is the voltage vo. The output of an amplifier is proportional to the input. The constant of proportionality is called the "gain" of the amplifier. Parts (b), (c), and (d) show schematics of three specific types of amplifier: the inverting amplifier, non inverting amplifier, and voltage divider amplifier. Each of these three amplifiers consists of two resistors and an op amp. The value of the gain of each amplifier depends on the values of its resistances. In particular, the gain, g, of the inverting amplifier is given by g = -R2/R1. Similarly the gains of the non inverting amplifier and voltage divider amplifier are given byg = 1 + (R2/R1) and g = R / (R1 + R2) respectively.

651_Amplifier.jpg

Write a Java program that represents the amplifier as a superclass and represents the inverting, noninverting, and voltage divider amplifiers as subclasses. Give the subclass two methods, get Gain and a get Description method that returns a string identifying the amplifier. Each subclass should have a constructor with two arguments, the resistances of the amplifier. The subclasses need to override the get Gain and get Description methods of the superclass. Supply a class that demonstrates that the subclasses all work properly for sample values of the resistances.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a java program that represents the amplifier as a
Reference No:- TGS02634206

Expected delivery within 24 Hours