CPSC 240-1 Midterm Concepts Test #1 solved

$35.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

Description
Imagine you’re in a science lab where some other people are running experiments using
electricity in different circuit configurations.
You are there because the chief administrator of the lab has asked for software that will
compute the electric force between two charged particles
This lab encourages open notes because the chief does not want you to use the wrong
formula accidentally. Online you lookup the following equation.
F = k x q1 x q2 / r2
where the symbols have the following meanings
F is the electromagnetic force acting of one particle on the other particle measured in Neutons
q1 is the electric charge on particle #1 measured in Coulombs
q2 is the electric charge on particle #2 measured in Coulombs
r is the distance between the two particles measured in meters
k is a fixed constant with value 8.99 x 109
(units omitted)
Other people in the lab room will ask you to compute the F value accurately.
System diagra
For this programming test there is no gdb. The next midterm program test will be loaded with
gdb.
You may choose to make the kepler file in either C++ or C language.
kepler.ccc
copernicus.asm
r.sh
Sample dialog.
Welcome to High Voltage System Programming brought to you by Heinrick Hertz
This program will help you find the force
Please enter the electrical charge on particle 1: 2.8
Please enter the electrical charge on particle 2: 3.6
Please enter the distance between the particles in meters: 1259.8
Please enter your last name: Copernicus II
Please enter your title: Senior researcher
Thank you. Your force is 57097.48982 Neutons.
Goodbye Senior researcher. Have a nice research party.
Zero will be returned to the operating system.
Color codes
Yellow: Input from the keyboard
Blue: Output from the driver
Green: Output from the assembly module
Replace Mr Hertz’s name with your own name.
Coulomb’s law gives you the equation to use:
F = k x q1 x q2 / r2
Show a lot of digits of precision in your numeric output.
q1 and q2 are electrical charge quantities. They can be positive or negative.
K is the constant 8.99 x 109
, which is equal to 0x4200BEC41C000000. You use the form of
the number that works best for you.
When you’re done.
Go back and place the ID comments in the three files
Place comments, one per block, in the asm file.
Make sure it runs in a Linux environment.
Professional style documentation is not required for an academic test.
Make sure there are no pdf files involved.
Send me the set of 3 files as attachments to an email sent to holliday@fullerton.edu
Last minute for submission: 4:59pm
You’re done.