Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in Java Exercise 1 of 3: Assume you want to build a farm house. You are getting three offers to buy land. The three

Code in Java

Exercise 1 of 3:

Assume you want to build a farm house. You are getting three offers to buy land. The three pieces of land look as follows (measurements in yards):

image text in transcribed

Land 1 has a cost of $100 per square foot.

Land 2 has a cost of $125 per square foot.

Land 3 has a cost of $142 per square foot.

Calculate the costs to buy each land and print them in the console. (watch out, the measurements on the plan are in yards, while the given prices are per square foot!)

Exercise 2 of 3:

In mathematics, the Fibonacci numbers are the numbers in an integer sequence, called the Fibonacci sequence, and are characterized by the fact that every number after the first two is the sum of the two preceding ones:

image text in transcribed

The value of each number can also be expressed as:

image text in transcribed

Write a program that calculates the first 20 Fibonacci numbers and prints them to console. Then, of those twenty numbers, print only those numbers to console again, which are also prime numbers.

Exercise 3 of 3:

Using nested loops, write a program the prints the following patterns to console:

image text in transcribed

1z0 70 Land 1 30 50 100 120 40 50 50 70 50 Land 3 50 10 Land 2 20

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why are disruptive technologies tricky?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago

Question

Briefly explain the advantages of 'Management by Objectives'

Answered: 1 week ago

Question

Explain the various methods of job evaluation

Answered: 1 week ago

Question

7. Explain why retirees may be valuable as part-time employees.

Answered: 1 week ago