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

1 answer below »
ITECH6401 Enterprise ProgrammingAssignment 1 – Individual AssignmentOverviewThis 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, 2017 - 16:00 (Week 8)Minimum time expectation: 10 hoursLearning Outcomes AssessedK1. Describe elements of a common object-oriented programming language suitable for web based application developmentS3. Develop applications involving complex component technologyA1. Design and implement technical solutions addressing connectivity between componentsAssessment DetailsConsider 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 PhoneCameraTabletsWarrantyWarrantyWarrantyBrand NameBrand NameBrand NameScreen SizeScreen SizeScreen SizeStoragePixels CountStorageColourOperating 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 ITECH6401 Assig 1 Sem 8 2018 Page 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.4-inch 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 constantsCRICOS Provider No. 00103D ITECH6401 Assig 1 Sem 8 2018 Page 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 ITECH6401 Assig 1 Sem 8 2018 Page 4 of 4TasksAllocated MarksTask 110Task 210Task 315Task 415Task 515Task 610Task 710Report10Overall Quality of coding including proper naming of class, variables and methods and code indentation, etc.5Total/100/15
Answered Same DayApr 30, 2020ITECH6401

Answer To: ITECH6401 Enterprise ProgrammingAssignment 1 – Individual AssignmentOverviewThis assignment requires...

Snehil answered on May 05 2020
148 Votes
Camera.java
Camera.java
//Class define a camera 
public class Camera extends Product
{
    private int pixelCount;
    //constructor
    public Camera(int warranty, String brandName, float screenSize, int pixelCount)
    {
        super(warranty, brandName, screenSize);
        this.pixelCount = pixelCount;
    }
    //getters and setters
    public int getPixelCount()
    {
        return pixelCount;
    }
  public void setPixelCount(int pixelCount)
    {
        this.pixelCount = pixelCount;
    }
    //Method to convert values to string for printing purposes
    public String toString()
    {
        return "2," + getWarranty() + "," + getBrandName() + "," + getScreenSize() + "," + getPixelCount() + ",1";
    }
}
Mobile.java
Mobile.java
//Class define a Mobile
public class Mobile extends Product
{
    private String color;
    private int storage;
    //constructor
    public Mobile(int warranty, String brandName, float screenSize, int storage, String color)
    {
        super(warranty, brandName, screenSize);
        this.color = color;
        this.storage = storage;
    }
    //getters and setters
    public String getColor()
    {
        return color;
    }
    public void setColor(String color)
    {
        this.color = color;
    }
    public int getStorage()
    {
        return storage;
    }
    public void setStorage(int storage)
    {
        this.storage = storage;
    }
    //Method to convert values to string for printing purposes
    public String toString()
    {
        return "1," + getWarranty() + "," + getBrandName() + "," + getScreenSize() + "," + getStorage() + ","
                + getColor() + ",1";
    }
}
orders1.txt
1,10
2,20
3,10
1,5
1,15
3,50
orders2.txt
2,10
1,20
1,10
2,5
3,15
2,50
Product.java
Product.java
//Class define a base product which will be used for inheritance
public class Product
{
    private int warranty;
    private String brandName;
    private float screenSize;
    //constructor
    public Product(int warranty, String brandName, float screenSize)
    {
        this.warranty = warranty;
        this.brandName = brandName;
        this.screenSize = screenSize;
    }
    //getters and setters
    public int getWarranty()
    {
        return warranty;
    }
    public void setWarranty(int warranty)
    {
        this.warranty = warranty;
    }
    public String getBrandName()
    {
        return brandName;
    }
    public void setBrandName(String brandName)
    {
        this.brandName = brandName;
    }
    public float getScreenSize()
    {
        return screenSize;
    }
    public void setScreenSize(float screenSize)
    {
        this.screenSize = screenSize;
    }
}
Report.docx
        Class Product
        base product which will be used for inheritance
                Variables
        Scope
        String brand
        private
        int warranty
        private
        float screenSize
        private
                Methods
        Parameters and return type
        Product
        Takes int,String,float. Has no return type.
        getWarranty
        Takes nothing returns int
        setWarranty
        Takes int returns nothing
        getBrandName
        Takes nothing returns String
        setBrandName
        Takes String returns nothing
        getWarranty
        Takes nothing returns int
        getScreenSize
        Takes nothing returns float
        setScreenSize
        Takes float returns nothing
        getWarranty
        Class Mobile
        define a Mobile
                Variables
        Scope
        String color
        private
        int storageCapacity
        private
                Methods
        Parameters and return type
        Mobile
        Takes int,String,float,int,String. Has no return type.
        getStorage
        Takes nothing returns int
        setStorage
        Takes int returns nothing
        getColor
        Takes nothing returns String
        setColor
        Takes String returns nothing
        Class Camera
        define a Camera
                Variables
        Scope
        int numPixels
        private
                Methods
        Parameters and return type
        Camera
        Takes int,String,float,int. Has no return type.
        getPixelCount
        Takes nothing returns int
        setPixelCount
        Takes int returns nothing
        Class Tablet
        define a Tablet
                Variables
        Scope
        String operatingSystem
        private
        int storageCapacity
        private
                Methods
        Parameters and return type
        Tablet
        Takes...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here