Question

You have been asked to develop a mobile phone application that allows users to inventory items...

You have been asked to develop a mobile phone application that allows users to inventory items in their home for insurance purposes (in case of theft or fire.) Users can create categories and subcategories of items (Electronics, Computers, Furniture, etc.) and then list items within each category.

The software should allow the user to create a description of the item, take a photo, and input the purchase price. Other information may be required of specific types of objects (a TV would have a serial number, for example, while a sofa probably would not.)

Users can also list the rooms in their home and note the location of each item. From the above software description, please answer ALL of the following:

1. List three candidate classes that you believe would support this software

2. Describe at least one superclass-subclass relationship between two classes

3. Referring to your defined superclass-subclass relationship, list two attributes that would belong to the superclass and two attributes that would belong to the subclass.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Firstly we will break the problem in subpart:

  • There is a user who can use the android Application.But we wont be having just a single person using the application.There will be multiple people using the application for the same purpose but will be having different credentials like name , password,contact number ,etc.So we can create a class User as classes are blueprints for the objects in the class.
  • Secondly there are Items. Item can be a class in the same ways and can have common attributes as policy intact to the insurance,etc.They will differ in attribute values like id,pic ,etc. So the second class is "Item".
  • Thirdly, we can have various types of item belonging to various categories and difference in attributes.An example of TV having a serial number and sofa don't having one.The classes could be "Electronic_Item","Furniture",etc.There can be many classes depending upon that.
  • Now As classes Electronic_Item, Furniture ,etc are still type for an Item, they can extend common properties like id,Picture,Price,etc which will be same as of the class Item.They can have unique properties of there own like "Electronic_Item" can have serial_number as its attribute ,while Furniture can skip that property and can have "Made_Of" (for it being of wood,steel ,etc).

Now lets answer the questions :

  1. 3 candidate classes can be : User,Item,Electronic_Item(though you can write more of them as explained above).
  2. Superclass can be Item,subclasses can be Electronic_Item class ,Furniture class etc.An Electronic_Item class or Furniture class has an 'is a' relationship with its superclass Item.The subclasses can be considered special kind of its superclass.
  3. Superclass "Item" would have attributes like : Item_name,Price,etc as all the Item instances will have some name like "TV" or "sofa" and a certain price which the user updates irrespective of its kind means whether its electronics or furniture. As of subclass "Electronic_Item class" can have serial number as its attribute whereas Furniture can have "made_of " as an attribute.
Add a comment
Know the answer?
Add Answer to:
You have been asked to develop a mobile phone application that allows users to inventory items...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The ADT Bag is a group of items, much like what you might have with a...

    The ADT Bag is a group of items, much like what you might have with a bag of groceries. In a software development cycle, specification, design, implementation, test/debug, and documentation are typical activities. The details are provided in the rest of the document. ADT Bag Specification: (Note: You should not change the names of the operations in your program. This should be included in an interface.) Specify operations to  create an empty bag that can hold up to 100...

  • (2 bookmarks) In JAVA You have been asked to write a program that can manage candidates...

    (2 bookmarks) In JAVA You have been asked to write a program that can manage candidates for an upcoming election. This program needs to allow the user to enter candidates and then record votes as they come in and then calculate results and determine the winner. This program will have three classes: Candidate, Results and ElectionApp Candidate Class: This class records the information for each candidate that is running for office. Instance variables: first name last name office they are...

  • Database design Part One (Conceptual Database Design) As a database developer, you have been asked to...

    Database design Part One (Conceptual Database Design) As a database developer, you have been asked to design a new database the operation of the new project within the Liverpool John Moores University (LJMU). LJMU i planning to deliver a number of professional training courses in Al. Each course is delivered by one member of staff at LJMU's Training Centre; each staff is allocated a staff number. The policy of LJMU is to record the start working date of each staff,...

  • Recursion and Trees Application – Building a Word Index Make sure you have read and understood...

    Recursion and Trees Application – Building a Word Index Make sure you have read and understood ·         lesson modules week 10 and 11 ·         chapters 9 and 10 of our text ·         module - Lab Homework Requirements before submitting this assignment. Hand in only one program, please. Background: In many applications, the composition of a collection of data items changes over time. Not only are new data items added and existing ones removed, but data items may be duplicated. A list data structure...

  • You will develop an E-Commerce database used to maintain customers, products and sales information. You are...

    You will develop an E-Commerce database used to maintain customers, products and sales information. You are required to 1) gather and analyze requirements 2) design logical structure of the database 3) create stored procedures to develop the tables and insert the data 4) write SQL statements for data extraction and reporting. Throughout the course of this semester you have analyzed the requirements for an eCommerce database, designed and developed your database. As a class we have gone through the process...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT