Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

MIS 306 Managerial Applications Using Object Oriented Programming 11 Assignment 1 Due Date: Monday 10th of Jan., 2020 Part 1 Create the class Flower that

image text in transcribed

MIS 306 Managerial Applications Using Object Oriented Programming 11 Assignment 1 Due Date: Monday 10th of Jan., 2020 Part 1 Create the class Flower that has the following members: Data members: a. name b. price Methods a. Add the default constructor. That set the data members to empty string, 0. c. Add the method toString which returns a string representing a Flower. d. Add a method comparePrice of the flower with another flower. Hint: this method takes an object another flower. The method returns 1 if this flower (caller) is more expensive, returns -1 if this flower is less expensive than the other flower, and returns O if their prices are equals. Part 2 Write the MainApp contains the main method) that uses the class Bucket as follows: e. Declare a list "Bouquet" which is an ArrayList of flowers. b. Ask the user to enter the flowers' details to be added to the Bouquet. Use JOptionPane input dialog for your readings. After adding a flower to the Bouquet, your program must ask the user whether more flowers to be added. Use a confirm box to get the user answer. Your program must keep adding flowers while the user wishes to add more. c. Print the Bouquet and the total price to the user using JOptionPane message

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago