Chapter 4: Problem 33
Suppose that classstanding is a char variable, and gpa and dues are double variables. Write a switch expression that assigns the dues as following: If classStanding is ' \(\mathrm{f}\) ', the dues are \(\$ 150.00 ;\) if classstanding is 's' (if gpa is at least 3.75 , the dues are \(\$ 75.00 ;\) otherwise, dues are 120.00 ); if classStanding is 'j' (if gpa is at least 3.75, the dues are \(\$ 50.00\) otherwise, dues are \(\$ 100.00\) ); if classstanding is 'n' (if gpa is at least \(3.75, \text { the dues are } \$ 25.00 ; \text { otherwise, dues are } \$ 75.00) .\) (Note that the code 'f' stands for first year students, the code 's' stands for second year students, the code 'j' stands for juniors, and the code 'n' stands for seniors.)
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.