Sam D
if/else statements
0 Answer(s)      3 years and 6 months ago
Posted in : Java Beginners

I'm having a hard time programming this question: code an if/else statement that test the value of a string variable named shippingMethod to determine if it has a value of "UPS," "FEDEX," or another value. If the value is "UPS," code another if/else statement that tests the value of a double variable named weight. If the value of weight is less than or equal to 5, set a double variable named shipppingBase to 4.95. If weight is greater than 5 and less than or equal to 10, set the shippingBase variable to 7.95. And if weight is greater than 10, set shippingBase to 10.95. If the value of shippingMethod is "FEDEX," set shippingBasse to 7.95. And if shippingMethhod is another value, set shippingBase to 9.95.

Would you help me?

Related Tutorials/Questions & Answers:
if/else statements
if/else statements  I'm having a hard time programming this question: code an if/else statement that test the value of a string variable named.... If the value is "UPS," code another if/else statement that tests the value
Objective C if else statements syntax
Objective C if else statements syntax  What is the syntax of if else statements in Objective C?   Using of if else statement in Objective C There is no changes in the syntax format of if else statement. You can write
Java if else
Java if else       The if-else statement is one of the widely used control flow statements while...: if (booleanexpression) { /*Statements*/ } else{ /*Statements*/ } Read more at: http
Java Control Statements
: the decision making statements (if-then, if-then-else and switch), looping... if and if-else statements. To avoid this we can use Switch statements... Java Control Statements
Java Control Statements
the control statements. Different types of control statements: the decision making statements (if-then, if-then-else and switch), looping statements (while, do-while... Java Control Statements
The else Keyword
The else Keyword        The else is the one more keyword of Java. It is used to specify a statement or block of statements that are executed when the condition for testing specified
Operators; If, Else, Elseif; Loops
3.9. Operators; If, Else, Elseif; Loops Conditional Statements If, Else, Elseif are called the Conditional statements that are used for performing... the following conditional statements: 3.9.1. if statement if statement is used
Mysql Else Condition
Mysql Else Condition       Mysql Else Condition evaluate the statements in database to perform... illustrate an example from the 'Mysql Else Condition'.To understand
JavaScript Conditional Statements
. JavaScript supports if , else, switch case and conditional operator for this purpose. JavaScript Conditioanl Statements Example 1(if): <html> <...(if-else): <html> <head> <title> Variables in JavaScript <
If and else if ladder
If and else if ladder  How we can use if and else if statement?  ...) System.out.println("Grater than 100"); else if(i < 50) System.out.println("Grater than 50"); else
predicates and statements?
predicates and statements?  Explain about predicates and statements
programes on if....else
or not write a program to find minimum of 3 nos using nested if else. write... a program to input score of a student out of 100 and print grades using else...){ System.out.println("Leap Year!"); } else{ System.out.println("Not a Leap
If-else not working
If-else not working  <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %> <html> <...="SELECT REGNO,SNAME FROM sub_comb WHERE L_category='Lab'"; } else if (Lab
If-else not working
If-else not working  <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %> <html> <...="SELECT REGNO,SNAME FROM sub_comb WHERE L_category='Lab'"; } else if (Lab
Use if else and end statements in velocity
Use if else and end statements in velocity       This Example shows you how to Use...;Komal... #else Hi .... #end Output: Hi Komal
if else statement in java
if else statement in java  if else statement in java explain with example
if else condition - Java Beginners
if else condition  Please explain the if else condition in Java programming language
if else statement in java
if else statement in java  explain about simple if else statement and complex if else statement in java with an example
if else in javascript function
if else in javascript function  How can i write the else statement in JavaScript to check if the web browser is IE or not? Is there any other way to validate this way ..? Thanks
switch case instead of if else
switch case instead of if else  How to write code in switch case instead of if else in Java
ELSE STATEMENT!! - Java Beginners
ELSE STATEMENT!!  Hi! I just want to know why doesn't my else statement works? Else statement is there in the code below which is: else JOptionPane.showMessageDialog(null, n+ " is not in the array!");//doesn't work
Java if else condition
Java if else condition  its there any similar condition for (X<=5 || y<=10) please post the answer as soon as possible.... TQ
check condition in if-else block
check condition in if-else block  Hi, I want to update database with following query int i= st.executeUpdate("Insert into text_editor(words) values('"+words+"')"); how can I give a check option so only valid words are inserted
using if and else if statments
using if and else if statments  Hello everyone Hope all are well Just new here & already have a question. I have a little veg shop it sells 6... if and nested if and else if This has my head in bits for days I have the below done x6
If and else statement - JDBC
If and else statement  Dear Sir, I had created a statement...); ======================================================= how to create a if and else statement... or else it will prompt a message dialog to indicate that the word is already
IF-ELSE In JSTL
IF-ELSE In JSTL In this section we will read about implementation of if-else.... In JSTL if-else tag is not implemented directly like the if-else statement is used on the Java/JSP coding. Implementation of if-else tag in JSTL coding
java program using control statements...
java program using control statements...  public class...){ System.out.println("It is zero"); else if(x>0) System.out.println("it is positive number"); else if(x<0) System.out.println
Control Tags-If / Else If / Else
Control Tags-If / Else If / Else      ... are used for flow control such as if, else and iterate.)  'If' tag could be used by itself or with 'Else If' Tag and/or single/multiple 'Else' Tag. Create
DECESION MAKING STATEMENTS
DECESION MAKING STATEMENTS  The Decision Making statements may be implemented in different forms depending on the complexity of the condition to be tested. Describe various forms of decision making statements in java
The INSERT INTO Statements in SQL?
The INSERT INTO Statements in SQL?  The INSERT INTO Statements in SQL?   Hi, The INSERT INTO statement is used to insert a new row or multiple rows into a table. SQL INSERT INTO Syntax INSERT INTO table_name VALUES
general syntax for a SELECT statements
general syntax for a SELECT statements  Write down the general syntax for a SELECT statements covering all the options   Hi, The general... shows how we can use different optin with the select statements. SELECT select
Tutorials