1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
V125BC [204]
3 years ago
7

Based on the data definition classes identified below, assume you wish to create a Dictionary class that inherits from the Book

class. In addition to title and cost, the Dictionary class must also store the number of words present in the dictionary. Write the code that will create a constructor in the dictionary class that passes in and sets the dictionary's title, cost, and number of words.
Computers and Technology
1 answer:
BabaBlast [244]3 years ago
7 0

Answer:

Explanation:

The following code is written in Java and creates the constructor for the Dictionary class as requested. This class extends the Book class and assumes that the variables for the title and the cost are part of the Book class, so it simply calls and initializes them using the constructor.

class Dictionary extends Book {

   int numberWords;

   

   public void Dictionary(String title, int cost, int numberWords) {

       this.title = title;

       this.cost = cost;

       this.numberWords = numberWords;

   }

}

You might be interested in
Differentiate between system software and application software
vodomira [7]

Answer:

system software is the software which control overall operation of the computer . For eg. Ms.dos ,window 2003 ,etc whereas application software is a software which work on the top of operating system to solve number of problems .For eg. Ms.word,Ms.excel,etc

3 0
3 years ago
Read 2 more answers
What obstacles could prevent you from getting and keeping a job
stepladder [879]
Drugs, No Collage, Gangs, bad grades, Criminal Records →
7 0
4 years ago
Write an ALTER TABLE statement that adds two new columns to the Products table: one column for product price that provides for t
matrenka [14]

Answer:

ALTER TABLE Products

ADD Products_price float(5,2) DEFAULT 9.99,

ADD Adding_time datetime;

Explanation:

So at first we need to use ALTER TABLE statement, when we use this statement we also need to provide the table name. In this case, i assume it is 'Products'.

Then, as per question, we need to add two columns.

The first one is 'product_price' and it contains decimal points. So, we need to use ADD statement and give a column name like 'Prodcuts_price' and its datatype 'float' because it contains decimal or floating points. so, for 3 digits on the left and 2 digits on the right, it makes a total of 5 digits. So, we need to declare it like this. (5,2) it means a total of 5 digits and 2 after the decimal point. after that, we need to set our Default value using the DEFALUT statement. so DEFAULT 9.99. it will set the default value to 9.99 for existing products.

And for our next column, we give its a name like 'Adding_time' then it's datatype 'datetime' because it will contain date and times.

8 0
3 years ago
Direct messages are the only private forms of communication on Twitter. True False
Sunny_sXe [5.5K]
True but ill keep typing so it meets twenty charecters                                              

7 0
3 years ago
Please select the word from the list that best fits the definition
GalinKa [24]

Answer:

B. Unsafe Sites

Explanation:

Unsafe Sites are not safe and contain content which may be offensive and which could also be harmful for younger children.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Put the following five steps in the order in which you would perform them to use the Paste Special function: ____. 1. Select and
    5·1 answer
  • Discussion group may have a___________ who monitors the postings and enforces the sides rules​
    13·1 answer
  • Which of the following is a special-purpose computer that functions as a component in a larger product?
    6·1 answer
  • Peter has recently bought a media player and a digital camera he wants to buy a memory card and then use devices which memory do
    11·2 answers
  • You are a database administrator. Chantelle comes to you asking for help on how to access all the data in one row of the databas
    11·1 answer
  • What did Adam and Eve look like?
    7·2 answers
  • A network administrator needs 10 prevent users from accessing the accounting department records. All users are connected to the
    10·2 answers
  • The amount of white space or vertical space between the lines of the text in a paragraph is called line spacing.
    13·1 answer
  • Mention and explain various alignment options​
    9·1 answer
  • Carlos has become pretty efficient at using the Word Processor but he takes time to use the menu each time he saves, prints and
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!