Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction.

Similar presentations


Presentation on theme: "1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction."— Presentation transcript:

1 1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Session 2 Matrix Logic Pearson Custom Computer Science CSC 104 Nassau Community College CSC 104 Programming Logic and Problem Solving

2 2 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Brain Teaser Bill, Ken, and Mark are – not necessarily in this order – a kicker, a receiver, and a quarterback. The kicker, who is the shortest of the three, has never been married. Bill, who is Ken's father-in-law, is taller than the receiver. Who plays in which position?

3 3 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Solution :Since Bill is Ken's father-in-law, both Bill and Ken must be married. This leaves the only remaining person, Mark, to be the bachelor (and hence the kicker). Since Bill is taller than the receiver, Bill must not be the receiver. By process of elimination, we conclude that Bill is the quarterback. The remaining position (the receiver) goes to Ken. Therefore, Bill is the quarterback, Ken is the receiver, and Mark is the kicker.

4 4 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Matrix logic Matrix logic (or 2D chart) can be used as a way to organize information and help you eliminate possibilities in a systematic way

5 5 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Matrix logic A logic matrix sets up a one-to-one correspondence between the elements in a problem. When doing matrix logic it is VERY IMPORTANT to read the instructions, pay attention to detail, organize your thoughts, make notes, etc. Talk about auxiliary information (such as who is married to whom in the previous problem).

6 6 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Simple Matrix Problem Ted, Ken, Allyson and Janie (two married couples) each have a favorite sport: running, swimming, biking and golf. Given the following clues, determine who likes which sport. 1.Ted hates golf 2.Ken wouldn’t run around the block if he didn’t have to, and neither would his wife 3.Each woman’s favorite sport is featured in a triathlon 4.Allyson bought her husband a new bike for his birthday to use in his favorite sport

7 7 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Simple Matrix Problem SPORTS NAMES RunningSwimmingBikingGolf Ted Ken Allyson Janie Use “X” for “No” and “O” for “Yes”

8 8 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. ANSWER: Simple Matrix Problem SPORTS NAMES RunningSwimmingBikingGolf TedX O X KenX O AllysonO X JanieX O X Use “X” for “No” and “O” for “Yes”

9 9 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Larger Matrix Problem Tom, John, Fred and Bill are friends whose occupations are (in no particular order) nurse, secretary, teacher and pilot. They attended a picnic recently, and each one brought his favorite meat (hamburger, chicken, steak and hot dogs) to barbecue. From the clues below, determine each man’s occupation and favorite meat

10 10 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Larger Matrix Problem From the clues below, determine each man’s occupation and favorite meat. Tom is neither the nurse nor the teacher Fred and the pilot play in a jazz band together The burger lover and the teacher are not musically inclined Tom brought the hot dogs Bill sat next to the burger fan and across from the steak lover The secretary does not play an instrument or sing

11 11 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Larger Matrix Problem OCCUPATIONSMEAT NurseSctyTchrPilotBurgChknSteakHDog NAMES Tom John Fred Bill MEAT Burg Chkn Steak HDog

12 12 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Larger Matrix Problem From the clues below, determine each man’s occupation and favorite meat. Tom is neither the nurse nor the teacher. Fred and the pilot play in a jazz band together. The burger lover and the teacher are not musically inclined. Tom brought the hot dogs. Bill sat next to the burger fan and across from the steak lover. The secretary does not play an instrument or sing.

13 13 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Larger Matrix Problem OCCUPATIONSMEAT NurseSctyTchrPilotBurgChknSteakHDog NAMES Tom X X O XX X O John O O FredO XX X O Bill O XO X MEAT Burg O XX Chkn O X Steak O X X HDog O

14 14 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. More Matrix Fun Last weekend was the Super Bowl game, the annual championship game for the US National Football League (NFL), and a game that was particularly anticipated this year by nationwide football fans. Greg and five of his friends were no exceptions, and they all met at Greg’s home on Sunday afternoon – snacks in hand and decked out in their favorite team fan gear – ready to enjoy the game on Greg’s large, widescreen TV.

15 15 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. More Matrix Fun From the clues below, determine the following for Greg’s friends: first name, last name, and what type of snack and drink each brought with them: George didn’t bring the popcorn. The friend who brought the sparkling water also brought the vegetable platter. Elliot’s last name wasn’t Shark. Mr. Smith, whose first name wasn’t Harry, brought the buffalo wings but not the soda. Frank’s last name wasn’t Strait. The person who brought the meatballs wasn’t Harry. The espresso was brought by the person whose last name was South. Elliot didn’t bring the margaritas. George Sanford didn’t bring the beer. Harry didn’t bring the espresso. Daryl didn’t bring the buffalo wings. The five friends are Harry, the one who brought the cheese balls, the one whose last name is Shark, the one who brought the margaritas, and the one who brought the popcorn.

16 16 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. More Matrix Fun FIRST NAMELAST NAMEDRINKSNACK Daryl Elliot Frank George Harry Use “X” for “No” and “O” for “Yes”

17 17 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction to Programming Using Visual Basic 2012 international, open membership, not- for-profit technology standards consortium. Homework Complete the Scavenger Hunt Keep Working on SuperBowl Problem Bring results to class. Not a homework assignment Let me know if there are any issues


Download ppt "1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction."

Similar presentations


Ads by Google