Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ge manufacturer; / / Line 2 0 quantitiesInStock; / / Line 2 1 ble price; / / Line 2 2 ble discount; / / Line

ge manufacturer;
//Line 20
quantitiesInStock;
//Line 21
ble price;
//Line 22
ble discount;
//Line 23
//Line 24
Give the line number containing the constructor that is executed in each of the following declarations.
i. productType productl;
ii. productType product2("Microwave","M3562",
"GeneralPool", 35,175.00,0.1);
iii. productType product3("D1290",25,375.00,0.05);
iv. productType product4(10,8.50,0.2;
rite the definition of the constructor in Line 4 so that the instance variables are initialized to "","'","",0,o.o, and o.o, respectively. bles quantitiesInStock, price, and discount must be nonnegative.
rite the definition of the constructor in Line 6 so that the instance variables productName and manufacturer are initialized to the empty string, instance variable id is initialized legative. negative.
3] No file chosen
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

What are the advantages of working with someone like Neil? P-6587

Answered: 1 week ago

Question

You have

Answered: 1 week ago