Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Create a class whose main method creates three arrays. The first array will contain five kinds of flowers - petunia, pansy, rose, violet, and carnation. The second array will contain the cost of each flower, respectively, 50 cents, 75 cents, $1.50, 50 cents, and 80 cents per flower. The third array will contain the number of flowers in stock of 5, 0, 10, 3 and 15. The main() method will call the readInput() method which will request that the user enter the desired flower. If the flower is not within the first array and message will appear and the program will end. If the flower is in a array, the user will be prompted to enter the number of flowers. If the user enters a number less than one, they will be requested to reenter the number of flowers until they enter a number greater than zero.

After all requirements are met for the input, the readInput() method will call the checkStock() method. This method will check to see if the number of flowers entered was in stock. A message will display if there are enough in stock.

Once the sale is complete the type of flower, number of flowers, and the total cost will display.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92025220
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Assignment -question 1 - go-back-n in the following network

Assignment - Question 1 - (Go-Back-N) In the following network, node A transmits packets that pass through B and C, and arrive at the destination D. The bit rate of all links is R = 1 Mbit/sec. The maximum packet size in ...

Patient patientid familyname givenname address suburb state

PATIENT (PatientID, FamilyName, GivenName, Address, Suburb, State, PostCode) DOCTOR (ProviderNo, Name) ITEM (ItemNo, Description, Fee) ACCOUNT (AccountNo, ProviderNo, PatientID, TreatmentDate) ACCOUNTLINE (AccountNo, Ite ...

Question how is inventory management helpful in the scope

Question: How is inventory management helpful in the scope and structure of operations management? Note: Given paragraphs are for reference purpose. Structure and Scope of Operation There are three aspects of operations ...

Wat type of malware do you think is the most destructive

What type of malware do you think is the most destructive : viruses, worms, trojan programs, spyware or adware.

Computer sciencewhat is required of an organization to

Computer Science What is required of an organization, to implement and maintain IT Governance? What outside resources are available to assist technology managers in the implementation and maintenance process?

In unix programming ordinarily the exec system call follows

In UNIX programming, ordinarily the exec() system call follows the fork() call. Explain what would happen if a programmer were to inadvertently place the call to exec() before the call to fork().

Given a list of numbers l a value x is said to be a

Given a list of numbers L, a value x is said to be a majority value if the value of over half the elements in L is x; in other words, if L has n elements and nx is the number of elements in L with value x, then x is a ma ...

Question suppose users share a 2 mbps link also suppose

Question : Suppose users share a 2 Mbps link. Also suppose each user transmits continuously at 1 Mbps when transmitting, but each user transmits only 20 percent of the time. When a circuit switching is used, how many use ...

Question how will you create the cicd process for this

Question: How will you create the CI/CD process for this application? Propose the tools, technologies required to achieve CI/CD in general. The response must be typed, single spaced, must be in times new roman font (size ...

Question the redblue computation simulates two interactive

Question : The Red/Blue computation simulates two interactive flows: an n × n board is initialized so cells have one of three colors: red, white, and blue, where white is empty, red moves right, and blue moves down. Colo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As