Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

ITECH6401 Enterprise Programming Assignment 1 – Individual Assignment OverviewThis assignment requires you to analyse a problem and to design and implement a solution. The tasks require you to...

1 answer below »
ITECH6401 Enterprise Programming Assignment 1 – Individual Assignment OverviewThis assignment requires you to analyse a problem and to design and implement a solution. The tasks require you to demonstrate your understanding of the programming concepts covered in Weeks 1-4 of the course: Setting the foundations and a brief introduction to the course and to the Java programming language, and Exceptions, I/O and Multithreading. Timelines and ExpectationsPercentage Value of Task: 15% Due: Thu, May 11, XXXXXXXXXX:00 (Week 8) Minimum time expectation: 10 hoursLearning Outcomes Assessed K1. Describe elements of a common object-oriented programming language suitable for web based application development S3. Develop applications involving complex component technology A1. Design and implement technical solutions addressing connectivity between components Assessment Details Consider a company YYY sells electronics products online. There are three categories of products they sell, namely (i) Mobile Phone, (ii) Camera and (iii) Tablets. The following table lists the product descriptions that are stored for each individual product type.Mobile Phone Camera Tablets Warranty Warranty Warranty Brand Name Brand Name Brand Name Screen Size Screen Size Screen Size Storage Pixels Count Storage Colour Operating SystemTask 1: Create an appropriate hierarchy of classes using Inheritance. Place the product description fields in super class or subclass, where it is appropriate. Define constructors and proper get and set methods for all the fields.The company YYY maintains a stock of their products. It imposes restrictions on the quantity of each individual product they stock as well as an overall restriction on the total number of products they can store. While stocking the products in the storage, they maintain a digital repository. The repository is populated using a file. Create a file “Stocks.txt” as the template for populating the repository. Example entries in “Stocks.txt” could be:
CRICOS Provider No. 00103D XXXXXXXXXXITECH6401 Assig 1 Sem 8 20 XXXXXXXXXXPage 2 of 4For mobile Phone: (1, 2, “HTC”, 5.4, 64, “Gold”, 50) Here, 50 represents the quantity of HTC phone with the specification of two years warranty, 5.4inch screen size, 64 GB storage and the colour Gold. 1 represents the product category (mobile phone).Task 2: Define a class “Stocks” whose object can be used as the repository. Moreover, define an Interface “StockLimit” that will define the minimum and maximum number of each products and the minimum and maximum number of total stock that YYY can store in its repository.Task 3: Define a method to read the text file “Stocks.txt” and generate objects of the corresponding type of product using the corresponding classes’ constructor. You are to create as many objects as indicated by “Quantity” in “Stocks.txt”.Now, consider a file “Order.txt” where customers’ orders are assumed to be recorded. Order entries look like: (1, 10) which represents “remove 10 mobile phones from the current repository”. Here, for simplification products are only recognised by the category, not by the brand name or any other specifications (Screen Size, Storage, Colour etc.).Task 4: Define a method to read the text file “Orders.txt” and adjust (decrease) the quantity of objects of the corresponding type of product.Task 5: Maintain the current level of stocks for each element while creating the stocks or consuming the ordered products and check it with the maximum or minimum limit (as defined in Task 2). Moreover, define an exception class “StockLimitException” and throw it when the total maximum stock limit is reached to abort further attempt to create product objects. Similarly, throw such exception when consuming the ordered items from the current repository, and stop removing the products if the minimum limit is reached. Also, include appropriate try-catch block.Task 6: Save the current repository in a file (ex., “Repository.txt”). Create one record for each product in your digital repository and write the quantity field as 1.Task 7: Define an appropriate test class with main function to demonstrate the functionalities of your code. Create two stocks file and two order files and interleave task 3 and 4 to demonstrate that your program can handle the alternating stocking and removing. Also, your test cases should create scenarios that trigger the exceptions.SubmissionYour assignment should be completed according to the General Guidelines for Presentation of Academic Work. The following criteria will be used when marking your assignment: • successful completion of the required tasks • quality of code that adheres to the programming standards for the course including: • comments and documentation • code layout • meaningful variable names • use of constants
CRICOS Provider No. 00103D XXXXXXXXXXITECH6401 Assig 1 Sem 8 20 XXXXXXXXXXPage 3 of 4You are required to provide documentation, contained in an appropriate file, which includes: • a front page - indicating your name, a statement of what has been completed and acknowledgement of the names of all people (including other students and people outside of the university) who have assisted you and details on what parts of the assignment that they have assisted you with • Name of the classes and Interfaces, their variables and methods in tabular format. Use the following format to populate the tables.Class Name: Brief Description for creating the class: Variable Names: Scope of the Variable: Method Name: Parameter list and Return types:• list of references used (APA style); please specify if none have been used.Using the link provided in Moodle, please upload the following in one zip file as directed by your lecturer.FeedbackAssessment marks will be made available in fdlMarks, feedback to individual students will be provided via Moodle or as direct feedback during your tutorial class.Plagiarism:Plagiarism is the presentation of the expressed thought or work of another person as though it is one's own without properly acknowledging that person. You must not allow other students to copy your work and must take care to safeguard against this happening. More information about the plagiarism policy and procedure for the university can be found at: http://federation.edu.au/students/learning-and-study/online-help-with/plagiarism.Your support material must be compiled from reliable sources such as the academic resources in Federation University library which might include, but not limited to: the main library collection, library databases and the BONUS+ collection as well as any reputable online resources (you should confirm this with your tutor).Federation University General Guide to Referencing:The University has published a style guide to help students correctly reference and cite information they use in assignments. A copy of the University’s citation guides can be found on the university’s web site. It is imperative that students cite all sources of information. The General Guide to Referencing can be purchased from the University bookshop or accessed online at: http://federation.edu.au/library/resources/referencingMarking Criteria/RubricStudent ID: _______________________ Student name: ________________________________
CRICOS Provider No. 00103D XXXXXXXXXXITECH6401 Assig 1 Sem 8 20 XXXXXXXXXXPage 4 of 4
Answered Same Day May 01, 2020 ITECH6401

Solution

Snehil answered on May 05 2020
138 Votes
Camera.java
Camera.java
public class Camera extends Product
{
    private int numPixels;
    public Camera(int wa
anty, String 
and, float screenSize, int numPixels)
    {
        super(wa
anty, 
and, screenSize);
        this.numPixels = numPixels;
    }
    public int getNumPixels()
    {
        return numPixels;
    }
    public void setNumPixels(int numPixels)
    {
        this.numPixels = numPixels;
    }
}
Mobile.java
Mobile.java
public class Mobile extends Product
{
    private String color;
    private int storageCapacity;
    public Mobile(int wa
anty, String 
andName, float screenSize, int storageCapacity, String color)
    {
        super(wa
anty, 
andName, screenSize);
        this.color = color;
        this.storageCapacity = storageCapacity;
    }
    public String getColor()
    {
        return color;
    }
    public void setColor(String color)
    {
        this.color = color;
    }
    public int getStorageCapacity()
    {
        return storageCapacity;
    }
    public void setStorageCapacity(int storageCapacity)
    {
        this.storageCapacity = storageCapacity;
    }
}
Orders.txt
1,10
2,20
3,30
Orders1.txt
1,50
2,20
3,80
Orders2.txt
1,10
2,20
3,10
Product.java
Product.java
public class Product
{
    private String 
and;
    private int wa
anty;
    private float screenSize;
    public Product(int wa
anty, String 
and, float screenSize)
    {
        this.wa
anty = wa
anty;
        this.
and = 
and;
        this.screenSize = screenSize;
    }
    public int getWa
anty()
    {
        return wa
anty;
    }
    public void setWa
anty(int wa
anty)
    {
        this.wa
anty = wa
anty;
    }
    public String getBrand()
    {
        return 
and;
    }
    public void setBrand(String 
and)
    {
        this.
and = 
and;
    }
    public float getScreenSize()
    {
        return screenSize;
    }
    public void setScreenSize(float screenSize)
    {
        this.screenSize = screenSize;
    }
}
Report.docx
        Class Product
        Base class, to be used for inheritance
                Variables
        Scope
        String
and
        private
        int wa
anty
        private
        float screenSize
        private
                Methods
        Parameters and return type
        Getters and setters
        Parameters and return type based on variable
        Constructo
        Parameters int, String , float. No return type
        Class Mobile
        To create objects which hold information for mobiles
                Variables
        Scope
        String colo
        private
        int storageCapacity
        private
                Methods
        Parameters and return type
        Getters and setters
        Parameters and return type based on variable
        Constructo
        Parameters based on base class and int, String. No return type
        Class Camera
        To create objects which hold information for cameras
                Variables
        Scope
        int numPixels
        private
                Methods
        Parameters and return type
        Getters and setters
        Parameters and return type based on variable
        Constructo
        Parameters based on base class and int. No return type
        Class Tablet
        To create objects which hold information for tablets
                Variables
        Scope
        String operatingSystem
        private
        int storageCapacity
        private
                Methods
        Parameters and return type
        Getters and setters
        Parameters and return type based on variable
        Constructo
        Parameters based on base class and int, String. No return type
        Interface StockLimit
        Holds minimum and maximum stock limit constants
                Variables
        Scope
        final int MINIMUM_STOCK
        default
        final int MAXIMUM_STOCK
        default
        Class StockLimitException
        To throw exception when stock limit is crossed
                Methods
        Parameters and return type
        Constructo
        Parameters based on base class. No return type
        Class Stocks
        To define various operations for processing stocks
                Variables
        Scope
        List mobileList
        private
        List cameraList
        private
        List tabletList
        private
                Methods
        Parameters and return type
        Constructo
        No parameters. No return type
        displayStocks
        No parameters. Return type void.
        readData
        Parameters String. Return type List        writeFinalStocks
        No parameters. Return type void.
        readOrders
        Parameters String. Return type void.
        readStocks
        Parameters String. Return type void.
        Class Repository
        To test the functionality of the project
                Methods
        Parameters and return type
        main
        Parameters String[]. Return type...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here