Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Well, you ve got the start for your BeginnerHams.ca website dedicated to beginner amateur radio. You have a way to represent a transceiver ( Radio
Well, youve got the start for your BeginnerHams.ca website dedicated to beginner amateur
radio. You have a way to represent a transceiver Radio and also an antenna Antenna two
essential parts of a radio system. However, there is more to it than that.
You need to include power supply information for radios larger radios, in particular, require a
desktop power supply to run, and even handheld portable radios require a power supply to
charge their battery packs. A power supply must have sufficient amperage to be able to drive
the radio a power supply with insufficient amperage will, at best, shut itself off if pushed past
its limits and at worst, its capacitors might explode and it might catch fire if it doesnt have
automatic protection, so its imperative that we never sell a Package, ie a radio kit that
includes a power supply that cant safely serve the needs of the radio!
You are going to expand on your work from Assignment The solution set for AS will be
available, and you are free to use the classes in that solution Radio Antenna, RadioToolbox,
and any Driver elements as part of this assignment without fear of plagiarism or you can use
your own, its your choice.
So you are going to be designing two new classes a PowerSupply class, representing a power
supply, and a Package class, representing a an amateur radio package with one or more radios,
a power supply, and one or more antennas
What are you learning?
Programmers often have to revise and expand the capabilities of their code as more features
are added to a given piece of software. Look at the evolution of Microsoft Windows from v
to v or MacOS version and earlier vs MacOS X or early Ubuntu Linux vs modern
versions. Theres been a great deal of upgrade and change, but elements of the core
programming are still very visible, even today.
You will be revising your Radio class to allow it to work with the PowerSupply class, and you will
be learning how to aggregate the three equipment classes into a Package.
New Class: PowerSupply
This class will represent a power supply unit with interesting characteristics:
Physical Type: S switching very light or T transformerbased, very heavy
Voltage Type: F fixed vDC or V variable voltage, vDC
Current Handling: two numbers, separated by a slash, one indicating the maximum
temporary current available in amperes amps and another representing the
duty cycle operating current ie
Meter Configuration: the type of meters found on the power supply:
N no meters
V voltage meter only
C current meter only
B both voltage and current meters
You must design and implement the PowerSupply class in your project. Create the constructor
and the dunder stringifier the thing that returns the string representation to represent a
Mount. This time, we wont make you create mutators, since we will not be using them. You
will still need to make accessors for the stated attributes. For the purposes of the accessors,
it will return the codes that were found in the files, as shown above but your str should
translate those codes into plaintext explanations. A few static dictionaries will help with
this.
Upgrades
Remember that code you wrote in your Driver that took a frequency range and computed the
midpoint band metre value? That should now be moved into the RadioToolbox, as a function
called computemidpointfromfrequency.
You need to upgrade the Radio class to accept new information. Radios must now additionally
have power supply amperage requirements the same type of information that a PowerSupply
has. You cannot connect a Radio to a PowerSupply if the PowerSupply doesnt have enough
amperage to ensure safe operation and for our purposes, the amperage requirement of the
Radio should be no more than of the duty cycle continuous amperage rating of
the power supply in order to be considered safe This isnt the job of the Radio to deal with
youll see, later, how that happens. The Radio just stores the amperage required for operation
and already stores how it gets its power Add accessors to Radio to get the new instance
variable. As we mentioned for the PowerSupply, you can skip the mutators for this in the
Radio, too. Check the radios.txt file for details. Hint: does the rating have anything to do
with the Radio object, or will you put that somewhere else?
Youve now probably noticed that youre going to have the same information in PowerSupply as
in Radio amperage values and these will be used in determining compatibility.
There are no changes to Antenna at this time.
Data Files
You will be given a new set of data files for this assignment do NOT use the ones from AS
they wont work. Additionally, there is a new file, powersupplies.txt that will describe the
power supplies systems:
physicaltype, voltagetype, currenthandling, mete
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started