28 731
Assignments Done
97,5%
Successfully Done
In August 2015
Your physics homework can be a real challenge, and the due date can be really close - feel free to use our assistance and get the desired result.
Be sure that math assignments completed by our experts will be error-free and done according to your instructions specified in the submitted order form.

# Java | JSP | JSF – Q&A

795Questions:

### Search & Filtering

Write a program that models a snail ranch, as follows.

+REPRODUCTION_RATE : int = 100 {readOnly}
+BASE_POPULATION : int = 200 {readOnly}
-population : int

+SnailRanch(population : int)
+getPopulation() : int
+breed() : void
+harvest() : int

getPopulation() returns the current population, breed() causes the snails to breed
harvest() harvests the snails, returning the yield, the number of snails that could be harvested,
reducing the population to no lower than BASE POPULATION

REPRODUCTION RATE is the number of children per pair of snails
BASE POPULATION is the number of snails to be left in the ranch after a harvest, population is the current population of the ranch
SnailRanch(int) is a constructor that establishes a ranch with an initial population

Implement a Main class that reads a file of events and prints the events, the current
population after each event, and after all events have occurred, prints the total yield from the ranch.The name of the file of events will be supplied as a command line argument.

if the file txt contains these events:
stock 100
breed
breed
harvest
breed
harvest

then a run of the program would look like this:
$java Main log.txt stock 100 breed 5100 breed 260100 harvest 200 breed 10200 harvest 200 total yield = 269900$
The first event will always be "stock" with the initial population of the ranch.
1. Assume that hot dogs come in packages of 10, and hot dog buns come in packages of 8. Write a program called cookout.js, that calculates the number of packages of hot dogs and the number of packages of hot dog buns needed for a cookout, with the minimum amount of leftovers. The program should assume there will be 525 people attending the cookout and each person will eat 3 hot dogs. The program should display the following details.

The minimum number of packages of hot dogs required.

The minimum number of packages of hot dog buns required.

The number of hot dogs that will be left over.

The number of hot dog buns that will be left over.
One acre of land is equivalent to 43,560 square feet. Write a program called land_calculation.js that calculates the number of acres in the a tract of land based on the total square feet in a tract of land. Use a literal value of 348,480 for the total square feet.
A company has determined that its annual profit is typically 23 percent of total sales. Write a program called sales_prediction.js, that displays the profit based on the project amount of total sales for the year. Use a literal value of $2,500,000 for the projected total sales amount. Display the profit amount formatted to two decimal places A customer in a store is purchasing five items. Write a program called total_purchase.js that creates five items with literal numeric values. The prices of the items should be as follows: item 1:$9.99

item 2: $5.99 item 3:$.99

item 4: $59.50 item 5:$.25
This is a UML class diagram using Java syntax for the members. It is a summary of the design. The full details will follow.
AccountNumber
private int[] digits
public AccountNumber(boolean random)
public String toString()
public static AccountNumber fromString(String number)
private int checksum()

This version uses UML syntax for the members.
AccountNumber
-digits : int[]
+AccountNumber(random : boolean)
+toString() : String
+fromString(number : String) : AccountNumber
-checksum() : int

Fields
private int[] digits

Constructors
public AccountNumber(boolean random)

Methods
public String toString()
public static AccountNumber fromString(String number)
private int checksum()

Implement AccountNumber.checksum() and the constructor and test it with a program that generates random, valid account numbers. Use a command line argument to specify how many numbers to generate, as follows:
$javaGenerate 2(2 lines) 24568231 13789425 Each class must have private instance fields that store the specific shapes dimensions. Each class must have a constructor that supplies the dimensions. Each class must have an area() function. Each class must have a toString() function that returns strings like these, as appropriate: ∗ triangle (base = 1.00, height = 2.00) ∗ rectangle (width = 1.00, height = 1.00) ∗ square (side = 1.00) ∗ circle (radius = 1.00) All numbers are rounded to two decimal places. Write a Main class that works like this:$ java Main
?triangle 1.0 2.0
Area of triangle (base = 1.00, height = 2.00) = 1.00
? rectangle 1.0 2.0
Area of rectangle (width = 1.00, height = 2.00) = 2.00
? square 1.0
Area of square (side = 1.00) = 1.00
? circle 1.0
Area of circle (radius = 1.00) = 3.14
? quit
$It does not need to handle bad user input. Hint: Your Main class will be simpler if you exploit inclusion polymorphism. Have a single variable of type Shape, instead of many variables with different types. This is a UML class diagram using Java syntax for the members. It is a summary of the design. The full details will follow. AccountNumber private int[] digits public AccountNumber(boolean random) public String toString() public static AccountNumber fromString(String number) private int checksum() This version uses UML syntax for the members. AccountNumber -digits : int[] +AccountNumber(random : boolean) +toString() : String +fromString(number : String) : AccountNumber -checksum() : int Fields private int[] digits Constructors public AccountNumber(boolean random) Methods public String toString() public static AccountNumber fromString(String number) private int checksum() Implement AccountNumber.checksum() and the constructor and test it with a program that generates random, valid account numbers. Use a command line argument to specify how many numbers to generate, as follows:$ java Generate 2
342 111 920 50
273 960 195 72
$An AccountNumber object will store one Destiny Energy (DE) account number. This is a UML class diagram using Java syntax for the members. It is a summary of the design. The full details will follow. AccountNumber private int[] digits public AccountNumber(boolean random) public String toString() public static AccountNumber fromString(String number) private int checksum() This version uses UML syntax for the members. AccountNumber -digits : int[] +AccountNumber(random : boolean) +toString() : String +fromString(number : String) : AccountNumber -checksum() : int Fields private int[] digits Constructors public AccountNumber(boolean random) Methods public String toString() public static AccountNumber fromString(String number) private int checksum() Implement AccountNumber.toString() and test it as follows:$ java Test1
000 000 000 00
\$
Build a project. This project is a web-based online shopping application developed in JAVA LANGUAGE using Java as front end. The main aim of “ONLINE SHOPPING” is to improve the services of Customers and vendors. It maintains the details of customer payments, product.
More subjects:
Everything worked out great
Lee on March 2014
Pay us safely via PayPal
We deliver professional assignment and homework help for students in USA, UK, Canada, Australia, AE and all over the world.