Send
Close Add comments:
(status displays here)
Got it! This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
A2: Asmt#2: Programmed truth table
You are not logged in. Go to
Login page.
You need to login before you can view more content.(content omitted that requires login)
4. A2: Programmed truth table
175: Asmt#2: Programmed truth table , Name: ___________________________
CS 340, Fall 2019, York College of Pennsylvania
178, 40 points, 2019-09-27 (due by midnight)
Resubmit by 2019-10-03 with the following changes, if needed.
Your userid is the userid or user name that is in your YCP email address (Not your student number or anything else).
For example, the userid for email
rsnyder9@ycp.edu is
rsnyder9.
The subject line should be
A2, nothing else.
Submit a valid zip file (not a tgz, not a xzip, not a tar, etc.) that contains the following.
The program file for this assignment with the proper file extension. The filename should be userid-a2 (all lowercase).
The Word document as a valid docx file. The filename should be userid-a2 (all lowercase).
Word documents need to look nice. In the Word document, use a fixed width font for program text and a serif font (e.g., Times) for document text and a sans-serif font (e.g., Helvetica or Arial) for headers. Headers should be in bold and bigger than the other text.
Write a program that writes outputs the extended truth table for the provided logical expression using the specified programming language and specified logical expression for you userid below.
The extended truth table should appear as done using the manual method.
You may not copy code from one another but you may discuss and help each other on the mechanical details of using the specified programming language.
The variable letters for the nodes/operators should start on the left at
a and continue in order to the right. This is the same method as used in the notes and for the written quiz.
acanzano : Go : ((p = q) ^ (! n)) | ((p | q) & (n ^ p))
acastro7 : Java : ((t | r) & (s ^ t)) = ((! r) = (s & t))
aloehr : Lua : ((u = v) ^ (w & u)) | ((v ^ w) | (! u))
alouderback : PHP : ((! y) & (z | x)) = ((y = z) ^ (x & y))
cbrandt6 : Python : ((p = m) ^ (! n)) | ((p | m) & (n ^ p))
creynolds1 : Go : ((q | r) & (s ^ q)) = ((! r) = (s & q))
dchism : Java : ((u = v) ^ (t & u)) | ((v ^ t) | (! u))
dhilbert1 : Lua : ((! y) & (w | x)) = ((y = w) ^ (x & y))
dretzlaf : PHP : ((z = m) ^ (! n)) | ((z | m) & (n ^ z))
jclegg1 : Python : ((q | r) & (p ^ q)) = ((! r) = (p & q))
jgross11 : Go : ((u = s) ^ (t & u)) | ((s ^ t) | (! u))
jsam : Java : ((! v) & (w | x)) = ((v = w) ^ (x & v))
jstambaugh : Lua : ((z = m) ^ (! y)) | ((z | m) & (y ^ z))
jsteck : PHP : ((q | n) & (p ^ q)) = ((! n) = (p & q))
kkennelly : Python : ((r = s) ^ (t & r)) | ((s ^ t) | (! r))
lgartrell : Go : ((! v) & (w | u)) = ((v = w) ^ (u & v))
nhays : Java : ((z = x) ^ (! y)) | ((z | x) & (y ^ z))
pnelson1 : Lua : ((m | n) & (p ^ m)) = ((! n) = (p & m))
pnorris : PHP : ((r = s) ^ (q & r)) | ((s ^ q) | (! r))
qherb : Python : ((! v) & (t | u)) = ((v = t) ^ (u & v))
rgreaves : Go : ((w = x) ^ (! y)) | ((w | x) & (y ^ w))
tjefferson : Java : ((m | n) & (z ^ m)) = ((! n) = (z & m))
tmcadams : Lua : ((r = p) ^ (q & r)) | ((p ^ q) | (! r))
tswann2 : PHP : ((! s) & (t | u)) = ((s = t) ^ (u & s))
ttao1 : Python : ((w = x) ^ (! v)) | ((w | x) & (v ^ w))
vmaresca : Go : ((m | y) & (z ^ m)) = ((! y) = (z & m))
wwyatt : Java : ((n = p) ^ (q & n)) | ((p ^ q) | (! n))
zronayne : Lua : ((! s) & (t | r)) = ((s = t) ^ (r & s))
5. Programming languages
6. Submit
Create the following files.
File:
Program text:
The program (as a text file, with the proper file extension).
File:
Word document: A Word document (extension
docx) that describes what you have done. The guiding principle when writing the document is the following. "
Would someone who is somewhat familiar with what you are doing and reading your document know what you are doing at each step of the process?"
Include a short descriptive title at the top of the document.
Include the following sections. Each section should be clearly and consistently marked. All program text should have explanatory text before and after the program text.
Introduction of what is in the document.
The logical expression being used in a fixed font such as "Courier New".
The extended truth table for the logical expression (i.e., the output of your program) in a fixed font such as "Courier New".
The program that generates the extended truth table. Program text should be in a font such as "Courier New".
A summary at the end.
Program text should be in a fixed font such as "Courier New".
Zip the above files into a zip file. The name of the zip file should be the following (using your userid).
userid-a2.zip
Submit the following by sending an email Submit the following by sending an email to my email account at
robinsnyder@gmail.com from your YCP email address/account.
Attach the above zip file to your message.
The subject line should be the following
A2
7. Dijkstra: Communication
Besides a mathematical inclination, an exceptionally good mastery of one's native tongue is the most vital asset of a competent programmer. 1975.
Edsger Dijkstra (importance of communication) Dijkstra, E. (June 18, 1975). "How do we tell truths that hurt?", EWD 498.
8. Scoring rubric
CS 340 - A2 : Asmt#2: Programmed truth table
Your grade: _ / 40
[LATE] Late or redo penalty: _ / -40
Programs and output: _ / 20
Document includes programs and output: _ / 5
Document explanations as required: _ / 10
Document style - sections, text, programs: _ / 5
[CREDIT] Extra credit: _ / +8
Comments:
9. End of page