Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. When I take Drux, I get a splitting headache. 2. When I take Drux, my splitti

ID: 3638836 • Letter: 1

Question

1. When I take Drux, I get a splitting headache.
2. When I take Drux, my splitting headache disappears.
3. This morning when I took Drux, I felt dizzy and hit my head on the pavement. I still have a splitting headache.
4. I can take Drux for only so long because of the splitting headache.
5. I take Drux because of my splitting headache. (Note: splitting headache is a symptom, not a side effect)
6. As soon as I stop taking Drux, I suspect my splitting headache would disappear.
7. I have been on Druy and recently added Drux, and started to have a splitting headache but my stomach cramps are all gone.


Note: "Drux" and "Druy" are simply placeholders for drugs.

Q1. Assume the drug and the side effect have already been identified as indicated above. Say we want to connect the side effect in red to the drug in blue. Describe the algorithm and data structures you would use. Explain how the result is achieved for each of the 7 examples above.
Q2. Provide an example where the algorithm you described above would fail. How would you fix it?
Q3. In sentence #2, "disappears" indicates a "not" with respect to "splitting headache". What are the features (clues, indicators, etc.) your algorithm would make use of to establish the proper connection between the drug and the side effect? Provide specific examples.

Explanation / Answer

public class StudentDemo { public static void main(String[] args) { Student tom = new Student(); tom.readStudentName(); tom.readStudentId(); tom.readStudentScores(); tom.displayStudentInfo(); tom.displayStudentAverage(); tom.updateID (“111-222”); tom.updateID (“111444”); tom.updateScores (100.0, 90.0); tom.updateScores (99.0, 105.0); tom.displayStudentInfo(); } } This is a sample result of the execution: Enter first name: Tom Enter last name: Smith Enter ID (xxx-xxx): 123456 Incorrect format. Try again: 123-abc Incorrect format. Try again: 123-456 Enter mid-I exam score: 90.5 Enter mid-II exam score: 89.5