Answer:
Complete the program as follows:
1. Replace
String combo =
with
String combo = customerOrder.substring(0);
2. Replace
Integer comboNumber =
with
Integer comboNumber = Integer.parseInt(combo);
Explanation:
Required
Fill in the missing codes
From the code given, there are only two gaps to be filled and they are:
1. String combo =
2. Integer comboNumber =
1. String combo =
The first is to get the first index of customerOrder using substring.
The syntax of this is:
variable.substring(0);
In this case, the syntax will be replaced with:
<em>String combo = customerOrder.substring(0);</em>
Where customerOrder represents the string variables
2. Integer comboNumber =
This is to convert combo from string to integer using parseInt
This is done as follows:
Integer comboNumber = Integer.parseInt(combo);
<em>See attachment for complete code</em>
Answer:
- All variable names must begin with a letter of the alphabet or an. underscore( _ ).
-After the first initial letter, variable names can also contain letters and numbers.
-Uppercase characters are distinct from lowercase characters.
-You cannot use a C++ keyword as a variable name.
Answer and Explanation:
Using Javascript:
Class Dog{
var healthScores=[];
Constructor(name, age, ...healthScores) {this.name=name;
this.age=age;
this.healthsScores=healthScores;
}
checkObject(new Dog){
If(new Dog.name===this.name,new Dog.age===this.age, new Dog.healthScores===this.healthScores){return true;
}
else{
console.log("objects are not equal");
}
}
}
To call the method checkObject:
var Tesa = new Dog(Tes,1,[45,46,82]);
var Bingo = new Dog(bing,2,[43,46,82]);
Bingo.checkObject(Tesa);
Note: we have used ES6(latest version of Javascript) where we passed the healthScore parameter(which is an array) to our constructor using the spread operator.
On Windows, if you use CMD, there is a command called 'move' and using a Linux terminal, it's 'mv'
Answer:
Option D. Persuasive writing style
is correct answer.
Explanation:
- Alice should adopt the persuasive writing style as she wants to convince the people to adopt eco-friendly methods of living.
- When a person write persuasively, this means he/she will present justifications and reasons for that specific opinion he/she is trying to convince the audience.
- For the correctness of their opinion, different kinds of evidences are prepared so that the fact persuade the reader.
- Persuasive writing is used widely while writing academic papers, advertisements and argumentative essays as well.
<h2>
</h2><h2>
i hope it will help you!</h2>