Sedang Disiapkan

Java Code - Need a application written... Very simple work.

Hello, I need a simple Java Code Written...

Please see below.

1. Write an application for a furniture company; the program determines the price of a table. Ask the user to choose 1 for pine, 2 for oak, or 3 for mahogany. The output is the name of the wood chosen as well as the price of the table. Pine tables cost $ 100, oak tables cost $ 225, and mahogany tables cost $ 310. If the user enters an invalid wood code, set the price to 0. Save the file as Furniture. java.

2. Write an application that can hold 10 integers in an array. Display the integers from first to last,the sum of the integers, and then display the integers from last to first. Save the file as IntArray. java.

3. Create an application named TestMethods whose main() method holds two integer variables and one double. Assign values to the variables. In turn, pass each value to methods named displayIt(), displayItTimesTwo(), and displayItPlusOneHundred(). Create each method to perform the task its name implies. Save the application as TestMethods. java.

4. Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables—a part number (type String), a part description (type String), a quantity of the item being purchased (type int) and a price per item (double). Your class should have a constructor that initializes the four instance variables. Provide a set and a get method for each instance variable. In addition, provide a method named getInvoiceAmount that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a double value. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0.0. Write a test application named InvoiceTest that demonstrates class Invoice’s capabilities.

5. Write a Java application that uses a counter-controlled loop to sum the integers in the range 1–10, then compute the average of those numbers (as an integer value). Display the sum and the average.

6. Modify your solution to Coding Exercise 5 so that a user can specify the range of numbers to average.

7. Write a Java application that uses a loop to read in 10 numbers and calculates and prints their sum.

Kemahiran: Javascript

Lihat lebih lanjut: java application furniture company program determines price table, write application calculates price table, write application can hold integers array, loop read numbers calculates prints sum average, need java code written, work values, test the application, test a javascript, java and company, java 1.5 for loop, java 1.5 for each, integers and, get in written, first code, cost of application, code get, java write application furniture company, write application furniture company java, get java, get code, coding in java, write application, wood company, type written, type code

Tentang Majikan:
( 24 ulasan ) Oak Lawn, United States

ID Projek: #1591263

Dianugerahkan kepada:

it2051229

Hi, I found you.

$10 USD / jam
(29 Ulasan)
4.3

2 pekerja bebas membida secara purata $13/jam untuk pekerjaan ini

samitXI

I m ready to start now. Thanks

$15 USD / jam
(13 Ulasan)
4.6