Create a simple hierarchy for items

Assignment Help Data Structure & Algorithms
Reference no: EM13326500

Problem to solve:
Assume you have to write software to be used by a university library. There are three types of item that can be borrowed from the library - DVDs, books and journals. These are all a type of Media.

1751_Assign.png

You will need to create a simple hierarchy for items that the library lends out. Create a Media base class with DVD, Book and Journal as derived classes as shown in the UML diagram.

Requirements:
The member variables (id, title, year) in the Media class should be private. Each class should have appropriate constructor(s).

Reference no: EM13326500

Questions Cloud

Find the tension in the stick : A 0.16-kg ball on a stick is whirled on a vertical circle at a constant speed. Find the tension in the stick
From an ethical perspective : From an ethical perspective, describe how much information is a firm obliged to tell a potential strategic alliance partner about what it expects to learn from the cooperative arrangement.
What are the pros and cons of each method : What are the pros and cons of each method? If you are the security officer of your company and want to set up a key distribution mechanism, which one would you choose to use?
Find the maximum speed that the cycle can have : A motorcycle is traveling up one side of a hill and down the other side. Determine the maximum speed that the cycle can have
Create a simple hierarchy for items : Assume you have to write software to be used by a university library. There are three types of item that can be borrowed from the library - DVDs, books and journals. These are all a type of Media.
Does the federal court have jurisdiction : Henry, a resident of Nevada, sued Adam, a resident of Utah in the Federal Court in California. He sought $60,000 damages for personal injuries arising from an automobile accident that occurred in Los Angeles, CA.
How long does it take for Venus to make one orbit : The earth orbits the sun once per year at the distance of 1.50 x 1011 m. How long (in earth days) does it take for Venus to make one orbit
Find the position of the particle after this time : A particle moves along the x axis. It is initially at the position 0.130 m, moving with velocity 0.190 m/s and acceleration -0.330 m/s2. FIND the position of the particle after this time
What are the components of the particles veloctiy : Two forces, F1=(-3.0i-4.45j)N and F2=(-2.75-5.50j)N, act on a particle of mass 1.50kg that is initially at rest at coordinates (-2.05m,3.75m). what are the components of the particles veloctiy at t=10 seconds

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write the algorithm which takes as input npda

Write the algorithm (described informally) which takes as input NPDA A and determines whether the language of A is nonempty.

  Dynamic-programming algorithm for rod-cutting problem

Consider a modification of the rod-cutting problem in which, in addition to a price pi for each rod, each cut incurs a fixed cost of c. Give a dynamic-programming algorithm to solve this modified problem.

  Create a solution algorithm using pseudocode

Algorithm that will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient.

  Auditing focuses on failures

Under normal situations, auditing focuses on failures to access rather than successful accesses. Explain why it might be a good concept to audit successful access to documents in a directory that contains highly confidential documents.

  Consider that the size of the hash tab is m=16. apply linear

Consider that the size of the hastable is M=16. Apply linear probing with f(i)=i for the following keys. Convert each of the keys to a number associated with the sequence of English alphabet and then draw a table that indicates successful and unsucce..

  Write algorithm to calculate the median using queries

Calculate the median using as few queries as possible. Provide an algorithm which determines the median value using at most O(lg n) queries.

  Find the average number of bits needed to encode

Suppose that the symbols are compressed using Huffman Coding and that the most likely symbol is encoded as a 0, determine the decompressed value of the following compressed string of bits?

  Draw the recursive process of mergesort and quicksort

Draw the recursive process of Mergesort and Quicksort for sorting the sequence {5, 1, 2, 9, 7}. You will get a recursion tree for Mergesort and Quicksort respectively. What are their depths?

  Explain benefits of isdn

Sometimes ISDNs are used in locations that do not support DSL or cable modem connections. Your selections may be analog modems or an ISDN connection in those remote locations.

  Creating a method find ranks in java

Create a method findRanks in Java that accepts an unsorted array of integers vals, and starting and ending rank start and end, numbering ranks from 0,

  Learning for numeric prediction

Write down the output (class) values and number of instances that appear in each of the leaf nodes A, B and C of the tree - Learning for Numeric Prediction

  Pseudocode for divide-and-conquer algorithm

Write a pseudocode for a divide-and-conquer algorithm for finding the position of the largest element in an array of n numbers.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd