This is an old revision of the document!
Table of Contents
Corning Community College
ENGR1050 C for Engineers
End of Course Experience
EoCE
Rules
Presented within will be various questions evaluating your knowledge and experience gained this semester. In places where you are able, the more you write and explain topics the better the chance you will have of receiving full credit (and alternatively, the more credit you will receive should something defer correctness).
Unless otherwise specified, the questions on this experience are open resource with the exception of other individuals. In that respect, it is CLOSED PERSON. This means you are not to communicate with other people (either in the class or otherwise), in real life or electronically. Use your own knowledge, use your own skills, and use your own ability to access the allowed resources to aid you in coming up with your well thought out responses to each question.
You are allowed, and expected, to seek clarification on any question by asking any of the tutors or me. But the aim here is to evaluate what you have learned, so do not expect tutoring. Any help should be prompted by a well-asked question. Any reply (if possible) from a tutor, should also be in the form of a question.
You are to do all items. Submission is to be as follows:
- an organized and easy to read presentation of information on your EoCE wiki page.
- if applicable, a supplemental archive submitted using the submit tool (likely via Makefile)
The EoCE is worth 26 points of your overall grade (projects + participation + journal + eoce = 104), representing a distinct fourth category within the grading policy of the course (Projects, Journal, Participation, and EoCE).
Finals Week Availability
While some classes are allocated a specific meeting time during finals week, I make all such times available should you be free and have questions. As such, finals week in CHM123 will look something like this:
- Monday, December 9th, 2019: from 02:30pm - 05:30pm
- Tuesday, December 10th, 2019: from 08:00am - 02:15pm
- Wednesday, December 11th, 2019: from 02:30pm - 05:30pm
DEADLINE FOR SUBMISSION: You have until 05:29:59pm (that's 17:29:59 in 24-hour time) Wednesday, December 11th, 2019 to complete your EoCE(s). This is the ultimate deadline for any and all coursework. There is no “late”, only “too late”. Don't be that person, not with this.
Good luck!
C4ENG
Obtain the EoCE project
In order to perform this end of course experience, you will need to obtain a copy of the eoce project, located on lab46.
Obtain EoCE
Okay, you're ready to tackle eoce, please log into lab46, go into the directory where you've been organizing your course work, and do the following:
lab46:~/src/c4eng$ grabit c4eng eoce ...
You should now have an eoce/ subdirectory, containing other files and directories.
NOTE: It is important that you keep the project directory named eoce; changing its name will break some of the automated functionality making your life easier.
Change into your eoce project directory
Once copied, you can now change into your project directory, by doing the following:
lab46:~/src/c4eng$ cd eoce lab46:~/src/c4eng/eoce$
Using the Makefile
In the base of the eoce project directory is a Makefile which will automate some tasks for you (specifically, submitting, but it can also be used to help propagate any bugfixes or updates).
To see what options are available, run “make help”
Additionally, there are Makefiles in each of the 0x0/, 0x1/, 0x2/, 0x3/, 0x4/, and 0x5/ subdirectories, which will facilitate the compilation of any code (all you have to do is change into said directory and run make, and watch for any warnings or errors).
Access the Electronics Kit resources
Your electrics kits have a set of documentation available:
Various bits, from datasheets for some of the components to tutorials.
For some of your activities here, you will want to download and open up the Tutorial.pdf file.
0x0: Raspberry Pi electronics circuit
In the Freenove tutorial, I would like you to select a circuit to set up and implement the program to test its operation. Pick one of the following chapters:
- Chapter 9: Potentiometer and RGBLED
- Chapter 10: Photoresistor and LED
- Chapter 11: Thermistor
- Chapter 12: Joystick
Wiring up the circuit, and use the provided C program to ensure its operation.
Identify which one you've chosen, and what neat insights you gained from the experience. Document this information in the 0x0/ subdirectory.
Show me your working setup when you've got it.
0x1: Another Raspberry Pi electronics circuit
In the Freenove tutorial, I would like you to select another circuit to set up and implement a program to test its operation. Pick one of the following chapters:
- Chapter 13: Motor and Driver
- Chapter 14: Relay and Motor
- Chapter 15: Servo
- Chapter 16: Stepping Motor
Wiring up the circuit, and use the provided C program to ensure its operation.
Identify which one you've chosen, and what neat insights you gained from the experience. Document this information in the 0x1/ subdirectory.
Show me your working setup when you've got it.
0x2: Make me something cool
Using the kit and Freenove tutorial, build me a circuit and write a program that is NOT exactly something found in the tutorial. It can be based on ideas from the tutorial, but bust be its own unique and distinct thing.
Some suggestions:
- “theremin” via buzzer and distance sensor
- “whirlygig” animation on the LEDMatrix
- LEDMatrix pong with joystick
- interface Matrix Keypad with one of your programs from this semester (to provide input).
Wiring up your circuit, and and implement a program that drives this unique creation.
Identify what you've chosen, and what neat insights you gained from the experience.
Show me your working setup when you've got it.
Place your completed program in the 0x2/ subdirectory for submission.
0x3: Units of Measurement (electronic storage)
In the 0x3/ subdirectory:
Based on the first letter of your last name (or the first letter of the last word of your last name, if hyphenated), identify your theme of implementation:
- A, C, E, G, I, K, M, O, Q, S, U, W, Y: units of data
- B, D, F, H, J, L, N, P, R, T, V, X, Z: units of length
Units of Data
In computing, we're constantly interacting with data and information. While these terms are frequently interchanged, they actually both hold useful and distinct meanings.
The word “data” is defined as meaning: the quantities, characters, or symbols on which operations are performed by a computer, being stored and transmitted in the form of electrical signals and recorded on magnetic, optical, or mechanical recording media.
The word “information”, on the other hand, is defined as: what is conveyed or represented by a particular arrangement or sequence of things. It is the result of data being organized, processed, stored, or transmitted by a computer.
For example, “data” might refer to some quantity of 1s and 0s stored on a disk. “Information”, on the other hand, is applying some larger context or pattern to that otherwise meaningless sequence of bits. A set of numbers can be construed as data, whereas a list of prime numbers? Information.
Another defining characteristic of information is that we can use it to better communicate ideas. As there is no single perspective or point of reference on all information, to avoid becoming unnecessarily long-winded, we enhance our information even more with the addition of units– further classifications that we can use to compare and evaluate information.
Look around: information in the world is filled with units. We rely on units to convey information: how many miles per hour are we going? How many litres of water can be placed in a container? How much does that item weigh (factor in shipping costs)?
And misunderstanding units can lead to miscommunication, from losing Mars rovers to receiving unexpected overcharge fees on bills.
In the realm of computing, we quantify our information in units of bits. Now, we seldom relate information in bits, but instead easier to manage units like bytes, kilobytes, megabytes, etc.
At the simplest level, most of us understand that (at least in recent decades) 1 byte is equal to 8 bits. But so often, our typical storage capacities are huge and expressing them in just bytes would be rather unwieldy- instead we further simplify by using kilobytes, megabytes, gigabytes, etc.
Using the metric system, we recognize the following prefixes:
prefix | value |
---|---|
kilo | 1000 |
mega | 1000000 |
giga | 1000000000 |
tera | 1000000000000 |
Historically, however, due to the computer's grouping of 8-bits per byte (instead of other measurements which we group in collections of 10), which meant that instead of a kilobyte being 1000 bytes, it was 1024 bytes.
In recent years, the metric gestapo convinced the computing realm to similarly line up to even units of 10. Marketing people loved this, as they could now sell you a 1TB hard drive but there'd actually be less capacity than was historically sold.
To retain context, a new class of units were created to encapsulate the old 8-based byte storage. These received a lowercase “i” in their unit:
prefix | value |
---|---|
kibiByte (kiB) | 1024 |
MibiByte (MiB) | 1024 * 1024 = 1048576 |
GibiByte (GiB) | 1024 * 1024 * 1024 = 1073741824 |
TibiByte (TiB) | 1024 * 1024 * 1024 * 1024 = 1099511627776 |
Put side by side, we see:
prefix | value |
---|---|
kilobyte (kB) | 1000 bytes |
kibiByte (kiB) | 1024 bytes |
MegaByte (MB) | 1000 * 1000 = 1000000 bytes |
MibiByte (MiB) | 1024 * 1024 = 1048576 bytes |
GigaByte (GB) | 1000 * 1000 * 1000 = 1000000000 bytes |
GibiByte (GiB) | 1024 * 1024 * 1024 = 1073741824 bytes |
units
Your program will recognize at least the following units of length:
- bits (smallest unit)
- bytes (1 byte == 8-bits)
- deka(bits|bytes) (D(b|B) – groups of 10)
- dibi(bits|bytes) (Di(b|B) – groups of 16)
- hecto(bits|bytes) (H(b|B) – groups of 100 (10*10))
- hibi(bits|bytes) (Hi(b|B) – groups of 128 (16*8))
- kilo(bits|bytes) (k(b|B) – groups of 1000 (10*10*10))
- kibi(bits|bytes) (ki(b|B) – groups of 1024 (16*8*8))
- Mega(bits|bytes) (M(b|B) – 1000000)
- Mibi(bits|bytes) (Mi(b|B) – 1024*1024)
- Giga(bits|bytes) (G(b|B) – 1000*1000*1000)
- Gibi(bits|bytes) (Gi(b|B) – 1024*1024*1024)
- Tera(bits|bytes) (T(b|B) – 1000*1000*1000*1000)
- Tibi(bits|bytes) (Ti(b|B) – 1024*1024*1024*1024)
Units of Length
In the 0x3/ subdirectory:
Just as with the units of measurement program above for electronic storage, there exist units in all kinds of information.
Your task here is to write a program to convert between various length units.
units
Your program will recognize at least the following units of length:
unit | description |
---|---|
inch | 2.54 centimeters |
lea | 80 yards |
foot | 12 inches |
yard | 3 feet |
mile | 5280 feet |
greek stadion | 18.49 Dm |
roman foot | 295.7mm |
roman mile | 1617 yards |
roman league | 7500 roman feet |
league | 4km |
cubit | 18 inches |
meter | 1.09361 yards |
The meter is available with the usual SI prefixes:
prefix | value |
---|---|
(m) milli- | 0.001 meters |
(c) centi- | 0.01 meters |
(d) deci- | 0.1 meters |
(D) deka- | 10 meters |
(h) hecto- | 100 meters |
(k) kilo- | 1000 meters |
(M) mega- | 1000000 meters |
Your task
Write a program that prompts the user for 3 pieces of input:
- a number (which will be some form of the listed units you are working with)
- the unit of that number (any from the above in the list of units)
- the unit to convert that source input to (any from the above units).
Example output, units of data
lab46:~/src/c4eng/eoce/0x3$ ./0x3 Enter source value: 2048 Enter source unit: kiB Enter destination unit: Db 2048 kiB == 1677721.6000 Db lab46:~/src/c4eng/eoce/0x3$
Example output, units of length
lab46:~/src/c4eng/0x3$ ./0x3 Enter source value: 300 Enter source unit: cubit Enter destination unit: dm 300 cubits == 1371.6041 decimeters lab46:~/src/c4eng/eoce/0x3$
0x4: Fun with Flags, again
In the 0x4/ subdirectory:
Using the GD library, create a program that produces an image depicting the circular “13 star” early US flag (sometimes referred to as the “Betsy Ross” flag):
Of note, your implementation needs to:
- make use of loops
- utilize arrays
- aside from fixed values for width and height of the overall image, rely predominantly on offsets and percentages
Your implementation does not need to be an exact match (ie the stars do not have to line up in the same way), but it does have to resemble that particular flag.
0x5: Fun with numbers
In the 0x5/ subdirectory:
Following will be the output of a program which I have not provided source code for. Your task is to recreate the necessary programming logic to produce identical output.
Output must be generated by the program (you're not allowed to just have a bunch of fixed output statements).
Output
00000000 00000001 00000001 00000002 00000003 00000005 00000008 00000013 00000021 00000034 00000055 00000089 00000144 00000233 00000377 00000610 00000987 00001597 00002584 00004181 00006765 00010946 00017711 00028657 00046368 00075025 00121393 00196418 00317811 00514229 00832040 01346269
You can use the provided Makefile to assist in program compilation; just type 'make'
Questions
Please respond to the following:
- Additionally, What would be the next row (next 4 values) that would occur should this output be allowed to continue?
- In words, describe the pattern taking place with these numbers.
- Does this pattern have a name? What is it?
0x6: Grade Figure Outer-er
Throughout the semester, you've been accumulating points for your class participation, journal, and projects.
This information has been accessible via the status tool.
Your task now is to write a program that accepts as input all the pertinent values from your status output, calculates your results, and displays them to the screen.
Your program needs to do the following:
- place each value into an array according to their category (projects, participation, journal)
- there will be three categories (potentially three arrays):
- journal data (13% of grade)
- participation data (13% of grade)
- project data (52% of grade)
- once loaded into their arrays, calculate their totals, and totals out of grade component
- tally up all three, and print out the results
- calculate the current overall score, with a precision of 3 decimal places
- display the letter grade
Letter grades are on the following scale:
- A (100.00+)
- A- (94.00-99.99)
- B+ (88.00-93.99)
- B (82.00-87.99)
- B- (76.00-81.99)
- C+ (70.00-75.99)
- C (64.00-69.99)
- D (58.00-63.99)
- F ( 0.00-57.99)
For purposes of array allocation, you may assume the quantities based on the evaluation of the week 12 deliverables (cos0/pctC, wcpC, and week12 journal).
Final program output should resemble the following (note the formatting/spacing):
lab46:~/src/c4eng/0x6$ ./0x6 Participation: 6 / 12 => 6 / 13 Journal: 38+1 / 56 => 9 / 13 Projects: 328+24 /377 => 48 / 52 ------------------------------------- Total: 63 / 78 ===================================== Score: 80.769 Grade: B- lab46:~/src/c4eng/0x6$
Submission
EoCE document
All responses to questions, unless specifically indicated otherwise, should be addressed on this document (or the intended wiki document).
Please edit the appropriate section and provide the necessary information.
File Submission
For any other specific deliverables, if using a project directory tree you can obtain a copy of, when ready, submit it using the Makefile, as follows:
lab46:~/src/DESIG/eoce$ make submit ...
If no formal project, you can submit requested files (preferably in an archive of their own), using the submit tool. A project called eoce has been likely set up for this purpose.