首页 > > 详细

C++辅导 库存销售管理系统 Object Oriented Development讲解C/C++编程


Introduction
Requirement
Assignment 2
SIT771 Object Oriented Development
(Trimester 2, 2016)
Assignment 3 (100 marks, weight 10%)
Due Date: Friday, 30 September, 2016 (11:59pm AEST).
Work submitted late without documented approval of the Unit Chair will be penalised.
Assignments that are submitted after the submission date will be subject to mark penalty equal
to 10% of the marks per day of the marks available for the piece of work, up to and including
three days after the published due date. Assignments submitted more than three days after the
published submission date will not be marked.
This assessment task must be completed individually, no group work is permitted.
All work completed/submitted as part of this assessment task must be your own, individual work
Any content drawn from other materials ,including unit materials, must be clearly quoted where
appropriate, and/or clearly referenced. All students should review and be familiar with the
content provided by the University regarding how to reference other materials:
And in particular the information provided regarding Academy Integrity:
Unit Learning Outcomes
ULO1 Analyse and develop the system requirements using the C++ programming
language
GLO1, 2
ULO2 Implement the object-oriented concepts of the abstraction, encapsulation and be
able to extend its functionality
GLO1, 2, 3
ULO3 Design object-oriented applications and illustrate their architecture using UML
diagrams
GLO1, 2, 3, 4
ULO4 Refine the relationships between class and objects in the system and illustrate
how they are applied concepts of polymorphism
GLO1, 2, 3, 4, 5
ULO5 Create and apply the template method and class for the system re-use ability
in object-oriented programming and C++
GLO1, 2, 3, 4, 5
Introduction
This assignment will get you familiar with applying the polymorphism, template and error
Handling in C++ Object-Oriented Programming. You are required to write a program to track a
Book Store Inventory System. The solution should have the following features:
- Reuse the Author, StockItem, Transaction, and SalesRegister class from Assignment 2
Solutions;
- Convert/cast different type in the inheritance hierarchy for StockItem, GeneralItem and
BookItem, and SalesRegister;
- Create the operator overloading functions;
- Using template list class and function;
- Apply error handling in C++ calling style. for the following template function to output
any object data as string data type.
#include
#include
template
string ToString (const T Data)
{
ostringstream Ouputdata;
Ouputdata GetDescription() AddTransaction(Transaction(text1, 2));
//monday->AddTransaction(Transaction(text1, 1));
try { monday += Transaction(text1, 2); }
catch (string err) { cout GetDescription() AddTransaction(Transaction(text3, 1)); }
catch (string err) { cout AddTransaction(Transaction(text2, 2)); }
catch (string err) { cout AddTransaction(Transaction(text1, -2)); }
catch (string err) { cout GetDescription() AddTransaction(Transaction(text1, 1)); }
catch (string err) { cout AddTransaction(Transaction(text3, 1)); }
catch (string err) { cout GetDescription() AddTransaction(Transaction(text3, -2)); }
catch (string err) { cout AddTransaction(Transaction(text2, 1)); }
catch (string err) { cout AddTransaction(Transaction(item, 4)); }
catch (string err) { cout GetDescription() AddTransaction(Transaction(text1, 1)); }
catch (string err) { cout AddTransaction(Transaction(text2, 1)); }
catch (string err) { cout SetDescription(“Total Sales - Friday July 8, 2016”);
//total->AddTransaction(monday->GetCount(), monday->GetList());
try { total->AddTransaction(tuesday->GetCount(), tuesday->GetList()); }
catch (string err) { cout AddTransaction(wednesday->GetCount(), wednesday->GetList()); }
catch (string err) { cout AddTransaction(thursday->GetCount(), thursday->GetList()); }
catch (string err) { cout AddTransaction(friday->GetCount(), friday->GetList()); }
catch (string err) { cout PrintReport();
cout PrintReport();
text2->PrintReport();
text3->PrintReport();
item->PrintReport();
return(0);
}
Required Output
Absolute C++ - Invalid 2008 published!!! Re-set to default this year 2016
Monday July 4, 2016
2 @ $ 130.00 - Absolute C++
1 @ $ 130.00 - Absolute C++
Tuesday July 5, 2016
1 @ $ 114.00 - Operating System Concepts
2 @ $ 88.00 - Simple Program Design
Absolute C++ - has negative Sold Quantity 1 - Reset to Default a single sold item
1 @ $ 130.00 - Absolute C++
Wednesday July 6, 2016
1 @ $ 130.00 - Absolute C++
1 @ $ 114.00 - Operating System Concepts
Thursday July 7, 2016
Operating System Concepts - has negative Sold Quantity 1 - Reset to Default a single sold item
0 is higher the available 0 quantity - it will reset to available ONLY
1 @ $ 88.00 - Simple Program Design
3 is higher the available 3 quantity - it will reset to available ONLY
3 @ $ 9.60 - 2016 Diaries
Friday July 8, 2016
1 @ $ 130.00 - Absolute C++
1 @ $ 88.00 - Simple Program Design
Daily Book Sold Report:
=======================
Report for Monday July 4, 2016
Total Register Sales: $ 390.00
Total Register Cost: $ 300.00
Daily Average Register Profit: $ 30.00
Report for Tuesday July 5, 2016
Total Register Sales: $ 420.00
Total Register Cost: $ 355.00
Daily Average Register Profit: $ 16.25
Report for Wednesday July 6, 2016
Total Register Sales: $ 244.00
Total Register Cost: $ 195.00
Daily Average Register Profit: $ 24.50
Report for Thursday July 7, 2016
Total Register Sales: $ 116.80
Total Register Cost: $ 104.00
Daily Average Register Profit: $ 3.20
Report for Friday July 8, 2016
Total Register Sales: $ 218.00
Total Register Cost: $ 180.00
Daily Average Register Profit: $ 19.00
Report for Total Sales - Friday July 8, 2016
Total Register Sales: $ 1388.80
Total Register Cost: $ 1134.00
Daily Average Register Profit: $ 16.99
Current Inventory Stock Report:
**
4 @ $ 130.00 - W. Savitch - Absolute C++ - Addison/Wesley 3/e ed., 2016
- Total Purchased: 10 @ Cost: $ 100.00
- Total Sold: 6 @ Markup: % 30.00
1 @ $ 88.00 - L.A. Robertson - Simple Program Design - Thomson 6/e ed., 2010
- Total Purchased: 5 @ Cost: $ 80.00
- Total Sold: 4 @ Markup: % 10.00
0 @ $ 114.00 - A. Silberschatz, P. B. Galvin, and G. Gagne - Operating System Concepts -
John Wiley Sons 9/e ed., 2015
- Total Purchased: 2 @ Cost: $ 95.00
- Total Sold: 2 @ Markup: % 20.00
0 @ $ 9.60 2016 Diaries
- Total Purchased: 3 @ Cost: $ 8.00
- Total Sold: 3 @ Markup: % 20.00
Submissions
1. Files for the Author, StockItem, GeneralItem, BookItem, Transaction and
SalesRegister classes which contains the declaration of the class where the UML
data members and methods/functions implemented the definition of the header
or/and cpp (i.e. executable code);
2. The Assignment3.cpp file that contains a main() method, performing the above
tasks by invoking methods in the structures of the Book Store Inventory.
3. Completed electronic assignment cover sheet.
Additional Requirements and Notes
1. All code files must contain a comment at the top with the following information:
o Your name and student ID number;
o Which assignment the code is written for;
o A general comment describing the code contained within that file;
o Any reference materials that were used in building your solution.
2. All code should be adequately commented such that another programmer can
understand your code quickly. In particular,
o You should describe any attributes by indicating what they are used for
and how they should be manipulated;
o Any methods should be described by indicating their purpose and
a description of their functionality (how they work);
o Each parameter and return value should be described; and
o Entire assignment should be compiled and run properly in the Tera Term
Pro c++ without syntax errors.
3. The Faculty electronic assignment cover sheet is available on CloudDeakin and
must be completed and submitted with your assignment.
4. Any text or code adapted from any source must be clearly labelled and referenced.
You should clearly indicate the start and end of any such text/code.
5. All assignments must be submitted through CloudDeakin. Assignments will not be
accepted through any other manner without prior approval. Students should
note that this means that email and paper based submissions will ordinarily be
rejected.
6. Submissions received after the due date will be penalized at a rate of 10% per day.
Assignments that are submitted three days after the due date will NOT be assessed.
7. To apply for an assignment extension, the assignment extension form. (found on
CloudDeakin) must be completed and submitted to the lecturer responsible for
your assessment prior to the due date. Applications on or after the due date will
only be considered where students can demonstrate that it was impractical to
apply otherwise.
8. Your attention is drawn to the Plagiarism Statement (available in the folder
Academic Honesty on CloudDeakin). Anyone using cut-and-paste or copying other
people’s work will be easily detected; the outcome is a disciplinary committee
hearing.
Assessment Guide
1. Implement correctly the StockItem class /10
2. Implement correctly the GeneralItem class /12
3. Implement correctly the BookItem class /17
4. Implement correctly the Transaction class /10
5. Implement correctly the SalesRegister class /23
6. Apply appropriate Try-Catch methods for the Error Handling /08
7. Comments describing the program code.
Comments are required for each statement of the program.
/10
8. Program performance correctly and appropriate output formatting.
Whether the required tasks can be performed correctly?
/10
Total /100

 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!