In solving these problems I want you to use a variety of techniques: individual if statements, compound/complex if, basic if with
one or more embedded if statements, ifelse, case structure. To get all of these structures, you may have to solve the same
problem multiple times.
It was pointed out in class that using all made the assignment unclear, so I will try again.
- Display a student with a major of CI or BU that has taken more than 50 credits and has a gpa > 3.2.
- Display a product with a dept of HDW and either a price over 500 or a cost over 400.
- Display a student who is taking more than 6 courses this semester and has a gpa < 3.
- Display an employees who work in IN and has a salary > 60000 or both a pay per hour > 50 and hours contracted to work = 40.
- Display an employees who has a Y in over time code and have hours worked > hours contracted to work.
My suggestion is that you set up the variables in the php program and write the if statement. You can then test and change the variables and test etc. Models for this are my simple if programs.
An alternative is to have an html program that takes in user input and passes it to the php program which tests it - that seems like more work and I think the first approach is a good one for logic testing.
You are welcome any message or display that makes sense and you can also choose to put out a message saying that the criteria was not met. In fact, extra credit if you do that.