import java.text.NumberFormat; import uwcse.io.*; /** * Practicing using conditionals */ public class Conditionals { /** * A method to illustrate the use of de Morgan's laws */ public void testDeMorganLaws() { // ask for the family income // ask for the number of children // if the family income is not greater than 20000 // or if the number of children is greater than 3 // display a message stating that the family might // be eligible for a stipend // do this in 2 ways // Input double income; int children; // Test for the stipend eligibility in 2 ways // Both ways should give the same result // 1) write the condition with an || (or) // 2) write the condition with an && (and) } public void printGrade() { // given a grade between 0 and 100 // print the corresponding letter grade // 90-100 is A, 80-89 is B, 70-79 is C, 60-69 is D, below 60 is F // // use an if-else if structure // // do the same with a switch statement // Input int grade; //The grade must be between 0 and 100 // Print the letter grade using nested ifs // Print the letter grade using a switch } /** * more ifs */ public void reportToIRS() { // IRS informants are paid cash awards based on the // value of the money recovered. If the information // was specific enough to lead to a recovery, the // informant receives 10 percent of the first $75,000, // 5 percent of the next $25,000 and 1 percent of the // remainder, up to a maximum award of $50,000. // Write a function that takes as input the amount of // the recovery and returns the award. // Test your program by having main call the function // for different amounts. // input the amount recovered double moneyBack; // compute and print the reward // for the display try NumberFormat.getCurrencyInstance() } private double computeReward(double m) { } }