the program is to print a bill using two classes-customer and item.... in class customer, members are itemname and customer name.in item, members are itemname itemcode,itemprice,noof items...and functions to calculate bill and update stock.
iam in confusion with the logic.....i think that it can be done by using nested class???
meby mathew 0 Newbie Poster
Recommended Answers
Jump to Posti think that it can be done by using nested class???
.
... and then apply inheritance in your classes.
No to both; you've already been told which classes to write, and there is no inheritance relationship involved:
the program is to print a bill …
Jump to PostOk, so inheritence can have a "Is a"/"Can Be" relationship so obviously "Customer" {is a} "Item" wouldn't work
Right, that's what an inheritance relationship would mean.
however, association could be used, surly? Customer {can have} "Item" relationship would, IMO anyway..
That's certainly a possibility. But that …
All 5 Replies
np complete 8 Newbie Poster
gusano79 247 Posting Shark
Geli19 0 Newbie Poster
phorce 131 Posting Whiz in Training Featured Poster
gusano79 247 Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.