Practical e-commerce abstract class application

J

Justin Dutoit

Hi folks! I posted this question earlier and got some good responses, but
not the e-commerce application I was hoping for.
To help me in learning, could someone give a practical, reasonably advanced,
example of when an abstract class might be used in a home shopping app like
amazon.com for example. I'd like to learn by creating an abstract class and
a class that inherits from it, but I'd need a case where an abstract class
fits the situation, a very common everyday situation.

Tks
Justin Dutoit
 
A

Arne Vajhøj

Justin said:
Hi folks! I posted this question earlier and got some good responses, but
not the e-commerce application I was hoping for.

There are not really any connection between a language feature
as abstract classes and the type of application.

An abstract Employee class with concrete sub classes could
be used in an ecommerce app, in an ERP app, in a CRM app,
in a social web site app, in practically any type of app.

Arne
 
J

Jeff Louie

OK Justin. Try this challenge. Write a type safe unit library for weight
providing
concrete classes Kilogram and Pound, abstract classes Metric and
English, and
an abstract root class that provides unit conversions with getters and
setters
and implements IFormattable and IComparable. Usage:

Kilogram k= new Kilogram(someValue);
CalculateEnglishShipping(Weight w) { // library supports covariance
Pound p= w.Pound;
...
}

This is not a trivial project :)

Regards,
Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top