Question

These are questions pertaining to Java.

Incorrect Question 1 0/1 pts Evaluate the below expression. Perform a step-by-step evaluation to clearly understand how a com

0 0
Add a comment Improve this question Transcribed image text
Answer #1

40/3+9/4 = 15

Here we will perform this to get integer solution and not float values. So , as we know ' / ' has more precedence than '+' .So '/' will be evaluated first. and its associativity is left to right so left '/' will be evaluated first.

Therefore 40/3+9/4 = 13 + 9/4 = 13+2 = 15.

Therefore 15 is the answer.

(28-4+15+1)* (3/5) = 0  

Now precedence of brackets ( ) is higher. So first both brackets will be solved.

(28-4+15+1)*(3/5) = ( 40) * (3/5)

now second bracket is solved

so 40*(3/5) = 40*0 = 0

So 0 is the answer.

Add a comment
Know the answer?
Add Answer to:
These are questions pertaining to Java. Incorrect Question 1 0/1 pts Evaluate the below expression. Perform...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQ...

    Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQUIRED for this program will use two stacks, an operator stack and a value stack. Both stacks MUST be implemented using a linked list. For this program, you are to write functions for the linked list stacks with the following names: int isEmpty (stack); void push (stack, data); data top (stack); void pop (stack); // return TRUE if the stack has no...

  • Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQ...

    Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQUIRED for this program will use two stacks, an operator stack and a value stack. Both stacks MUST be implemented using a linked list. For this program, you are to write functions for the linked list stacks with the following names: int isEmpty (stack); void push (stack, data); data top (stack); void pop (stack); // return TRUE if the stack has no...

  • 0/ 2 pts Incorrect Question 1 The next two questions pertaining to the situation described below....

    0/ 2 pts Incorrect Question 1 The next two questions pertaining to the situation described below. A point charge q1--3.1 uC is located at the origin of a coordinate system. Another point charge q2 = 5.9 μC is located along the x-axis at a distance x2-67 cm from q1. 2 (1) What is F12), the value of the x-component of the force in N that q1 exerts on q2? 36669636.89

  • **TStack.py below** # CMPT 145: Linear ADTs # Defines the Stack ADT # # A stack (also called a pushdown or LIFO stack)...

    **TStack.py below** # CMPT 145: Linear ADTs # Defines the Stack ADT # # A stack (also called a pushdown or LIFO stack) is a compound # data structure in which the data values are ordered according # to the LIFO (last-in first-out) protocol. # # Implementation: # This implementation was designed to point out when ADT operations are # used incorrectly. def create(): """ Purpose creates an empty stack Return an empty stack """ return '__Stack__',list() def is_empty(stack): """...

  • JAVA 3 PLEASE ANSWER AS MANY QUESTIONS AS POSSIBLE! ONLY 2 QUESTIONS LEFT THIS MONTH!!! Question...

    JAVA 3 PLEASE ANSWER AS MANY QUESTIONS AS POSSIBLE! ONLY 2 QUESTIONS LEFT THIS MONTH!!! Question 12 pts Which is a valid constructor for Thread? Thread ( Runnable r, int priority ); Thread ( Runnable r, String name ); Thread ( int priority ); Thread ( Runnable r, ThreadGroup g ); Flag this Question Question 22 pts What method in the Thread class is responsible for pausing a thread for a specific amount of milliseconds? pause(). sleep(). hang(). kill(). Flag...

  • java In this project you will implement a trivia game. It will ask random trivia questions, evaluate their answers and keep score. The project will also have an administrative module that will allow f...

    java In this project you will implement a trivia game. It will ask random trivia questions, evaluate their answers and keep score. The project will also have an administrative module that will allow for managing the question bank. Question bank management will include adding new questions, deleting questions and displaying all of the questions, answers and point values. 2. The project can be a GUI or a menu based command line program. 3. Project details 1. Create a class to...

  • Chapter 12 Patient Teaching 105 Part 3. Review Questions Circle the correct answer(s). In some questions,...

    Chapter 12 Patient Teaching 105 Part 3. Review Questions Circle the correct answer(s). In some questions, more than one answer is correct. Select all that 19. Tell the patiest to wait until you have fin- shed teaching before asking questions. relevance of the information presented Always ask the patient if he or she wants an 13. Which of the following is the best rationale for nurses 20. Adults learn best when they understand the to perform patient teaching? Patients are...

  • java In this project you will implement a trivia game. It will ask random trivia questions,...

    java In this project you will implement a trivia game. It will ask random trivia questions, evaluate their answers and keep score. The project will also have an administrative module that will allow for managing the question bank. Question bank management will include adding new questions, deleting questions and displaying all of the questions, answers and point values. 2. The project can be a GUI or a menu based command line program. 3. Project details 1. Create a class to...

  • Chapter 12 Patient Teaching 105 Part 3. Review Questions Circle the correct answer(s). In some questions,...

    Chapter 12 Patient Teaching 105 Part 3. Review Questions Circle the correct answer(s). In some questions, 19 more than one answer is correct. Select all that apply. 13. Which of the following is the best rationale for nurses Tell the patient to wait until you have fin ished teaching before asking questions. Adults learn best when they understand the relevance of the information presented Do not assume an interpreter will be needed. 20. to perform patient teaching? Patients are more...

  • I to a hot climate, you use the same technique. PART TWO DIRECTIONS: The questions below...

    I to a hot climate, you use the same technique. PART TWO DIRECTIONS: The questions below need a one or two-word answers. See terms in the box below for possible answers. Each answer is worth 1 pt. Use the reminders to help answer the questions. Focus on what is being asked. Reminders: 1) The 3 types of learning classical, operant and observational (social). 2) The terms from classical conditioning generalization, discrimination, extinction, spontaneous recovery, taste aversion and systematic desensitization. 3)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT