1. Homepage
  2. Programming
  3. CSC1034 Programming Portfolio 1 Assessment 2: Stock management and purchasing system.

CSC1034 Programming Portfolio 1 Assessment 2: Stock management and purchasing system.

Engage in a Conversation
NewcastleCSC1034Programming Portfolio 1Stock management and purchasing system.Python

2023/11/13 13:44 CSC1034 Assessment 2 2023: Programming Portfolio 1 - CSC1034 CourseNana.COM

CSC1034 Assessment 2 2023 CourseNana.COM

To develop your expertise in using Python. CourseNana.COM

Learning Outcomes CourseNana.COM

This coursework will enable you to practice the following skills:
To implement and test your own solution
Good programming practice e.g., good use of variable and method names
CourseNana.COM

Assignment CourseNana.COM

In this assignment, you will develop classes to demonstrate that you have learned and understood the module material, including: CourseNana.COM

1. Good use of object orientation
2. Validation of input
3. Using appropriate accessors and modifiers on instance variables (privacy) 4. Correct indentation
5. Good use of exception handling
6. Good use of variable names
7. The use of testing
8. Clear and appropriate use of code documentation
CourseNana.COM

The coursework is not algorithmically challenging. The focus is on good design and good practice. CourseNana.COM

The coursework is not about development of an end-user application. You are developing classes that could be used for the development of an application. You should not develop a graphical user interface (GUI) or a command line interface (CLI). They are not necessary, and you will be given no credit for doing so. CourseNana.COM

Note the system specified is a deliberate simplification. It is not an accurate model of real-world systems. Your solution should correspond to the simplicity of the specification. You risk losing marks if you attempt to provide a more realistic model or provide a solution that is more complicated than necessary. CourseNana.COM

As always, it is best to consider the design in detail before writing code in Python. It is important that you write your code incrementally and test it carefully before continuing to add additional functionality. CourseNana.COM

Specification CourseNana.COM

In this assignment, you will implement a simple stock management and purchasing system. Your system should provide the following functionality: CourseNana.COM

  1. A full list of all items and their details should be retrieved from the application. CourseNana.COM

    1. Item details include name (string), category (string), perishable (boolean), stock (int), and CourseNana.COM

      sell price (float) CourseNana.COM

    2. Ensure that the system does not allow negative values for stock or sell price CourseNana.COM

  2. Add, edit, and delete items.
    1. Ensure that the system does not to allow duplicate items i.e., two or more items should not
    CourseNana.COM

    have the same name. CourseNana.COM

  3. You should be able to search the application for items by (completely matching) category, CourseNana.COM

    perishable and sell price. This should return a list of all matches and their details. CourseNana.COM

  4. The system should be able to apply discount (int, e.g., 10 means 10% off) to a subset of CourseNana.COM

    existing items i.e., update the sell price
    1. Ensure that the system only allows discount values between 0% and 50%
    CourseNana.COM

  5. Allow the user to purchase existing items CourseNana.COM

    1. The system should notify the user of their total and update the stock when a purchase is CourseNana.COM

      successful i.e., only when there is available stock CourseNana.COM

    2. When the customer is a member, if they spend £50.00 or more, they get a 10% discount off CourseNana.COM

      the total price, else they get a 5% discount CourseNana.COM

  6. Store data in a file for subsequent re-use i.e., load/save data to/from csv file. CourseNana.COM

Tasks CourseNana.COM

To complete the system outlined above you will need to provide classes for the functionality described in this section. You must also test your solution. CourseNana.COM

Task 1 CourseNana.COM

You need to create an Item class. You are provided with a template to help you get started (see item.py in Canvas). Please DO NOT change the file name or the class and method signatures. CourseNana.COM

All Item objects have the following functionality: CourseNana.COM

A constructor that initialises the Item object
A method to get the name (string, e.g., “Strawberry Jam”)
A method to get the category (string, e.g., “Food”)
A method to get the sell price (float, e.g., 0.99)
CourseNana.COM

A method to determine if an item is equal to another item; if they are equal it returns true, else returns false. You should also implement the relevant hash method CourseNana.COM

Task 2 CourseNana.COM

You need to create a ItemManager class. You are provided with a template to help you get started (see item_manager.py in Canvas). Please DO NOT change the file name or the class and method signatures. CourseNana.COM

All ItemManager objects have the following functionality: def __init__(self, items=None): CourseNana.COM

A constructor that initialises the ItemManager object. The items parameter is optional. If the items value is not provided (i.e., None), then initialise the list of items objects to be an empty list, else, make use of the values found in the given list of item objects. CourseNana.COM

def get_items(self):
A method to return the list of item objects
CourseNana.COM

def __str__(self):
A string representation of the item manager
CourseNana.COM

def __repr__(self):
The formal string representation of the item manager
CourseNana.COM

def add_item(self, item):
This method adds an item to the item manager if it does not already exist
CourseNana.COM

def remove_item(self, item):
This method removes an existing item from the item manager
CourseNana.COM

def edit_item(self, old_item, new_item):
This method edits an existing item in the item manager
CourseNana.COM

This method returns a list of all items that completely matches the given perishable (boolean) value CourseNana.COM

This method updates the list of item objects. Specifically, it applies a discount (int, e.g., 10) to each existing item specified in names (list of strings). There is no return. CourseNana.COM

def purchase_available_items(self, names, is_member): CourseNana.COM

This method updates the list of item objects. Specifically, for each existing item specified in names (list of strings), it deducts 1 from the stock value. This method also returns the total cost the user must pay for their purchases. If the customer is not a member (i.e., is_member = False), then return the total as calculated. Else, the customer is a member (i.e., is_member = True) and the following rule must be applied; if they spend £50.00 or more, they get a 10% discount off the total price, else they get a 5% discount. CourseNana.COM

def load_from_file(self, file_name): CourseNana.COM

This method reads a csv file (as specified in file_name, string) of item details and adds them to the list of item objects. You are provided with some sample data to help you get started (see sample_data.csv in Canvas). CourseNana.COM

def save_to_file(self, file_name): CourseNana.COM

This method writes to a csv file (as specified in file_name, string) all item details found in the list of item objects CourseNana.COM

Task 3 CourseNana.COM

You should provide test cases for your classes. To do this you can use print statements. Note tests should be hard coded test cases i.e., do not use a CLI and/or GUI. You should test the normal case, boundary conditions, and exceptional cases. CourseNana.COM

Notes CourseNana.COM

Make sure that you use the Item and ItemManager classes provided for you.
You must not change the file names or the class and method signatures in the Item and ItemManager classes. You can add extra methods if needed.
You can allow your methods to throw an error where needed.
If we cannot test your implementation because you have changed the file name(s), or the class or method signature(s), then that corresponding task or method will score 0. CourseNana.COM

Mark Scheme CourseNana.COM

You will receive marks for:
The working functionality of your application (40%)
Clear and well written code (20%)
Evidence of correctness testing (20%)
Project documentation and good use of versioning (20%)
CourseNana.COM

Deliverables CourseNana.COM

Your coursework must be submitted to the NESS system by the deadline specified. Note that NESS imposes deadlines rigorously, and even work that is a few seconds late (e.g., because of network delays caused by students all submitting at the last moment) will be flagged as late. CourseNana.COM

You should submit to NESS a zip file containing the following: CourseNana.COM

Your Python project source code (i.e., item.py, item_manager.py and any additional .py files) CourseNana.COM

Your README.md file CourseNana.COM

Your .git directory CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
Newcastle代写,CSC1034代写,Programming Portfolio 1代写,Stock management and purchasing system.代写,Python代写,Newcastle代编,CSC1034代编,Programming Portfolio 1代编,Stock management and purchasing system.代编,Python代编,Newcastle代考,CSC1034代考,Programming Portfolio 1代考,Stock management and purchasing system.代考,Python代考,Newcastlehelp,CSC1034help,Programming Portfolio 1help,Stock management and purchasing system.help,Pythonhelp,Newcastle作业代写,CSC1034作业代写,Programming Portfolio 1作业代写,Stock management and purchasing system.作业代写,Python作业代写,Newcastle编程代写,CSC1034编程代写,Programming Portfolio 1编程代写,Stock management and purchasing system.编程代写,Python编程代写,Newcastleprogramming help,CSC1034programming help,Programming Portfolio 1programming help,Stock management and purchasing system.programming help,Pythonprogramming help,Newcastleassignment help,CSC1034assignment help,Programming Portfolio 1assignment help,Stock management and purchasing system.assignment help,Pythonassignment help,Newcastlesolution,CSC1034solution,Programming Portfolio 1solution,Stock management and purchasing system.solution,Pythonsolution,