Answer to Question #58335 in C++ for jonney

Question #58335
Take the following interfaces for an article respectively a shop selling articles:
class Article // an article
{
public:
virtual Identifier getId() = 0; // its identifier
};
class Shop // a shop
{
public:
// number n of articles in shop
virtual int numberOfArticles() = 0;
// get article i, 0 <= i < n
virtual Article* getArticle(int i) = 0;
};
Write a method
set<Identifier> getArticleIds(Shop& s);
which takes a shop s as parameter and returns as its result the set of the identifiers of all
articles contained in s.
1
Expert's answer
2016-03-07T08:40:25-0500
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-58335.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS