Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Java to create a Video Streaming Service with these instructions. Learning objective: Review basic Java class and object constructs. Demonstrate the properties of inheritance,

Use Java to create a Video Streaming Service with these instructions.
image text in transcribed
Learning objective: Review basic Java class and object constructs. Demonstrate the properties of inheritance, encapsulation, static variables, and overriding methods. Practice writing classes, and using an array to store objects. For this assignment, you will be creating classes to support one of the business functions listed at the bottom of the assignment, based on your last name. You will create a parent/super class structure for items and two related subclass structures. You will store created subclass objects in arrays. You will also create objects of the super class. Your program will use an overridden print method (one that you created in the superclass and overrode in each subclass, not just an overridden toString) to display the items to the screen (nicely formatted and labeled) and the number of subclass objects created (your static variable). The following provides the specific guidance for the assignment. There is also a rubric that will be used for grading. 1) Create a super class for shared attributes of items and a superclass print method. One of the attributes must be "private" and the superclass must have a setter and getter for that attribute. 2) Create two subclasses with at least 2 unique attributes (i.e. for a custom furniture business it might be tools (with attributes age and last maintenance date) and wood (type of wood, hardness level)) (grocery store it might be meat products (expiration date, source) or produce (boolean organic or regular, int shelf life in days). Include an overridden print method, remember you must use a "getter" to obtain values for a private attribute. 3) In addition to writing a default constructor, define and demonstrate an overloaded constructor that initializes all attributes when creating a superclass or subclass object. 4) In the main program, instantiate and initialize at least one superclass object. Remember that you need to use a "setter" to initialize a private superclass attribute. 5) Instantiate and initialize at least 3 subclass objects of each type. Use a separate array to store the objects for each subclass. 6) Display all the superclass and subclass objects to the screen with all attributes using your own created super and overridden subclass print methods 7) Display (formatted and labeled) the total number of subclass objects created

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions