Create a class whose main method creates three arrays

Assignment Help Data Structure & Algorithms
Reference no: EM131270490

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.

Reference no: EM131270490

Questions Cloud

Describe the process of ecological succession : Discuss at least three solutions that would move our society towards more environmentally sustainable economies or "eco-economies" . Include your opinion of how at least one of these solutions could be applied locally.
Effectively evaluate the leading edge program : A Healthy Investment at Sisters of Charity Providence Hospital What outcomes should the hospital collect to determine how well their Leading Edge training program worked? What level(s) of evaluation should be used? From a practical perspective, how e..
Establishing a pricing strategy : Pricing is one part of the value equation in developing a marketing program. Discuss the methods available to marketers for establishing a pricing strategy. Analyze why each would be selected. Use at least one resource (cited in APA format) to sup..
Complete a truth table for the gate : A three-input AND-OR (AO) gate shown in Figure 1.42 produces a TRUE output if both A and B are TRUE, or if C is TRUE. Complete a truth table for the gate.
Create a class whose main method creates three arrays : Create a class whose main method creates three arrays. The first array will contain five kinds of flowers - petunia, pansy, rose, violet, and carnation.
Large scale bakery is laying out new production process : A large scale bakery is laying out a new production process for its packaged bread, which it sells to several grocery chains. it takes 12 minutes to bake the bread. how large of an oven is required so that the company is able to produce 4200 units of..
Real interest rate if people instead are risk averse : What net real interest rate will be charged to the borrower if people are risk neutral? What is the corresponding (net) nominal rate?What can you say about the level of the real interest rate if people instead are risk averse?
What ways have you kissed the earth with your feet lately : Which made me think of all of you and the journey we are on together to learn to preserve our beautiful planet. It also inspired me to share my favorite quote with you: "Walk as if you are kissing the earth with your feet" - Thich Nhat Hanh, Vietn..
Write java application that calculates the minimum for quiz : Write a Java application that calculates the minimum, maximum, and average for each quiz. Print the output results in a table format using a text area. Use loop and if statement control structures as well as Array data structure.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd