subject
Computers and Technology, 31.10.2020 23:10 jor66

Java Eclipse homework. I need help coding this Project 5A - Mixed Results

package: proj5A
class: MixedResults

Create a new project called MixedResults with a class called Tester. Within the main method of Tester you will eventually printout the result of the following problems. However, you should first calculate by hand what you expect the answers to be. For example, in the parenthesis of the first problem, you should realize that strictly integer arithmetic is taking place that results in a value of 0 for the parenthesis.

double d1 = 37.9; //Initialize these variables at the top of your program
double d2 = 1004.128;
int i1 = 12;
int i2 = 18;

Problem 1: 57.2 * (i1 / i2) +1
Problem 2: 57.2 * ( (double)i1 / i2 ) + 1
Problem 3: 15 – i1 * ( d1 * 3) + 4
Problem 4: 15 – i1 * (int)( d1 * 3) + 4
Problem 5: 15 – i1 * ( (int)d1 * 3) + 4

Your printout should look like the following:

Problem 1: 1.0
Problem 2: 39.13333333333333
Problem 3: -1345.39999999999
Problem 4: -1337
Problem 5: -1313

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
What do character formats do for your document's message? a.set the tone b.provide organization c.provide clarity d.set how texts align with documents
Answers: 2
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
You know the right answer?
Java Eclipse homework. I need help coding this Project 5A - Mixed Results

package: proj...
Questions
question
Mathematics, 09.04.2021 18:00
question
History, 09.04.2021 18:00
question
Mathematics, 09.04.2021 18:00
Questions on the website: 13722362