Retail System

Problem statement

A retail application store wants to automate the system of purchase of items by customers and the billing process.The automation involves the maintenance of customers,purchase of items by customer and billing of items.Customers can be regular visitors to the store in which case they are eligible for discounts based on the bill amount .The customers can also be privileged ones ,wherein they are given membership cards(Platinum,Glod and Silver).Such customers sre eligible for gifts based on the type of membership card.The Bill calculation involves the logic of computation of the bill depending on customer type .The cunstomer can pay the bill through credit card or cash. In the former case,two percent processing charge is applicable .Sales tax is also applicable on the final bill amount.

The store wants to pilot the system where the purchase involves only one item.Maintenance of items and supplier details are not taken up in the pilot.

问题描述:

一个零售商店想要把顾客购买商品以及付款流程进行自动化.这个自动化程序涉及到客户的维护,客户购买的物品,物品的账单.顾客可以是商店的常规的访问者,而在这种情况下,他们有资格根据账单的数量享受一些折扣.顾客也可以有一些享受特权的,他们被给予会员卡(Platinum,Glod and Silver).这种顾客根据卡的类别有资格获得一些礼物.账单的计算涉及到账单根据顾客卡类型的逻辑计算。顾客可以通过信用卡或者现金来付款。在顾客使用信用卡付款的时候,百分之二的手续费需要收取。销售的税同样需要根据最后的账单。

这个商店想试用这个系统,仅考虑购买时只涉及一个物品。物品的维护和提供者的详细信息在试用时不考虑。

一、Structured Programming Approach

Consider the Retail store application ,describe the functionality of the system.

1.Customer maintenance

  • Add a new Customer
  • Update the details
  • Customer Report

2.Item Purchase

  • Calculate Bill
  • Report

3.Billing of Items (Item Purchase  which involves)

  • Discount calculation
  • Printing of Bill

PS

The focus is on the functionality -This is the structured approach

Advantages

  • Each functionality is clearly defined
  • The functionality  has been sub-divided
  • A particular functionality may be changed without affecting the others

二、Object Oriented Approach

1.Consider the following details of a customer being stored -

Customer details :

Customer Id

Customer Name

Telephone No

Address

2.What are the actions that are possible on this  Customer data?

Customer actions

Add Customer

Update details

Display details

PS

The focus is on the objects and their behavior - This is the object oriented approach

Advantages-

  • Helps create reusable components- ex. The customer component can be reused while there is a purchase of items by customer
  • Extends and builds upon the structured programming paradigm
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值