Answered step by step
Verified Expert Solution
Link Copied!

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, i.e. 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 1. The solution set for AS1 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 v3.1
to v10, or MacOS version 9(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 (transformer-based, very heavy)
Voltage Type: F (fixed 13.8vDC) or V (variable voltage, 320vDC)
Current Handling: two numbers, separated by a slash, one indicating the maximum
temporary current available in amperes (amps), and another representing the 100%
duty cycle operating current (i.e.33/30)
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 plain-text 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 compute_midpoint_from_frequency.
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 80% of the 100% 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 80% 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 AS1,
they wont work. Additionally, there is a new file, powersupplies.txt, that will describe the
power supplies systems:
physical_type, voltage_type, current_handling, mete

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

Solve the following equation. 4x + 1 - x - 1 = 2

Answered: 1 week ago