GE1103 Engineering Design CP-1 Cornerstone 1 CP-1 AMINO ACIDS, POWER OF 2, INTEGER MATH LAB OBJECTIVES In this lab, you will: • Prepare a flowchart to plan your approach to solving the given...

1 answer below »
part 1: SF-1 /part 2: CP-1you have to get sf-1 done first then cp-1 done after as they are both involved in creating a code on C++ and CLion softwareyou need to login on https://canvas.northeastern.edu/ login Almeida.papassword: Cipriano124$please take the look at the work to see if it can be done thanks


GE1103 Engineering Design CP-1 Cornerstone 1 CP-1 AMINO ACIDS, POWER OF 2, INTEGER MATH LAB OBJECTIVES In this lab, you will: • Prepare a flowchart to plan your approach to solving the given problem(s). • Calculate the molecular weight of an amino acid. • Write a C++ program to calculate the power of 2. • Write a program to understand the limitations of integer mathematics. • Create a memo addressed to the Professor describing the results for problem #1 (the total weights and average weight per atom of the requested amino acids) AND Problems 2 and 3, in order. Each problem describes what is required to be included in the lab package (on paper). The screen shots should be referenced in the text but included as appendices to your memo. • Submit: All cpp files, and a pdf with your: memo with screenshots and the flow chart in it.  Pre-Lab Prepare a flowchart for Problem #1. This is to be word-processed, flowchart with symbols and correct shapes. Be sure to include all steps for the user input, calculations and the console output. Submit with Lab #1. 1. Problem #1 As you may have learned in Chemistry, the amino acids in proteins are composed of atoms of oxygen (O), carbon (C), nitrogen (N), sulfur (S) and hydrogen (H), as shown in the table below. Table 1. Amino acid “recipes”. CP-1 Cornerstone 2 The molecular weights of an atom of the individual elements are as follows: The molecular weight of each acid can be computed by multiplying the number of atoms of each substance times the weight of each atom. Example: Alanine The weight of a molecule of Alanine is: (2)*(15.9994) + (3)*(12.011) + (1)*(14.00674) + (0)*(32.066) + (7)*(1.00794) = 89.094 u. The average atomic weight of Alanine is 89.094/(2+3+1+0+7) = 6.853 u. Task for Problem #1: Write a C++ program that asks the user (via the keyboard) to enter the number of atoms of each of the elements for an amino acid. The program should then compute the molecular weight for this amino acid and the average weight per atom and print out these values (use data type ‘double’). The printout values should be in fixed format, using 3 decimal precision. You should then use the program to compute the molecular weight and average weight per atom for the following acids and include the results in your memo: 1) Cysteine 2) Glycine 3) Methionine Include screenshots of the console inputs & outputs (I/O) for each of the three amino acid calculations in your submission package. (unit is u, which is ‘atomic mass unit’) Table 2. Molecular weights by atom type. CP-1 Cornerstone 3 2. Problem #2 Write a C++ program to display the powers of 2. Display in columns and rows up to 28.  Use a ‘for’ loop in the program to count from 0 to 8.  Use the pow(x,y) function.  You will need the math library: #include.  pow(x,y) uses doubles as inputs and returns a double as output. Include a screenshot of the console output for the powers of two in your submission package. 3. Problem #3 Identify each error & fix in the following C++ program: #include int main () { int X, Y; cout< “enter="" x:="" ”;="" cin="">> X; cout< “enter="" y:="" ”;="" cin="">> Y; Z = X/Y; cout< “x/y="“">< z;="">< “end of program.” endl; return 0; enter the code and make the program run correctly. test case: the correct results for x=16.5 and y=2.2 include a screenshot of the console output for the test case shown above in your submission package. your output may look like: enter x: 16.5 enter y: 2.2 x/y=7.5 end of program. press any key to continue cp-1 cornerstone 4 rubric: item comments points flowchart done on computer (draw.io or other), correct shapes and logical progression 15 organization: entire report should be in the proper sequence. ( memo: problems 1-3 in order and labeled screen shots) 10 memo memo to prof/ta with molecular weights and average atomic weights for 3 amino acids. summarize results from problems 2 and 3 and upload your file as: lastname_cp1_memo.pdf 10 problem #1 code: • program written as requested by the assignment. • commented with clear comments that help the user understand the logic of this code • first comments contain student’s name and date. • formatted appropriately (indentations/parentheses) 10 canvas upload of program: lastname_cp1_1.cpp 5 screen capture of the console window – 3 amino acids 10 problem #2 code: • program written as requested by the assignment. • commented with clear comments that help the user understand the logic of this code • first comments contain student’s name and date. • formatted appropriately (indentations/parentheses) 10 canvas upload of program: lastname_cp1_2.cpp 5 screen capture of the console window 5 problem #3 code: • program written as requested by the assignment. • commented with clear comments that help the user understand the logic of this code • first comments contain student’s name and date. • formatted appropriately (indentations/parentheses) 10 canvas upload of program: lastname_cp1_3.cpp 5 screen capture of the console window 5 total 100 cornerstone sf-1 sf-1 – pedestrian crossing signal create a board that makes car traffic light (red, yellow and green leds) and pedestrian light (rgb led) along with a push button, to request access to cross the road. the board must behave as follows: 1. start with the programming of a traffic light (tl): a. general rules: i. green lights are on for 5 seconds ii. yellow on for 2.5 sec. iii. red on for 7.5 seconds b. ge this to work first before moving on 2. modify your code such that, as soon as the car tl turns red, a pedestrian light (pl) cycle begins: a. general rules: i. pl turns white (3 sec cross time) ii. then turns orange1 and blinks (for 2 sec total, 0.25 delay between each blink) iii. then turns solid orange and stays orange (for 2.5s). b. get this to work before you move on 3. modify your code to allow access to the road add push button to your circuit. a. general rules: i. push button will be ignored if the tl is yellow or red. ii. when the button is pushed (low), the car traffic light should turn yellow (for 2.5 sec), then red (7.5 secs). iii. as soon as the car tl turns red, the pedestrian light turns white (3 sec cross time), then turns orange and blinks (for 2 sec, 0.25 delay), then turns solid orange and stays orange until the next red light, at which point the pl’s cycle resets. iv. repeat. tips for success • use the flat jump wires when possible to create a cleaner design • you will need to use the codes provided to you from sparkfun to create new code to run this program. all the attributes discussed above must function in one code file. copy and pasting from the sparkfun code is acceptable for this assignment. • use constant variables to store pin numbers, push button state, etc. • your name and email address should be in the first line. • your code should have enough comments to help me understand: - what each line of your code does, and how the hardware is connected • prepare a final wire diagram of the components used for this assignment using autodesk circuit/cad program! 1 the standard pedestrian signals specified by the us department of transportation federal highway administration are a white walking person and a "portland orange" stop hand (not red). these colors were chosen so as to be conspicuous against a backdrop of red, green and yellow lights at intersections and to avoid giving drivers false cues of a green light (a good example of a resilient design). cornerstone sf-1 submission: • please “end="" of="" program.”="" endl;="" return="" 0;="" enter="" the="" code="" and="" make="" the="" program="" run="" correctly.="" test="" case:="" the="" correct="" results="" for="" x="16.5" and="" y="2.2" include="" a="" screenshot="" of="" the="" console="" output="" for="" the="" test="" case="" shown="" above="" in="" your="" submission="" package.="" your="" output="" may="" look="" like:="" enter="" x:="" 16.5="" enter="" y:="" 2.2="" x/y="7.5" end="" of="" program.="" press="" any="" key="" to="" continue="" cp-1="" cornerstone="" 4="" rubric:="" item="" comments="" points="" flowchart="" done="" on="" computer="" (draw.io="" or="" other),="" correct="" shapes="" and="" logical="" progression="" 15="" organization:="" entire="" report="" should="" be="" in="" the="" proper="" sequence.="" (="" memo:="" problems="" 1-3="" in="" order="" and="" labeled="" screen="" shots)="" 10="" memo="" memo="" to="" prof/ta="" with="" molecular="" weights="" and="" average="" atomic="" weights="" for="" 3="" amino="" acids.="" summarize="" results="" from="" problems="" 2="" and="" 3="" and="" upload="" your="" file="" as:="" lastname_cp1_memo.pdf="" 10="" problem="" #1="" code:="" •="" program="" written="" as="" requested="" by="" the="" assignment.="" •="" commented="" with="" clear="" comments="" that="" help="" the="" user="" understand="" the="" logic="" of="" this="" code="" •="" first="" comments="" contain="" student’s="" name="" and="" date.="" •="" formatted="" appropriately="" (indentations/parentheses)="" 10="" canvas="" upload="" of="" program:="" lastname_cp1_1.cpp="" 5="" screen="" capture="" of="" the="" console="" window="" –="" 3="" amino="" acids="" 10="" problem="" #2="" code:="" •="" program="" written="" as="" requested="" by="" the="" assignment.="" •="" commented="" with="" clear="" comments="" that="" help="" the="" user="" understand="" the="" logic="" of="" this="" code="" •="" first="" comments="" contain="" student’s="" name="" and="" date.="" •="" formatted="" appropriately="" (indentations/parentheses)="" 10="" canvas="" upload="" of="" program:="" lastname_cp1_2.cpp="" 5="" screen="" capture="" of="" the="" console="" window="" 5="" problem="" #3="" code:="" •="" program="" written="" as="" requested="" by="" the="" assignment.="" •="" commented="" with="" clear="" comments="" that="" help="" the="" user="" understand="" the="" logic="" of="" this="" code="" •="" first="" comments="" contain="" student’s="" name="" and="" date.="" •="" formatted="" appropriately="" (indentations/parentheses)="" 10="" canvas="" upload="" of="" program:="" lastname_cp1_3.cpp="" 5="" screen="" capture="" of="" the="" console="" window="" 5="" total="" 100="" cornerstone="" sf-1="" sf-1="" –="" pedestrian="" crossing="" signal="" create="" a="" board="" that="" makes="" car="" traffic="" light="" (red,="" yellow="" and="" green="" leds)="" and="" pedestrian="" light="" (rgb="" led)="" along="" with="" a="" push="" button,="" to="" request="" access="" to="" cross="" the="" road.="" the="" board="" must="" behave="" as="" follows:="" 1.="" start="" with="" the="" programming="" of="" a="" traffic="" light="" (tl):="" a.="" general="" rules:="" i.="" green="" lights="" are="" on="" for="" 5="" seconds="" ii.="" yellow="" on="" for="" 2.5="" sec.="" iii.="" red="" on="" for="" 7.5="" seconds="" b.="" ge="" this="" to="" work="" first="" before="" moving="" on="" 2.="" modify="" your="" code="" such="" that,="" as="" soon="" as="" the="" car="" tl="" turns="" red,="" a="" pedestrian="" light="" (pl)="" cycle="" begins:="" a.="" general="" rules:="" i.="" pl="" turns="" white="" (3="" sec="" cross="" time)="" ii.="" then="" turns="" orange1="" and="" blinks="" (for="" 2="" sec="" total,="" 0.25="" delay="" between="" each="" blink)="" iii.="" then="" turns="" solid="" orange="" and="" stays="" orange="" (for="" 2.5s).="" b.="" get="" this="" to="" work="" before="" you="" move="" on="" 3.="" modify="" your="" code="" to="" allow="" access="" to="" the="" road="" add="" push="" button="" to="" your="" circuit.="" a.="" general="" rules:="" i.="" push="" button="" will="" be="" ignored="" if="" the="" tl="" is="" yellow="" or="" red.="" ii.="" when="" the="" button="" is="" pushed="" (low),="" the="" car="" traffic="" light="" should="" turn="" yellow="" (for="" 2.5="" sec),="" then="" red="" (7.5="" secs).="" iii.="" as="" soon="" as="" the="" car="" tl="" turns="" red,="" the="" pedestrian="" light="" turns="" white="" (3="" sec="" cross="" time),="" then="" turns="" orange="" and="" blinks="" (for="" 2="" sec,="" 0.25="" delay),="" then="" turns="" solid="" orange="" and="" stays="" orange="" until="" the="" next="" red="" light,="" at="" which="" point="" the="" pl’s="" cycle="" resets.="" iv.="" repeat.="" tips="" for="" success="" •="" use="" the="" flat="" jump="" wires="" when="" possible="" to="" create="" a="" cleaner="" design="" •="" you="" will="" need="" to="" use="" the="" codes="" provided="" to="" you="" from="" sparkfun="" to="" create="" new="" code="" to="" run="" this="" program.="" all="" the="" attributes="" discussed="" above="" must="" function="" in="" one="" code="" file.="" copy="" and="" pasting="" from="" the="" sparkfun="" code="" is="" acceptable="" for="" this="" assignment.="" •="" use="" constant="" variables="" to="" store="" pin="" numbers,="" push="" button="" state,="" etc.="" •="" your="" name="" and="" email="" address="" should="" be="" in="" the="" first="" line.="" •="" your="" code="" should="" have="" enough="" comments="" to="" help="" me="" understand:="" -="" what="" each="" line="" of="" your="" code="" does,="" and="" how="" the="" hardware="" is="" connected="" •="" prepare="" a="" final="" wire="" diagram="" of="" the="" components="" used="" for="" this="" assignment="" using="" autodesk="" circuit/cad="" program!="" 1="" the="" standard="" pedestrian="" signals="" specified="" by="" the="" us="" department="" of="" transportation="" federal="" highway="" administration="" are="" a="" white="" walking="" person="" and="" a="" "portland="" orange"="" stop="" hand="" (not="" red).="" these="" colors="" were="" chosen="" so="" as="" to="" be="" conspicuous="" against="" a="" backdrop="" of="" red,="" green="" and="" yellow="" lights="" at="" intersections="" and="" to="" avoid="" giving="" drivers="" false="" cues="" of="" a="" green="" light="" (a="" good="" example="" of="" a="" resilient="" design).="" cornerstone="" sf-1="" submission:="" •="">
Answered 1 days AfterFeb 25, 2021

Answer To: GE1103 Engineering Design CP-1 Cornerstone 1 CP-1 AMINO ACIDS, POWER OF 2, INTEGER MATH LAB...

Pulkit answered on Feb 27 2021
130 Votes
SF 1
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here