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
Most file managers include a way to create a folder through the save dialog box. true or false?
Illusion [34]

Answer:

false because most of the file managers just keep Everything organized by dates, years, and everything like that

Explanation:

5 0
2 years ago
Read an integer from keyboard and then print the result of the sum obtained by adding the entered integer to the integer formed
Stels [109]

Answer:

Following are the program in C++ language

#include <iostream> // header file

using namespace std; //  namespace std;

int main() // main function

{

int number,n1,rem; // variable declaration

int sum,sum1=0;// variable declaration

cout<<"Enter the number :";

cin>>number;// Read the number

n1=number; // initialized the value of number with the n1

while(n1>0) // iteating the  while loop

{

   rem=n1%10; // finding the reminder

   sum1=10*sum1+rem;  // storing the sum

   n1=n1/10;

}

sum=sum1+number; // calculate the sum

cout<<"The sum is:"<<sum; // Display sum

   return 0;

}

Output:

Enter the number :123

The sum is:444

Explanation:

Following are the Description of the Program

  • Read the value of "number" in the "number" variable of int type .
  • Initialized the value of "number" in the "n1' variable.
  • Iterating the while loop until the n1>0.
  • In this loop we reverse the number in the "sum1" variable
  • Finally print the sum in the "sum" variable

3 0
3 years ago
Importance of computer education​
Stells [14]

Answer:

hope this helped

Explanation:

Computer technology has helped the world to grow and evolve quickly. By performing tasks quickly, computers make daily activities more convenient. They give people access to a wide array of information and can reach even the most remote locations on the planet.

6 0
2 years ago
What is &lt;html&gt;
ipn [44]

the opening tag for an HTML document

8 0
3 years ago
Read 2 more answers
Question Mode Matching Question Match the following description with the appropriate programming language generation. 1GL 1GL dr
erastovalidia [21]

Answer:

1GL: Machine language. Represented by a series of 1s and 0s.

2GL: Assembly language. An assembler converts 2GL into machine language.

3GL: High-level programming language. Uses a compiler to convert into machine language.

4GL: Specifically designed for creating database management programs.

5GL: Extremely advanced. Uses statements (scripts) rather than algorithms.

Explanation:

Programming languages started as a series of binary digits (i.e. 0's and 1'). This generation of language is referred to as the first generation.

However, the machine language were difficult to read by human, so mnemonics were created (i.e. assembly language). This language uses symbolic codes such as ADD for addition, etc. This is the second generation

The third generation are the high level languages that uses languages that can be easily understood by human, e.g. + means plus. However, the language must be translated; hence the need for a compiler or interpreter, as the case may be.

The fourth and fifth generations are extensions of the third generation languages. The fourth were created to connect to DBMS while the fifth are more advanced.

4 0
3 years ago
Other questions:
  • You are entering command that operates on a file. The path to the file is lengthy and confusing and you are afraid that you will
    12·1 answer
  • What type of restrictions may be placed on your license?
    7·1 answer
  • true or false manual handling of materials accounts for the primary source of energy in the workplace
    13·2 answers
  • rob just got a new idea for the movie he's making, and he wants to put in late hours to get it done. Which of the following stat
    10·1 answer
  • What do character formats do for your document's message? A. Set how text aligns within a document B. Provide organization C. Pr
    6·2 answers
  • Seth is considering advertising his business using paid search results.What do you think makes paid search advertising so effect
    11·2 answers
  • What are the benefits of writing functions that use parameters and return? Try to list at least two.
    12·1 answer
  • Create a program that simulates a race between several vehicles. Design and implement an inheritance hierarchy that includes Veh
    11·1 answer
  • Is the most important characteristic of a hard drive.​
    7·2 answers
  • You want a cable that could be used as a bus segment for your office network. The cable should also be able to support up to 100
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!