Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Jim develops 5 Java applications a year. Joe develops 10 Java applications a yea

ID: 3549005 • Letter: J

Question

Jim develops 5 Java applications a year. Joe develops 10 Java applications a year. Jim gets paid $5000.00 per application, but Joe gets paid $10000.00 per application.


1.) What type of equation would you create to determine how much either Joe or Jim makes separately? What equation is needed in Java (ignoring the $ symbol)? What data type is needed need for this equation?


2.) What type of equation would you create to determine the combined total of Joe and Jim's worth? What is the equation in Java? What would be an incorrect way of writing this equation (think parentheses)?

Explanation / Answer

Number of applications developed by Jim per year = 5

Number of applications developed by Joe per year = 10

Payment Jim gets per application = $5000.00

Payment Joe gets per application = $10000.00


1]

since the numbers are in decimal format we should use double or float data types

amount made by Jim = Number of applications by him * Payment per application

                                       = 5*5000.00 = 25000.00 $

amount made by Joe = Number of applications by him * Payment per application

                                        = 10*10000.00 = 100000.00$

in JAVA


jim.amount = jim_applications*payment_jim ;

joe.amount = joe_applications*payment_joe ;


2]


combined total = (Number of applications by Jim*Payment per application+

                                                                        Number of applications by joe*Payment per application)

                            = 5*5000.00 + 10*10000.00

                            = 125000.00$


in JAVA


total = jim_applications*payment_jim + joe_applications*payment_joe ;


it would be considered an error if it is taken as


total = (jim_applications*payment_jim + joe_applications*)payment_joe ;


this will give wrong answer as parenthesis are not matched properly

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote