The following program generates an error. Why? #include #include using namespace std; class Arcade { public: Arcade(); Arcade(string name, int r); void Print(); private: string arcName; int rating; }; Arcade:: Arcade() { arcName = "New"; rating = 1; } Arcade:: Arcade(string name, int r) { arcName = name; rating = r; } void Arcade:: Print() { cout << "Name is: " << arcName << endl; cout << "Rating is: " << rating << " stars" << endl; } int main() { Arcade myArc(Games Ablaze, 5); myArc.Print(); }

Answers

Answer 1

Answer:

The object creation should be Arcade myArc("Games Ablaze",5);

Explanation:

Required

Why does the program generate an error?

The class definition is correctly defined and implemented;

The methods in the class are also correctly defined and implemented.

The error in the program is from the main method i.e.

int main() {  

       Arcade myArc('ames Ablaze, 5);  

       myArc.Print();  

   }

In the class definition;

Variable name was declared as string and variable rating was declared as integer

This means that, a string variable or value must be passed to name and an integer value or variable to rating.

Having said that:

Arcade myArc(Games Ablaze, 5); passes Games Ablaze as a variable to th function.

Game Ablaze is an incorrect string declaration in C++ because of the space in between Game and Ablaze

Also, no value has been assigned to the variable (assume the variable definition is correct).

This will definitely raise an error.

To correct the error, rewrite the object creation as:

Arcade myArc("Games Ablaze",5); where "Game Ablaze" is passed as string


Related Questions

what is the meaning of photography​

Answers

Answer and Explanation:

the process or art of producing images of objects on sensitized surfaces by the chemical action of light or of other forms of radiant energy, as x-rays, gamma rays, or cosmic rays.

[tex] \sf\underline{ Photography} \:  is \: the \: way \: / \: process \: / \: art \\ \sf \: of \: taking \: beautiful \: pictures \\ \sf \: usually \: of \: amazing \: sceneries \: (it \: can \: be \: of \: other \: \\ \sf things \: as \: well) \: for \: visual \: pleasure. \: The \: attached \: picture \\ \sf \: is \: an \: example \: for \: a \: good \\ \sf\: type \: of \: photography. \: A \: person \: who \: practices \: the \: \\\sf art \: of \: photography \: is \: known \: as \: a \: \underline{ photographer}.[/tex]

what is a processing unit

Answers

Ans the part of a computer that performs logical and arithmetical operations on the data as specified in the instructions. Abbreviation: CPU.

it is the part of a computer that performs logical and arithmetical operations on the data as specified in the instructions.

the central processing unit(CPU)is responsible for processing all information from program run by your computer.​

Answers

Answer:

This is a true statement.

Further Explanation:

The CPU is technically the brain of a computer, containing all the circuitry required to process input, store data, and output results.

¿Como se adaptan a un proceso productivo relacionado con el taller de actividad tecnología que cursas?

Answers

Abcdefghijklmopqrstuvwxyz

Write the algorithm for finding the perimeter of a rectangle using English like form step by step

Answers

L+L+W+W= Permiter
Or Lenght+Lenght+Width+Width= Perimeter
That’s all just add all the 4 sides


Name some objectives that are not the goal of an inspection!

Answers

Explanation:

To identify potential problems that are not anticipated during the design or ... Some activities to consider are the following: ... First aiders names displayed.

Your IaaS cloud company has announced that there will be a brief outage for regularly scheduled maintenance over the weekend to apply a critical hotfix to vital infrastructure. What are the systems they may be applying patches to

Answers

Answer: Load Balancer

Hypervisor

Router

Explanation:

The systems that they may be applying the patches to include load balancer, hypervisor and router.

The load balancer will help in the distribution of a set of tasks over the resources, in order to boost efficiency with regards to processing.

A hypervisor is used for the creation and the running of virtual machines. The router helps in the connection of the computers and the other devices to the Internet.

Fill in the blanks in the SQL statement below that will list the vendor number, vendor name, vendor contact name for all vendors located in Iowa. Format all vendor contact names as last name, first name (example: Bucket, Charles) and name the column contact.SELECT vendor_id, name, ____ (last_name, ‘, ‘, first_name)AS ______FROM vendors, vendor_contactsWHERE _______ = vendor_contacts.contact_id AND vendor_state = ‘IA’;

Answers

Answer:

Following are the response to the given query:

Explanation:

Following are the update out the blanks inside the following SQL query that lists all vendor number, seller name, vendor contacts information again for Iowa vendor. Format all seller number represents as their surname, their first name (example: Bucket, Charles). This SQL query joins two vendors of tables, vendor contacts & returns results.

Please find the query in the attached file.

An attribute is a(n)?

Answers

Answer:

hjqnajiwjahhwhaiwnaoai

Answer:

Which I am not sure of as to what I want to watch a few years back in May but it is not part of Malvolio's that is not a big thing for the world of

what is graphical browser ?​

Answers

Graphical browsers display text, images, and other web applications including video and audio files (as compared with text-only browsers).

Answer:

Graphical browsers display text, images, and other web applications including video and audio files (as compared with text-only browsers).

What is scrum of scrum

Answers

Answer: scrum

Explanation:

Answer:

The Scrum of Scrums is a time-boxed session in which a representative from each Team shares high-level updates on their respective team's work and articulates their progress and impediments. Ideally, it should follow the various teams' Daily Stand-ups, so that the latest information is communicated.

hope that helps bby<3

Consider the following code:

static void Main(string[] args) { int a; Sample1(ref a); Console.WriteLine(a); Sample2(out int b); Console.WriteLine(b); } static void Sample1(ref int value) { value = 2; } static void Sample2(out int value) { value = 4; }

Which of the following is true regarding the given code?

a. The error "Use of unassigned local variable a" will appear during compilation.
b. Line 4 will print the value of variable a as 2.
c. Line 6 will print the value of variable b as 2.
d. The error "Multiple declaration of the value variable" will occur during compilation.

Answers

Answer:

Use of unassigned local variable `a'

Explanation:

Required

What is true about the code

After declaring variable a as integer, i.e.

int a

For the program, a has to be initialized with an integer value

e.g. a = 5;

Initializing a will prevent the use of unassigned local variable error.

Since a is not initialized in the program, the program will return the above error for variable a.

What is Malware? Discuss this topic and give 3 examples of Malware AS WELL AS a description of how they cause damage to computers​

Answers

Answer:

Definition:

Malware refers to the malicious electronic instructions ( programmes ) which copy and store themselves on the memory of the computer which destroys and halts the working condition of the computer.

Examples:

Trojanic bomb.

Memory bomb.

Polymorphic bomb.

Write a program in Python representing 7 logic gates:

AND
NAND
OR
NOR
XOR
XNOR
NOT
Accept (only) two inputs to create all outputs.
Use the if statement to perform the Boolean logic.
Only accept numeric input.
If a number is greater than 0 treat it as a 1.
Specify in your output and in the beginning of the code (through print statements) which gate the code represents.
Comment your code.

Answers

Answer:

The program in python is as follows:

a = int(input("A: "))

b = int(input("B: "))

if a != 0:

   a= 1

if b != 0:

   b = 1

print("A AND B",end =" ")

if a == b == 1:

   print("True")

else:

   print("False")

print("A NAND B",end =" ")

if a == 0 or b == 0:

   print("True")

else:

   print("False")

print("A OR B",end =" ")

if a == 1 or b == 1:

   print("True")

else:

   print("False")

print("A NOR B",end =" ")

if a == 1 or b == 1:

   print("False")

else:

   print("True")

print("A XOR B",end =" ")

if a != b:

   print("True")

else:

   print("False")

print("A XNOR b",end =" ")

if a == b:

   print("True")

else:

   print("False")

print("NOT A",end =" ")

if a == 1:

   print("False")

else:

   print("True")

print("NOT B",end =" ")

if b == 1:

   print("False")

else:

   print("True")

Explanation:

These get inputs for A and B

a = int(input("A: "))

b = int(input("B: "))

a and b are set to 1 for all inputs other than 0

if a != 0:

   a= 1

if b != 0:

   b = 1

This prints the AND header

print("A AND B",end =" ")

AND is true if only A and B are 1

if a == b == 1:

   print("True")

else:

   print("False")

This prints the NAND header

print("A NAND B",end =" ")

NAND is true if one of A or B is 0

if a == 0 or b == 0:

   print("True")

else:

   print("False")

This prints the OR header

print("A OR B",end =" ")

OR is true if one of A or B is 1

if a == 1 or b == 1:

   print("True")

else:

   print("False")

This prints the NOR header

print("A NOR B",end =" ")

NOR is false if one of A or B is 1

if a == 1 or b == 1:

   print("False")

else:

   print("True")

This prints the XOR header

print("A XOR B",end =" ")

XOR is true if A and B are not equal

if a != b:

   print("True")

else:

   print("False")

This prints the XNOR header

print("A XNOR b",end =" ")

XNOR is true if a equals b

if a == b:

   print("True")

else:

   print("False")

This prints NOT header for A

print("NOT A",end =" ")

This prints the opposite of the input

if a == 1:

   print("False")

else:

   print("True")

This prints NOT header for B

print("NOT B",end =" ")

This prints the opposite of the input

if b == 1:

   print("False")

else:

   print("True")

Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number of organisms, their average daily population increase (as a percentage, expressed as a fraction in decimal form: for example 0.052 would mean a 5.2% increase each day), and the number of days they will multiply. A loop should display the size of the population for each day.



Input Validation.Do not accept a number less than 2 for the starting size of the population. If the user fails to satisfy this print a line with this message "The starting number of organisms must be at least 2.", display the prompt again and try to read the value. Similarly, do not accept a negative number for average daily population increase, using the message "The average daily population increase must be a positive value." and retrying. Finally, do not accept a number less than 1 for the number of days they will multiply and use the message "The number of days must be at least 1."

Answers

Answer:

// using c++ language

#include "stdafx.h";

#include <iostream>

#include<cmath>

using namespace std;

//start

int main()

{

 //Declaration of variables in the program

 double start_organisms;

 double daily_increase;

 int days;

 double updated_organisms;

 //The user enters the number of organisms as desired

 cout << "Enter the starting number of organisms: ";

 cin >> start_organisms;

 //Validating input data

 while (start_organisms < 2)

 {

     cout << "The starting number of organisms must be at least 2.\n";

     cout << "Enter the starting number of organisms: ";

     cin >> start_organisms;

 }

 //The user enters daily input, here's where we apply the 5.2% given in question

 cout << "Enter the daily population increase: ";

 cin>> daily_increase;

 //Validating the increase

 while (daily_increase < 0)

 {

     cout << "The average daily population increase must be a positive value.\n ";

     cout << "Enter the daily population increase: ";

     cin >> daily_increase;

 }

 //The user enters number of days

 cout << "Enter the number of days: ";

 cin >> days;

 //Validating the number of days

 while (days<1)

 {

     cout << "The number of days must be at least 1.\n";

     cout << "Enter the number of days: ";

     cin >> days;

 }

 

 //Final calculation and display of results based on formulas

 for (int i = 0; i < days; i++)

 {

     updated_organisms = start_organisms + (daily_increase*start_organisms);

     cout << "On day " << i + 1 << " the population size was " << round(updated_organisms)<<"."<<"\n";

     

     start_organisms = updated_organisms;

 }

 system("pause");

  return 0;

//end

}

Explanation:

A Microsoft word user clicks insert pictures what happens next

Answers

Explanation:

When you insert a picture, Word for the web places the picture in your document and displays the Picture Tools ribbon with the Format tab. Tip: To open the Picture Tools ribbon anytime you're in Editing View, select the picture. To change the picture's size or style or to add alt text, on the Format tab.

When you insert a picture, Word for the web places the picture in your document and displays the Picture Tools ribbon with the Format tab. Tip: To open the Picture Tools ribbon anytime you're in Editing View, select the picture.

What is Microsoft word?

Microsoft. Microsoft Word is a component of the Microsoft Office suite of productivity software, but can also be purchased as a stand-alone product.

Microsoft Word was initially launched in 1983, and has since been revised numerous times. It is available for both Windows and Apple operating systems.

Microsoft Word is often called simply Word or MS Word. In 1981, Microsoft hired Charles Simonyi to develop a word-processing application. The first version was released in 1983.

Initially, MS Word was not very popular, owing to its radically different look compared to WordPerfect, the leading word processor at that time. However, Microsoft improved Word continually over the years, including a 1985 version that could run on a Mac.

Therefore, When you insert a picture, Word for the web places the picture in your document and displays the Picture Tools ribbon with the Format tab.

To learn more about Microsoft word, refer to the link:

https://brainly.com/question/26695071

#SPJ2

Design a RomanNumerals class that takes a number within 1 to 10 and display the Roman numeral version of that number (I, II, III, IV, V … X). If the number entered by the user is outside the range of 1-10, the program should display an error message. Code a driver class RomanNumeralsApp to test the class by asking user to enter a number, creating an object of RomanNumerals and calling its methods getNumber, setNumber, convertNum, and displayResult to perform the described task.

Answers

Answer:

Explanation:

The following code is written in Java. It  creates a RomanNumberals class with all of the requested methods, including a convertNum method and displayResults method. The user is then asked to input a number within the main method. A RomanNumeral object is created, passed the userInput and all of it's methods are called for testing. A test output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter a number: ");

       int number = in.nextInt();

       RomanNumerals romanNumeral1 = new RomanNumerals();

       romanNumeral1.setNumber(number);

       System.out.println("Test getNumber Method: " + romanNumeral1.getNumber());

       romanNumeral1.convertNumber();

       romanNumeral1.displayResult();

   }

}

class RomanNumerals {

   int number;

   String romanNumeral;

   public RomanNumerals() {

   }

   public int getNumber() {

       return number;

   }

   public void setNumber(int number) {

       this.number = number;

   }

   public void convertNumber() {

       switch (this.number) {

           case 1: romanNumeral = "I"; break;

           case 2: romanNumeral = "II"; break;

           case 3: romanNumeral = "III"; break;

           case 4: romanNumeral = "IV"; break;

           case 5: romanNumeral = "V"; break;

           case 6: romanNumeral = "VI"; break;

           case 7: romanNumeral = "VII"; break;

           case 8: romanNumeral = "VIII"; break;

           case 9: romanNumeral = "IX"; break;

           case 10: romanNumeral = "X"; break;

           default: System.out.println("Not a valid number"); break;

       }

   }

   public void displayResult() {

       System.out.println("Number " + this.number + " is represented as " + this.romanNumeral);

   }

}

How does a distributed operating system work?

Answers

Answer:

A distributed operating system is system software over a collection of independent, networked, communicating, and physically separate computational nodes. They handle jobs which are serviced by multiple CPUs. Each individual node holds a specific software subset of the global aggregate operating system.

These systems run on a server and provide the capability to manage data, users, groups, security, applications, and other networking functions.

plz mark it as brainliest

Answer:

Explanation:A distributed operating system is system software over a collection of independent, networked, communicating, and physically separate computational nodes. They handle jobs which are serviced by multiple CPUs. Each individual node holds a specific software subset of the global aggregate operating system.

Give two examples of html structure

Answers

Answer:

semantic information that tells a browser how to display a page and mark up the content within a document

A customer would like you to install a high-end video card suitable for gaming. Your installation and configuration SHOULD include:________

Answers

Answer: • Ensure that the video card is compatible with the expansion slot

• Install video drivers from CD and then install updated drivers from the internet

• Configure the PC to use the integrated graphics if available and needed

Explanation

Your question isn't complete as you didn't put the options but I got the options online and the correct answers have been provided.

The installation and configuration for the high-end video card suitable for gaming will include:

• Ensure that the video card is compatible with the expansion slot

• Install video drivers from CD and then install updated drivers from the internet

• Configure the PC to use the integrated graphics if available and needed

Write a java program.

create a function void process(char ch, int x, int y)- to accept an arithmetic operator (+, -, /, *) in argument ch and two integers in arguments x and y. now on the basis of the operator stored in ch perform the operation in x and y and print the final result. also, write a main function to input the two integers and an arithmetic operator, and by invoking function process() print the output​

Answers

Answer:

The source code has been attached to this response. It contains comments explaining each line of the code. Kindly go through the comments.

To run this program, ensure that the file is saved as ArithmeticProcessor.java

Keep editing line 7 of the code to test for other inputs and arithmetic operation.

A sample output has also been attached to this response.

multimedia is an effective tool used in different fields such as business and education true or false​

Answers

Answer:

True

Explanation:

Multimedia is used in many fields. It is basically the ability to express something in many different ways. This allows you to more easily demonstrate a product, idea, or even a theory. Since this can be through art, video, presentation, text, live, etc. It allows you to find the best format for the specific product or idea that you are trying to present to a group of viewers. That is why it is an effective tool for various fields since it can just as easily help a company sell a product as well as help a teacher express a mathematical concept.



Every Java statement ends with: *

Period
Colon
Double quote
Semicolon

Answers

Answer:

semicolon is the answer

semi colon i did that test

Given that EAX contains FFFF80C0h, which of the following would be true after executing the CWD instruction?

a. AX=FFFFh, DX=80C0h
b. EDX=FFFFFFFFh, EAX=FFFF80C0h
c. DX=FFFFh, AX=80C0h
d. cannot be determined

Answers

Answer:

c. DX=FFFFh, AX=80C0h

Explanation:

CWD instruction set all bits in DX register with same sign as in AX register. The effect is to create a 32 bit sign result. This will have same integer value as of 16 bit.

5. Name the special window that displays data, when you insert a chart.

a) Datasheet b) Database c) Sheet​

Answers

Answer:

A.Datasheet

Explanation:

I hope it's helpful

Data can be retrieved using a query when A. The tables are linked together B. Only the tables and forms are linked together C. query and forms are linked together D. form and report are linked together​

Answers

Answer:

The table are linked together

what is it when called when businesses produce goods and services that consumers do not want​

Answers

Unsought goods.

Nobody seeks them out, because no one wants them.

Six months after a new version of an OS was released to the market, end users began to lose access to application updates. Which of the following was MOST likely the reason for this issue?A. Update limitationsB. Limited accessC. End-of-lifeD. Network connection

Answers

Answer: C. End-of-life

Explanation:

The most likely reason for the lose of access to the application updates by the end users is refered to as end-of-life.

In this case, technical support will no longer be provided by the developer and there won't be further updates to the operating system. Therefore, the correct option is C.

All of the following are design elements of a landing page that instill trust in site visitors, except Group of answer choices secure payment methods social media presence large, clear, colorful action buttons visible contact information

Answers

Answer:

large, clear, colorful action buttons.

Explanation:

A website refers to the collective name used to describe series of web pages linked together with the same domain name while a webpage is the individual HTML document (single page) that makes up a website with a unique uniform resource locator (URL).

When users (people) visit a particular website (homepage, index page or landing page) for the first time, there are certain design elements that when seen would give them a sense of security, instill trust and guarantees confidentiality of all user data (informations).

Generally, secure payment methods, social media presence, and visible contact information are design elements of a landing page that instill trust in site visitors.

However, large, clear, and colorful action buttons wouldn't do or cause any of the aforementioned actions.

5
Select the correct answer.
Jeff types a sentence She wore a new dress yesterday. He erroneously typed winstead of e in the word dress. What is the accuracy of the typed

sentence?
OA.
96.6 %
OB.
90 %
Ос.
1 %
OD.
75.4 %
Reset
Reset
Next

Answers

Answer:

75

Explanation:

Answer:

Explanation:

"She wore a new dress yesterday" has 6 words and 25 letters. Jeff got 1 word and letter wrong.

Going by letters, the accuracy = 24/25*100% = 96%

Answer is A.

If going by words, it is 5/6*100% = 84% which is not an option.

Other Questions
write a poem on the theme of relationship or identity 01:52:41 What is the next step after gathering information when making smart food choices? Decide if help is needed. Take personal responsibility. Review the decision made. Identify alternative food choices. A jacket costs $154.85. There is a 45% discount. What is the new price of the jacket.A.) $68.68B.) $85.17C.) $224.53 Two boys in the class started to fight, and they will get suspended for having a brawl. (Find out a word and its synonym from the sentence) Which function is represented by this graph? A bus takes 45 minutes to travel 48 kilometres. What is its averagespeed? A bag contains 3 black balls and 5 white balls. Paul picks a ball at random from theand replaces it back in the bag. He mixes the balls in the bag and then picks anotherball at random from the bag.a) Construct a probability tree of the problem.b) Calculate the probability that Paul picks:i) two black ballsii) a black ball in his second draw explain how to utilize the computer in rooms management.i don't need linkss! Let A = { 1 , 4 } and B = { 2 , 3 , 5 }.Find and find the number of relations from A to B Three times a number x minus a half a second number y An atom has an atomic number of 19 and mass number of 39 how many electrons and protons does it have? What is important for you when you buy a product like a computer, TV or car? Why? Please help ASAP this is timed! Brainliest if you explain a bit find the area of a circle diameter equals to 30 cm Read the excerpt from "Broken Chain."Alfonso studied the magazine pictures of rock stars for a hairstyle. He liked the way Prince lookedand the bass player from Los Lobos. Alfonso thought he would look cool with his hair razored into a V in the back and streaked purple. But he knew his mother wouldnt go for it. And his father, who was puro Mexicano, would sit in his chair after work, sullen as a toad, and call him "sissy.What details from the passage would best support a paragraph about conflict between characters?Alfonso thinking he would look good with razored, purple hair Alfonso liking the way the rock stars style their hairAlfonso thinking his father would likely call him a sissyAlfonso seeing his father sit in his chair after work Which of the following situations is an example of how culture affects supply, demand, and consumption? Give the balanced equation for the neutralisation of the excess NaOH with HCI. If 8 Superscript y Baseline = 16 Superscript y + 2, what is the value of y? During a single day at radio station WMZH, the probability that a particular song is played is 6/7. What is the probability that this song will be played on at least 5 days out of 6 days? Round your answer to the nearest thousandth. calculate (4.810)(1.210),give your answer in standard form to 3 significant figures