Answer:
The code to this question can be given as:
class Sample //define class Sample.
{
//define private member.
private int count;
private String name;
Sample(int count, String name) //define parameterized constructor.
{
this.count = count; //holding values.
this.name = name;
}
public int getCount() //define function with returntype.
{
return count;
}
public String getName() //define function with returntype.
{
return name;
}
public void setCount(int count) //define function with no returntype.
{
this.count = count;
}
public void setName(String name) //define function with no returntype.
{
this.name = name;
}
}
Explanation:
In the above code firstly we define the class that is Sample. In this class, we define two variable that is not public. Then we define the constructor. This code we parameterized constructor because it takes the values as a parameter. To assign the value in the constructor we use this keyword. Then we used the get and set method. when we use get method because it returns a value (getcount and getname). When we use the set method it does not return any value (setcount and setname).
Answer:
Explanation:
The following code is written in Java. It creates a program that asks the user how many cookies they want to make. Then it adjusts the original recipe based on the ratio of the original amount of cookies it makes to the amount the user wants. Finally, passing the output of the new adjusted recipe to the user. Due to technical difficulties, I have added the code as a txt file attached below.
JavaScript
was primarily designed to run in the user interface (top) tier of a web
application.
<span>
To add, </span>JavaScript<span>, <span>often
abbreviated as "JS", is a high-level, dynamic, untyped, interpreted
run-time language. It has been standardized in the ECMAScript language
specification.</span></span>
Answer: Bookmark File
Explanation: Cache is like short term memory, like history on a web browser. You can manually clear it, just like on the web. If you bookmark a file though, it gets saved to memory, and you can call on it later
Answer:
C) By using OR function
Explanation:
Given
Employees database
Required
Check for employees that are continuous in work or not depending on age
The solution to this question lies in the question itself.
From the question, we are to check for
<em>....employees that are continuous in work </em><em>or</em><em> not depending on age</em>
<em />
Notice that the question does not imply the usage of an if-function but, the usage of an or function as indicated by the text in bold.
So.
If an employee is continuous in work, the function will return true
If an employee does not depend on age limit, the function will return true
<em>The function will return false, if both conditions are not true</em>