1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
VashaNatasha [74]
3 years ago
10

This solution will use an item quantity and a state code to calculate the total price of an item. The solution will calculate th

e total cost of an item by multiplying the quantity ordered by one of two prices. For quantities less than 50 each item will cost $2.25. For quantities greater than or equal to 50, each item will cost $1.50. Should the state be Connecticut or Massachusetts, an extra $20 will be added to the total cost of the item.
Please answer!!!
Computers and Technology
1 answer:
jeka57 [31]3 years ago
8 0

Answer:

Create one label and one textbox, and name them quatity, both of them. Now add another label, and name it Price. And add a button, and name it calcprice. Also add state textbox for state. Add a textbox and name it state

Now Double click calcprice button in design mode, and add in calcprice_click, code given below:

If Convert.ToInt32(quantity.Text) <50 and (state.Text != Connecticut or state.Text !=Massachusetts) Then  

   Price= Convert.ToInt32(quantity.Text) x 2.25

If Convert.ToInt32(quantity.Text) <50 and (state.Text == Connecticut or state.Text ==Massachusetts) Then  

   Price.Text= Convert.ToInt32(quantity.Text) x 2.25 +20

ElseIf Convert.ToInt32(quantity.Text) >=50  and (state.Text != Connecticut or state.Text !=Massachusetts) Then  

 Price.Text= Convert.ToInt32(quantity.Text) x 1.50

 Else

   Price.Text= Convert.ToInt32(quantity.Text) x 1.5 +20

 End If

Please add this code and it should work fine.

Explanation:

Please check the answer section.

You might be interested in
A_______is a limitation imposed on the engineer. It can be a limitation on
boyakko [2]

Answer:

Constraint

Explanation:

6 0
4 years ago
Which one of the following is the correct code snippet for calculating the largest value in an integer array list aList?
vodka [1.7K]

Answer:

Option a.  int max = aList.get(0); for (int count = 1; count < aList.size(); count++) { if (aList.get(count) > max) { max = aList.get(count); } }

is the correct code snippet.

Explanation:

Following is given the explanation for the code snippet to find largest value in an integer array list aList.

  1. From the array list aList, very first element having index 0 will be stored in the variable max (having data type int).
  2. By using for starting from count =1 to count = size of array (aList), we will compare each element of the array with first element of the array.
  3. If any of the checked element get greater from the first element, it gets replaced in the variable max and the count is increased by 1 so that the next element may be checked.
  4. When the loop will end, the variable max will have the greatest value from the array aList.

i hope it will help you!

7 0
3 years ago
Read 2 more answers
python If the checksum is 10, the last digit is denoted as X according to the ISBN-10 convention. Write a program that prompts t
aksik [14]

Answer:

PYTHON CODE:

str = input("Enter the first 9 digits of an ISBN-10 as a string : ") # user input

i = 1

checksum = 0 # for total sum

while i < 10:

c = int(str[i - 1]) # getting every digit of the ISBN

c = c * i

checksum += c

i=i+1

checksum=checksum % 11 # getting the last digit of ISBN

ch=checksum

if checksum==10: # if the last digit is 10 then change it to X

ch="X"

print("The Complete 10-Digit ISBN is : ",end="")

print(str,end="") # displaying the 9 digit of ISBN

print(ch) # appending the last digit of ISBN

Explanation:

3 0
3 years ago
Given the variables costOfBusRental and maxBusRiders of type int , write an expression corresponding to the cost per rider (assu
Liono4ka [1.6K]

Answer:

       int costOfBusRental;

       int maxBusRiders;

       int costPerRider;

       costPerRider = costOfBusRental/maxBusRiders;

Explanation:

The costPerRider is the total cost of renting the bus (costofBusRental) divided by all the bus users (maxBusRiders). So we declare the three variables to be of type int as required by the question.

7 0
4 years ago
Select the correct statement(s) regarding Frame Relay (FR). a. FR is a connection-oriented standard that operates at the OSI lay
DedPeter [7]

Answer:

d. all of the statements are correct

Explanation:

Frame Relay is a high-performance WAN protocol that operates at the physical and data link layers of the OSI reference model. i.e Layers 1 and 2 They are designed to cope with bursty traffic. Frame relay is also a form of data networking based on packet switching in which the packets are variable in length and experience packet delays.

Based on the above definition the correct statement is option d as all of the statements define in the other option correctly defines the function of frame relay.

7 0
3 years ago
Other questions:
  • Query: [mcdonalds Austin] Viewport: Fresh User Location: within Houston, TX Result Returned: McDonalds location in a neighboring
    7·1 answer
  • Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)
    12·1 answer
  • How would a designer interpret the word denier?
    12·2 answers
  • How many worksheets display in the Excel window when you create a new blank workbook?
    10·2 answers
  • Travel agents are market intermediaries who make their living by gathering, organizing, and dispensing information about travel-
    5·1 answer
  • area of trapezium is 54cmsq if parallel sides are 10cm and 8cm long find the distance between the parallel sides​
    12·1 answer
  • Which line is most likely an error? A-“hello” B-hello C-“100” D-100
    6·2 answers
  • What is a network computer that processes requests from a client server​
    11·1 answer
  • Which of the following responses is the best example of a problem that can be solved using a computer program?
    6·2 answers
  • Add criteria to this query to return only the records where the value in the SubscriptionType field is Self or Family and the va
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!