Great Deal! Get Instant \$10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

# lab assigments LAB #3! SEE YO U R G RO U P VERSIO N . READ CAREFU LLY W H AT IS W AN TED !. Be sure each num bered task is done. N ote due date from class, , Em ail subject G #-lab3 V x x y V y 1. int...

lab assigments
LAB #3! SEE YO
U
R G
RO
U
P VERSIO
N
CAREFU
LLY W
H
AT IS W
AN
TED
!. Be sure each
num
ote due date from
class, , Em
ail subject G
#-lab3
V
x
x
y V
y
1.
int m
ain,
etc.
2.
Be sure the program
has these four sections in order, An input part has to be added since the user w
ill be asked to input valuesto a
variable, nam
ely, tim
e.
Declarationssection(num
ericalvariable and string variable nam
es,U
sing good variable nam
es, N
O
T ABBREVIATIO
N
S , Inputsection
(prom
pts user to input values), Calculations(form
ulas) sections and
O
utput (coutstatem
ents)section.
3. The program
, explains to the user(W
ITH cout)w
hat it is all about, w
hat they w
ill give and w
hat they w
ill get, and then GETS
IN
PU
T(W
ITH cin)FRO
M
THE U
SER for the tim
e,t. Get the follow
ing six values of tim
e ,t, from
the user, one at a tim
e, so you have to run
this program
6 tim
es and copy 6 outputs at the end
U
SE tim
e = 3 3.4, 5.4, 9.4 , 14, 34, 104 seconds
Continued next slide
com
putes the horizonal position from
hom
e
plate, x, and vertical drop, y, and falling velocity V
y , of a
aseball in flight hit in a straight line at a horizontal velocity,
V
x =84 ft/sec to second base. The physics of the flight, horizontal m
otion gives
ise to the follow
ing equations: horizonal position: x = V
x t vertical dropping
positon
is y=
1/2gt 2, vertical dropping velocity V
y = -gt; w
here gravitational
constant is g=32 ft/s
2
lab 3 continued:
4.U
N
ITS in Declaration section: put in a string variable . Eg.
unit_velocity
5. O
U
TPU
TS: Program
clearly explains each of the follow
ing outputs, the throw
ing velocity Vx used, the tim
e,t,the
distance
or horizontal position, x, and theoretical vertical drop,y
and the falling velocity Vy. For each tim
e and output is copied to
com
m
ent field at the end, six tim
es.
6. VERY IM
PO
RTAN
T FO
R YO
U
and its im
portant lines, FILL IN

com
m
n creation
7.After the first output, do a hand calculation to check com
puter CO
M
PU
TATIO
N
logic, SHO
W
THE RESU
LTS IN
THE FIN
AL /*
8. ABSTRACT in /* fill in the com
m
ent paragraph*/ After you fully understand the program
, be sure it explains to you the
program
m
er w
hat you did and contains the form
ulas U
SED.
N
O
TE: as all abstracts show
form
ulas used in alge
aic form

lab assigments
LAB 4 TEM
PLATE
GEN
ERAL O
VERALL PRO
GRAM
STRU
CTU
RE-O
RGAN
IZATIO
N
1. Abstract
for the program
m
er, w
hat this is all about, form
ulas used in alge
aic form
2.Includes section
N
ecessary li
aries to run program
2. m
ain()
int m
ain() { starts solution line com
m
ents
that clarify are used liberally below
3.Declaration section. Typesof variables are defined, som
etim
es initialized.
descriptive nam
es for num
erical variables and string variables useful for units
4. Inputsection if needed
uses coutcom
m
ands to explain program
for user, w
hat it is all about, w
hat they need to enter and w
hat they w
ill get.
uses cin
com
m
and to get values from
use
5. calculations section
form
ulas that do the calculations need to solve the problem
s
6.output section
uses cout
for values solved along w
ith descriptive inform
ation to understand w
hat is com
ing out of the program
The charge hits the negative plate at a velocity v,falling in a tim
e t. H
itting w
ith kinectic
energy, K
.
Equations governing the behavior are
F=Q
E a =F/m
y=1/2at 2 v=at K
=1/2 m
v
2
The charge Q
= 4.1 X 10
-6C
oulom
s and the electric field E
is 6.84 X 10
7 N
ew
tons/C
oulom
. The
m
ass m
of the charged particle is 1.4 x 10
-6kg, considered a constantin this case, define in the
co
ect place in the program
(before m
ain), and the separation of the plates Y
= 0.54 m
eters.
1. A
B
STR
A
C
T:
PR
O
G
R
AM
M
ER
/*)w
e ,date and LAB
#4 at start!
2. C
O
M
M
EN
TS:
B
e sure there are creative
com
m
ents to yourself. A
ll over.
3. U
SER
PR
O
M
TS: descriptive output using cout, like cout
). U
ser needs to know
w
hat it is all
hat to give and w
hat they w
ill get! In IN
P
U
T section
C
ontinued next slide +- +
LA
B
#4 carefully U
SE G
U
ID
E B
ELO
W
requirem
ents A
N
D
use last tem
plate m
odel structure.. N
ote due
date from
class, Em
ail subject G
#-lab4.Feel Free to H
elp others but do not give your code!
GIVEN
Electrodynam
ic situation. Tw
o charged plates on the left,
separated by a distance Y
(m
eters), create an electric field, E,
w
hich is m
easured as the force per unit charge
(N
ew
tons/Coulom
). A sm
all positive charged particle, Q
,
(Coulom
s) is placed at the top plate and experiences a force, F
(N
ew
tons), w
hich creates an acceleration, a
(m
s 2), tow
ards
negative, it travels the full distance Y.
4. D
E
S
C
R
IP
TIV
E
N
A
M
E
S
for variables not physics a
eviations as above.
Exam
ple, double Force, Voltage, etc
in D
EC
LAR
ATIO
N
SEC
TIO
N
5. U
SER
IN
PU
T:
A
FTE
R
E
XP
LA
IN
IN
G
TH
E
A
LL, E
N
TE
R
S
TH
E
C
u
ent values of
cin
and input in scientific notation (e) and
form
ulas calculate the rest like. IN
IN
P
U
T S
E
C
TIO
N
-C
A
LC
U
LATIO
N
S
FO
LLO
W
!
6.FIR
ST SO
LU
TIO
N
solves forthe force, F, and acceleration, a.
7.
N
EXT C
ALC
U
LATIO
N
: From
the third equation, y=1/2at 2 you need the tim
e, t,
setup solution as an equation A
nd have the com
puter solve it FO
R
t=
8.
N
EXT C
ALC
U
LATIO
N
:Then solutions for v
since t is know
n and then K
9. U
S
E
e scientific notation for all.
10.. U
se string variables to hold all the units and output them
w
ith calculated values.
11. B
e sure to use follow
ing m
ath functions: pow
() , sqrt() eg. pow
(x,3) sam
e as
x
3
12. O
utput w
ith description and scientific
setw
()
and seprecison(4)
13.. H
and C
alculation on the lab exercise to check com
14. R
E-R
ALL IN
STR
U
C
TIO
N
S B
EFO
R
E H
A
N
D
IN
G
IN
TO
B
E SU
R
E A
LL D
O
N
E.
LAB #5: The M
olecular w
eight of organic com
pounds N
ote due date Em
ail subject G
#-lab5
ie
M
olecular w
eight is the com
ining
of the atom
ic w
eights of the individual elem
ents in a m
olecular! The program

solves it for four m
olecules, given the atom
num
ers in the m
olecule.
The organic com
pounds are com
posed of atom
s of oxygen, ca
on, nitrogen, sulfur and hydrogen w
hose atom
ic
w
eights (average of isotopes) are O
xygen(O
XXXXXXXXXX; Ca
on(C XXXXXXXXXX; N
itrogen(N
XXXXXXXXXX; Sulfur(S XXXXXXXXXX
H
ydrogen(H XXXXXXXXXXChlorine (Cl) find on the w
eb in am
u units (atom
ic m
ass units-
originally based on w
eights
elative to hydrogen now
they use ca
on. And are constant for this program
..
1. Be sure use
2.. ABSTRACT
O
N
TH
E TO
P O
F TH
E PRO
G
RAM
DETAILS to you the program
m
e
3. U
SER: output w
hat this program
w
ill do and w
hat they have to
give and w
hat they w
ill get!.
4. Program
inputs : asks user for the nam
e of the com
pound (use a string variable) and how
m
any of each of the
above atom
s are in it, use 0 if none. All on one line!!! See exam
ple below
. Atom
num
ers com
e from
the chem
ical
form
ula found in a table at the end of this exercise. E.g.H
2 O
m
eans 2 H
Answered 2 days After Mar 05, 2022

## Solution

Vaibhav answered on Mar 08 2022
SOLUTION.PDF

More Questions Â»

### Submit New Assignment

Copy and Paste Your Assignment Here