Answer:
Some one is going to clip me
Explanation:
Create a class Car, which contains Three data members i.e. carName (of string type), ignition (of bool type), and currentSpeed (of integer type)
A no-argument constructor to initialize all data members with default values
A parameterized constructor to initialize all data members with user-defined values
Three setter functions to set values for all data members individually
Three getter function to get value of all data members individually
A member function setSpeed( ) // takes integer argument for setting speed
Derive a class named Convertible that contains
A data member top (of Boolean type)
A no-argument constructor to assign default value as “false” to top
A four argument constructor to assign values to all data-members i.e. carName, ignition, currentSpeed and top.
A setter to set the top data member up
A function named show() that displays all data member values of invoking object
Write a main() function that instantiates objects of Convertible class and test the functionality of all its member functions.
Answer:
Here.
Explanation:
#include <iostream>
#include <string>
using namespace std;
//Create a class Car, which contains • Three data members i.e. carName (of string type), ignition (of bool type), and //currentSpeed (of integer type)
class Car
{
public:
string carName;
bool ignition;
int currentSpeed;
//A no-argument constructor to initialize all data members with default values
//default value of string is "",bool is false,int is 0
Car()
{
carName="";
ignition=false;
currentSpeed=0;
}
//A parameterized constructor to initialize all data members with user-defined values
Car(string name,bool i,int speed)
{
carName=name;
ignition=i;
currentSpeed=speed;
}
//Three setter functions to set values for all data members individually
// Three getter function to get value of all data members individually
void setCarName(string s)
{
carName=s;
}
void setIgnition(bool ig)
{
ignition=ig;
}
void setCurrentSpeed(int speed)
{
currentSpeed=speed;
}
string getCarName()
{
return carName;
}
bool getIgnition()
{
return ignition;
}
int getCurrentSpeed()
{
return currentSpeed;
}
//A member function setSpeed( ) // takes integer argument for setting speed
void setSpeed(int sp1)
{
currentSpeed=sp1;
}
};
//Derive a class named Convertible
class Convertible:public Car
{
//A data member top (of Boolean type)
public:
bool top;
public:
//A no-argument constructor to assign default value as “false” to top
Convertible()
{
top=false;
}
//A four argument constructor to assign values to all data-members i.e. carName, ignition,
//currentSpeed and top.
Convertible(string n,bool i,int s,bool t):Car(n,i,s)
{
carName=n;
ignition=i;
currentSpeed=s;
top=t;
}
// A setter to set the top data member up
void setTop(bool t)
{
top=t;
}
//A function named show() that displays all data member values of invoking object
void show()
{
cout<<"Car name is:"<<carName<<endl;
cout<<"Ignition is: "<<ignition<<endl;
cout<<"Current Speed is :"<<currentSpeed<<endl;
cout<<"Top is:"<<top<<endl;
}
};
//main function
int main()
{
//creating object for Convertible class
Convertible c1("Audi",true,100,true);
c1.show();
c1.setCarName("Benz");
c1.setIgnition(true);
c1.setCurrentSpeed(80);
c1.setTop(true);
c1.show();
cout<<"Car Name is: "<<c1.getCarName()<<endl;
cout<<"Ignition is:"<<c1.getIgnition()<<endl;
cout<<"Current Speed is:"<<c1.getCurrentSpeed()<<endl;
return 0;
}
The following are the program to the given question:
Program Explanation:
Defining the header file.Defining a class "Car", inside the three variables "carName, ignition, and currentSpeed" is declared that are "string, bool, and integer" types.Inside the class, "default and parameterized constructor" and get and set method has defined that set and returns the parameter values.Outside the class, another class "Convertible" (child) is declared that inherit the base class "Car".Inside the child class, "default and parameterized constructor" is defined, which inherits the base class constructor.In the child class parameterized constructor it takes four parameters, in which 3 are inherited from the base class and one is bool type that is "t".In this class, a method "setTop" is defined that sets the "t" variable value and defines a show method that prints the variable values.Outside the class, the Main method is defined that creating the child class object and calling the parameterized constructor and other methods to print its values.Program:
#include <iostream>//header file
#include <string>
using namespace std;
class Car//defining a class Car
{
//defining a data members
public:
string carName;//defining string variable
bool ignition;//defining bool variable
int currentSpeed;//defining integer variable
Car()//defining default constructor
{
carName="";//initiliaze a space value in string variable
ignition=false;//initiliaze a bool value in bool variable
currentSpeed=0;//initiliaze an integer value into int variable
}
Car(string name,bool i,int speed)//defining parameterized constructor that holds value into the variable
{
carName=name;//holding value in carName variable
ignition=i;//holding value in ignition variable
currentSpeed=speed;//holding value in currentSpeed variable
}
void setCarName(string s)//defining a set method that takes parameter to set value into the variable
{
carName=s;//set value
}
void setIgnition(bool ig)//defining a set method that takes a parameter to set value into the variable
{
ignition=ig;//set value
}
void setCurrentSpeed(int speed)//defining a set method that takes a parameter to set value into the variable
{
currentSpeed=speed;//set value
}
string getCarName()//defining a get method that return input value
{
return carName;//return value
}
bool getIgnition()//defining a get method that return input value
{
return ignition;//return value
}
int getCurrentSpeed()//defining a get method that return input value
{
return currentSpeed;//return value
}
void setSpeed(int sp1)//defining a method setSpeed that holds parameter value
{
currentSpeed=sp1;//hold value in currentSpeed
}
};
class Convertible:public Car//defining a class currentSpeed that inherits Car class
{
public:
bool top;//defining bool variable
public:
Convertible()//defining default constructor
{
top=false;//holing bool value
}
Convertible(string n,bool i,int s,bool t):Car(n,i,s)//defining parameterized constructor Convertible that inherits base class parameterized constructor
{
carName=n;//holding value in string variable
ignition=i;//holding value in bool variable
currentSpeed=s;//holding value in integer variable
top=t;//holding value in bool variable
}
void setTop(bool t)//defining a method setTop that takes parameter to set bool value
{
top=t;//holding bool value
}
void show()//defining show method that prints variable value
{
cout<<"Car name is:"<<carName<<"\n";//prints value
cout<<"Ignition is: "<<ignition<<"\n";//prints value
cout<<"Current Speed is :"<<currentSpeed<<"\n";//prints value
cout<<"Top is:"<<top<<"\n";//prints value
}
};
int main()//defining a main method
{
Convertible cs("BMW",true,180,true);//creating the Convertible calss object that calls the parameterized constructor by accepting value into the parameter
cs.show();//calling method show
cs.setCarName("Benz");//calling the setCarName method
cs.setIgnition(true);//calling the setIgnition method
cs.setCurrentSpeed(160);//calling setCurrentSpeed method
cs.setTop(true);//calling setTop method
cs.show();//calling show method
cout<<"Car Name is: "<<cs.getCarName()<<"\n";//calling the getCarName method and print its value
cout<<"Ignition is:"<<cs.getIgnition()<<"\n";//calling the getIgnition method and print its value
cout<<"Current Speed is:"<<cs.getCurrentSpeed();//calling the getCurrentSpeed method and print its value
return 0;
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/23313563
When writing professional emails, it is okay to use emoticons and
abbreviations.
True
False
Answer:
False
Explanation:
Answer:
false
Explanation:
Explain the computer Memory and how it works
what is data analysing data and give three examples ?
Answer:
Data Analysis is the process of systematically applying statistical and/or logical techniques to describe and illustrate, condense and recap, and evaluate data. ... An essential component of ensuring data integrity is the accurate and appropriate analysis of research findings.
Inferential Analysis. Diagnostic Analysis. Predictive Analysis. Prescriptive Analysis are examples.
PLS HELP
Select the correct answer from each drop-down menu. Daniel, Abeeku, and Carlos are three friends in the same physiology class. All three demonstrate different types of listening. Identify the different listening techniques displayed by each of them. Daniel listens to all the key content of the lecture and takes notes. He displays _______ listening. Abeeku is restless and begins to focus on the emotions and mood of the professor when he’s just bored. Abeeku displays _______ listening. Carlos also focuses on the key content of the lectures, but he evaluates them for accuracy based on what he has read or heard somewhere else. Carlos displays_______listening.
The blanks are: informative, critical, discriminative
Answer:
informative, discrimiitive,critical thats the order
different the need for external or secondary memory
Answer:
Secondary storage is needed to keep programs and data long term. Secondary storage is non-volatile , long-term storage. Without secondary storage all programs and data would be lost the moment the computer is switched off.
External storage enables users to store data separately from a computer's main or primary storage and memory at a relatively low cost. It increases storage capacity without having to open up a system.
How has the shift to locally grown produce decreased greenhouse emissions?
Answer:
How has the shift to locally grown produce decreased greenhouse emissions? 1 Large farms often create greenhouse emissions by poor farming practices. 2 Locally grown produce allows fewer dangerous toxins to seep into the soil and the atmosphere.
Type the correct answer in the box. Spell all words correctly. Complete the sentence based on the role education plays to help you become proficient in any performing art. In the performing arts, education hones your skills and provides a pathway, but your is essential for success.
Answer:
what do i do??
Explanation:
Answer:
talent
Explanation:
Book information (overriding member methods) Given main() and a base Book class, define a derived class called Encyclopedia. Within the derived Encyclopedia class, define a printlnfomethod that overrides the Book class printinfo() method by printing not only the title, author, publisher, and publication date, but also the edition and number of volumes. Ex. If the input is The Hobbit J. R. R. Tolkien George Allen & Unwin 21 September 1937 The Illustrated Encyclopedia of the Universe James W. Guthrie Watson-Guptill 2001 2nd 1 the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe Author: James W. Guthrie Publisher: Watson-Guptill Publication Date: 2001 Edition: 2nd Number of Volumes: 1 Note: Indentations use 3 spaces 261744 1399928 LAB ACTIVITY 11.17.1: LAB: Book information (overriding member methods) 0/10 File is marked as read only Current file: BookInformation.java 1 import java.util.Scanner; 3 public class BookInformation 2
Answer:
Explanation:
The Book class and BookInformation class was not provided but was found online. After analyzing both of these classes I have created the following code that grabs and overrides the printInfo() method in order to add and print the edition and number of volumes as well
public class Encyclopedia extends Book {
String edition;
int numVolumes;
public String getEdition() {
return edition;
}
public void setEdition(String edition) {
this.edition = edition;
}
public int getNumVolumes() {
return numVolumes;
}
public void setNumVolumes(int numVolumes) {
this.numVolumes = numVolumes;
}
public void printInfo() {
System.out.println("Book Information: ");
System.out.println(" Book Title: " + super.title);
System.out.println(" Author: " + author);
System.out.println(" Publisher: " + publisher);
System.out.println(" Publication Date: " + publicationDate);
System.out.println(" Edition: " + getEdition());
System.out.println(" Number of Volumes: " + getNumVolumes());
}
}
describe the role of a Database Analyst
Answer:
Database Analysts organize and make sense of collections of information in order to create functional database systems. They evaluate, design, review, and implement databases. They are also hired to maintain and update existing databases to better serve the needs of businesses.
Write a procedure called Str_nextWord that scans a string for the first occurrence of a certain delimiter character and replaces the delimiter with a null byte. There are two input parameters: a pointer to the string and the delimiter character. After the call, if the delimiter was found, the Zero flag is set and EAX contains the offset of the next character beyond the delimiter. Otherwise, the Zero flag is clear and EAX is undefined. The following example code passes the address of target and a comma as the delimiter:
Answer:
Str_nextword PROC, pString:PTR BYTE, ; pointer to string delimiter:BYTE ; delimiter to find push esi mov al,delimiter mov esi,pString cld ; clear Direction flag (forward) L1: lodsb ; AL = [esi], inc(esi) cmp al,0 ; end of string? je L3 ; yes: exit with ZF = 0 cmp al,delimiter ; delimiter found? jne L1 ; no: repeat loop L2: mov BYTE PTR [esi-1],0 ; yes: insert null byte mov eax,esi ; point EAX to next character jmp Exit_proc ; exit with ZF = 1 L3: or al,1 ; clear Zero flag Exit_proc: pop esi ret Str_nextword ENDP
Explanation:
push esimov al,delimitermov esi,pStringcld ; clear Direction flag (forward)L1: lodsb ; AL = [esi], inc(esi)cmp al,0 ; end of string?je L3 ; yes: exit with ZF = 0cmp al,delimiter ; delimiter found?jne L1 ; no: repeat loopL2: mov BYTE PTR [esi-1],0 ; yes: insert null bytemov eax,esi ; point EAX to next characterjmp Exit_proc ; exit with ZF = 1L3: or al,1 ; clear Zero flagExit_proc:pop esiretStr_nextword ENDPStr_nextword ENDP
que disminuye o destruye la televisión en cultura contemporánea según McLuhan
ayuda pls
Answer:
Traslation=
That diminishes or destroys television in contemporary culture according to McLuhan
help pls
Explanation:
The maximum weight the box can possibly hold is 49 ounces. The scale at the checkout counter will weigh the box and calculate the price based on the weight. You want to write a Prolog program (rule) itemsByWeight(P, S, C, F, W) to find how many items of each kind are in the box according to the total weight W, where P, S, C and F are the numbers of Pizza slices, Salad bowls, Cupcakes, and Fries packs, respectively.
Answer:
A practical example is this definition of the square of a number, intended to be a function predicate: square(X,Y) :- Y is X * X.
Explanation:
exe files are types of trojan and malware virus and they send you blue screen of death.
Answer:
im not 100 percent surre but i think so
Explanation:
Write a program to read a list of nonnegative integers and to display the largest integer, the smallest integer, and the average of all the integers. The user indicates the end of the input by entering a negative sentinel value that is not used in finding the largest, smallest, and average values. The average should be a value of type double so that it is computed with a fractional part. Input Notes: The input is simply a sequence of positive integers, separated by white space and terminated by -1.
Answer:
The program in Python is as follows:
mynum = []
num = int(input("Enter a number: "))
total = 0
while num >= 0:
mynum.append(num)
total+=num
num = int(input("Enter a number: "))
print("Smallest: ",min(mynum))
print("Largest: ",max(mynum))
print("Average: ",total/len(mynum))
Explanation:
This creates an empty list
mynum = []
This prompts the user for input
num = int(input("Enter a number: "))
This initializes total to 0
total = 0
The following is repeated until a negative number is inputted
while num >= 0:
This appends the inputted number into the list
mynum.append(num)
This calculates the sum of all the numbers inputted
total+=num
This prompts the user for another input
num = int(input("Enter a number: "))
This calculates and prints the smallest
print("Smallest: ",min(mynum))
This calculates and prints the largest
print("Largest: ",max(mynum))
This calculates and prints the average
print("Average: ",total/len(mynum))
Haley is responsible for checking the web server utilization. Which things should she review while checking the server utilization?
While checking the server utilizations, she should review____ and ____.
First box?
CPU
cables
backup media
Second box?
RAM
web application
antivirus
Answer:
While checking the server utilizations, she should review CPU and RAM.
Explanation:
Answer:
CPU and RAM
Explanation:
What is an example of a one-to-many relationship?
O products to orders
customer to orders
O primary key to primary key
O employee ID to employee ID
Answer: customer to orders
Explanation:
A stack is initially empty, then the following commands are performed: push 5, push 7, pop, push 10, push 5, pop , which of the following is the correct stack after those commands (assume the top of the stack is on the left)?
a. 10 7 8 5 9
b. 10 8 5
c. 8 5 9
d. 8 5
Answer:
The answer is "5, 10".
Explanation:
In this question values are different that's why all choice was wrong, it correct solution can be defined as follows:
In the stack, we use the "push and pop" method that works as follows:
Push is used to inserting the value into the stack.Pop is used for deleting the value from the stack.2.19.5: Circle Pyramid 2.0
In this exercise we have to use the knowledge of the python language to write the code, so we have to:
The code is in the attached photo.
So to make it easier the code can be found at:
def move_to_row(num_circle):
x_value = -((num_circle*50)/2)
y_value = -250 +(50*row_value)
penup()
setposition(x_value,y_value)
pendown()
def draw_circle_row(num_circle):
for i in range(num_circle):
endown()
circle(radius)
penup()
forward(diameter)
#### main part
speed(0)
radius = 25
diameter = radius * 2
row_value = 1
num_circle = int(input("How many circle on the bottom row? (8 or less): "))
penup()
for i in range(num_circle):
move_to_row(num_circle)
row_value=row_value+1
draw_circle_row(num_circle)
num_circle=num_circle-1
See more about python at brainly.com/question/26104476
Which statement is true of Voice over Internet Protocol (VoIP)? a. Callers can be screened even with blocked caller IDs. b. Calls cannot be forwarded by users. c. Voicemails are not received on the computer. d. Users often experience busy lines.
Answer:
a. Callers can be screened even with blocked caller IDs.
Explanation:
Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties. Some of the most widely used communication channel or medium over the internet are an e-mail (electronic mail) and Voice over Internet Protocol (VoIP).
Voice over Internet Protocol (VoIP) is also known as IP Telephony and it's a type of communication technology which typically involves the use of broadband connection for the transmission of voice data between two or more people. Thus, it requires the use of internet enabled devices such as smartphones, computers, IP phones, etc.
Blocking a number with the VoIP technology prevents the blocked user from calling or contacting your line. However, you can still screen or carry out some investigations with respect to the blocked number through Voice over Internet Protocol (VoIP).
Hence, the statement which is true of Voice over Internet Protocol (VoIP) is that, callers can be screened even with blocked caller IDs.
Describe one health problem related to fertilizers?
para que se emplean los operando en una formula
Explanation:
what are you mobile-gws-wiz-serp now and black and son in a new medicine that is not the only way that we know you are in a
what is the different between compilers and interpreters?
what presents information about the document, the progress of
current tasks and the status of certain commands and keys?
Answer: status bar
Explanation:
The status bar refers to the horizontal window that's found at the bottom of the parent window whereby an application will show different kinds of status information.
The main function of the status bar is to simply display information withnragrds to the current state of the window. Therefore, the status bar helps in the presentation of information about the document, indicates progress of
current tasks and also the status of some commands and keys.
HURRY MY COMPUTER IS ABOUT TO DIE ILL GIVE BRAINLYESTn
Answer: D, C, E, are the answers! good luck.
Explanation:
Damion recently did an update to his computer and added a new video card. After the update, Damion decided that he would like to play his favorite game. While he was playing the game, the system locked up. He restarted the computer and did not have any issues until he tried to play the same game, at which point, the computer locked up again. What might be the problem with Damion's computer
Write a switch statement to select an operation based on the value of inventory. Increment total_paper by paper_order if inventory is 'B' or 'C'; increment total_ribbon by ribbon_order if inventory is 'D', 'F', or 'E'; increment total_label by label_order if inventory is 'A' or 'X'. Do nothing if inventory is 'M'. Display error message if value of inventory is not one of these 6 letters.
Answer:
switch(inventory){
case B || C:
total_paper += paper_order;
break;
case D || F || E:
total_ribbon += ribbon_order;
break;
case A || X:
total_label += label_order;
break;
case M:
break;
default:
console.log("Error! Invalid inventory value");
}
Explanation:
The switch keyword is a control statement used in place of the if-statement. It uses the 'case' and 'break' keywords to compare input values and escape from the program flow respectively. The default keyword is used to accommodate input values that do not match the compared values of the cases.
3) Paul enjoys working at Small World
because he finds the
stimulating.
O
installation
O environment
O application
O opportunity
Answer:
Environment
Explanation:
He finds the environment stimulating, hence why he enjoys working there.
the answer o
for this question is environment
Please help ASAP!!! :))
Answer:
You can upgrade the OS by applying SECURITY patches to the server
Explanation:
I can't think of anything else it could be
There is something wrong with the arguments the function is getting; a precondition is violated
Answer:
It indicates that either the argument is not corresponding to the perimeter or not returning the same as the variable or function. They arise a syntax error and Python parser is unable to understand a line of code.
Explanation: