In my book, it had the code
public RetailItem(String desc,int itemNumber,
double wholesale, double retail)
{
description=desc;
ItemNumber=itemNumber;
cost=new CostData(wholesale, retail);
...
Type: Posts; User: fahman_khan75@yahoo.com
In my book, it had the code
public RetailItem(String desc,int itemNumber,
double wholesale, double retail)
{
description=desc;
ItemNumber=itemNumber;
cost=new CostData(wholesale, retail);
...
I’m trying to simplify my constructor by using “this” reference variable. I’m aware how to use this reference when making constructors that involve fields of primitive data types; however, not so...