Answer:
(b) (int)(Math.random() * 101)
Explanation:
Given
[tex]min = 0[/tex] --- minimum
[tex]max =100[/tex] --- maximum
Required
Java expression to generate random integer between the above interval
The syntax to do this is:
(int)(Math.random((max - min) + 1) + min)
Substitute the values of max and min
(int)(Math.random((100 - 0) + 1) + 0)
Simplify the expression
(int)(Math.random(100 + 1) + 0)
(int)(Math.random(101) + 0)
(int)(Math.random(101))
Hence, the right option is:
(b) (int)(Math.random() * 101)
Design and implement a program that manages coffees. First, implement an abstract class named Coffee. The Coffee class has three member variables: coffee type, price, and store name. The Coffee class has an abstract method name ingredient. Make sure to add all necessary setters and getters as well as other methods. The class Coffee implements an interface HowToMakeDrink. The interface has the following method: g
Answer:
interface HowToMakeDrink{
public void ingredient();
public void makeDrink();
}
class Coffee implements HowToMakeDrink{
String type;
double price;
String name;
public void ingredient(String ...items){
for (String i : items){
System.out.println('%s\n', i);
}
}
public makeDrink(){
System.out.println('Your '+ %s +' is ready', this.name);
}
public getType(){
return this.type;
}
public getPrice(){
return this.price;
}
public getName(){
return this.name;
}
public setType(String type){
this.type = type;
}
public setPrice(double price){
this.price = price;
}
public setName(String name-){
this.name = name;
}
}
Explanation:
The Coffee class is used to implement the HowToMakeDrink interface. The class uses the set and get methods to assign and retrieve the values of the class variables. It so implements the ingredient and makeDrink methods of the required interface.
Dutermine the number of hosts in each of the subnet in the network shown in Figure ?
Answer:
Neither answer so far is correct. Assuming you are starting with a class B address, you have 10 bits for subnets. 2^10 is 1024. So 1024 subnets are available.
Each subnet will have 6 bits for hosts. 2^6 = 64. We subtract 2 for the first and last address in the subnet, so 62 host addresses are available per subnet.
Explanation:
there is the example
with detail in image
Explain the function of different flags in the 8086
Answer:
A flag is a piece of fabric (most often rectangular or quadrilateral) with a distinctive design and colours. It is used as a symbol, a signalling device, or for decoration.8086 has 16-bit flag register, and there are 9 valid flag bits.The FLAGS register is the status register in Intel x86 microprocessors that contains the current state of the processor. This register is 16 bits wide. Its successors, the EFLAGS and RFLAGS registers, are 32 bits and 64 bits wide, respectively. The wider registers retain compatibility with their smaller predecessors.
What Service is an AWS service that helps you maintain application availability and enables you to automatically add or remove EC2 instances according to conditions you define
Answer:
AWS EC2 auto scaling
Explanation:
The Amazon EC2 auto scaling is the service provided by AWS which helps one to maintain the application availability and also to enable one to automatically add as well remove the EC2 instances as per the conditions one wishes for.
One can add the EC2 or remove it manually in a combination with the AWS auto scaling for the predictive scaling of the application. We can also use dynamic and the predictive scaling features of the EC2 Auto Scaling so as to add or remove the EC2 instances
The C++ standard library provides code that’s organized into a. folders b. namespaces c. sublibraries d. none of the above
Answer:
Namespaces ( B )
Explanation:
The codes in the C++ standard library are organized into folders Known as namespaces .
namespaces are general used to organize various codes into logical groups to avoid name collisions that may occur when there is the presence of multiple libraries in a code base.
What is this? pls answer if you know
Answer:
LV. 200Explanation:
:::::::::::::::::/
What is E-Commerce? Answer The Following. Pls Help Me
Answer: Ecommerce, also known as electronic commerce or internet commerce, refers to the buying and selling of goods or services using the internet, and the transfer of money and data to execute these transactions.
Explanation: Brainelist Me :)
implementations
in c++ programming when finding lcm and gcd in c++
Answer:
#include<iostream>
using namespace std;
int lcm(int m, int n) {
int a;
a = (m > n) ? m: n;
while (true) {
if (a % m == 0 && a % n == 0)
return a;
++a;
}
}
int gcd(int m, int n) {
int r = 0, a, b;
a = (m > n) ? m : n;
b = (m < n) ? m : n;
r = b;
while (a % b != 0) {
r = a % b;
a = b;
b = r;
}
return r;
}
int main(int argc, char **argv) {
cout << "Enter the two numbers: ";
int m, n;
cin >> m >> n;
cout << "The LCM of two numbers is: " << lcm(m, n) << endl;
cout << "The GCD of two numbers is: " << gcd(m, n) << endl;
return 0;
}
Explanation:
sihle bought half adozen KOO canned beans from a wholesale.how many cans did she get?
Which technology do online storesusually use to present customized content?
Online stores usually
use _____ technology to present customized content.
Answer:
real time analytics technology
Explanation:
Online stores usually use real-time analytics technology to present customized content. Explanation: Real-time analytics is gaining popularity nowadays. It is basically the procedure of measuring and preparing the data as it enters the database
If a program compiles fine, but it produces an incorrect result, then the program suffers from _______________.
If a program compiles fine, but it produces an incorrect result, then the program suffers from Logic Error.
What is program?A program has been the set of the instructions that the computer can follow that are written in a programming language. The size of the computer program affects the likelihood that an error may occur. To create an executable that a computer can run, a C program needs to be run through a C compiler. Programs are collections of instructions that a computer follows. Function is an ordered, reusable code unit.
When a program is syntactically sound but has a bug that is only discovered during program execution, it is said to have a runtime error. The Java compiler is unable to catch these errors during compilation; instead, the Java Virtual Machine (JVM) only notices them when the application is running. Runtime problems may occur when a website uses HTML code that is incompatible with a web browser's capabilities.
Therefore, if a program compiles fine, but it terminates abnormally at runtime, then the program suffers a runtime error.
To learn more about program, refer to the link below:
brainly.com/question/11023419
#SPJ2
additional devices attached to computers to expand thier functionality are?
Answer:
Peripheral
Explanation:
Computer hardware that is added to expand a computer's capabilities
. Attach 2 screen shots of a Windows screen, showing menus, toolbars, Windows, Folders, sub- folders, directories, sub-directories, and views. Change the view between the two screen shots. Provide a short explanation of what you are showing with your screen shots.
Answer:
Explanation:
The following pictures show a basic file manager open in a Windows operating system. As you can see from the two pictures It shows the regular folders which are located in the pictures folder within the Windows OS, with all of the normal menus and toolbars that come with the default Windows OS file manager. The second picture shows the sub-directories and sub-folders of the files within the Camera Roll folder from the first image.
quá trình xử lý dữ liệu (OSI) bên máy gởi, nhận có vẽ hình minh họa
Answer:
haywood is and best president for you me ravi in the a for and have to the a and should you of lost
Which of the following is a virtual space, used for internal communications, that allows employees to share files and work together?
O Intranet
O Internet
O Telnet
O World Wide Web
Answer: intranet
Intranet is run on local networks only, but it is created based on the world wide web.
What's the difference between repetition and selection control structure.
Answer:
Selection statements test conditions and selectively execute code depending on the outcome of the test condition, whereas repetition statements repeat a set of statements till a test condition is satisfied.
Answer:
repetition control structure is the grouping of codes which are designed to repeat a set of of related statements whereas selection control structure performs different computations based on the result that is obtained after checking conditions
Design and Analyze an algorithm for the following problem,
Give pseudocode for your algorithm.
Prove that your algorithm is correct.
Give the recurrence relation for the running time for your algorithm.
Solve the recurrence relation.
Suppose you are given 3n marbles that look identical, with one special marble that weighs more than the other marbles. You are also given a balancing scale that takes two items (or sets of items) and compares their weights. Design and analyze a divide and conquer algorithm to find the heavy marble using the balancing scale at most n times.
Answer:
If you have 3n marbles, then you need at least n weighings to find the heavier marble.
Algorithm:-
Label all marbles from 1 to n.
Divide the marbles into three groups G1, G2, and G3 such 2 groups G1, and G2 are compared to every other employing a pan, and therefore the third group G3 is kept aside.
Condition 1- If G1>G2, If the special marble is one among the primary two groups that are being weighed,i.e., special marble is in G1.
Condition 2- If G2>G1, If the special marble in group 2, G2.
Condition 3- If G1=G2 If the primary two groups weigh equal, then special marble is present within the third group, G3.
Take the group containing special marble and perform the above steps 1,2,3,4 on it.
Keep repeating the above steps until, a gaggle of three marbles is obtained, and therefore the special marble is found from that group by performing steps 1,2,3,4 on the group.
Explanation:
Pseudocode:-
function puzzle( G1, G2, G3)
{
Compare the values G1, G2
if G1>G2
return G1
else if G2>G1
return G2
else
return G3
end of function puzzle
}
function main()
{
print prompt "Enter the value of n"
Take the value of n from the user
while(n != 0)
{
Create 3 groups/arrays each of size 3n-1
G= puzzle( g1,g2,g3)
n= 3n-1
}
print the value in G
end of main
}
Recurrence relation for the running time for the algorithm:-
T (n) = 2T ( n1/3) + 1 with base T (3) = 1.,
here n is the total number of marbles.
We cannot apply the master theorem because of the cube root, so we draw the recursion tree.
First, we determine the height of the tree; denote this by h. By observing the powers of the arguments in the tree, we can see that in order to get to the base case of n = 3, it must be that,
n(1/2)h=3
(1/3)h=logn(3) = log 3/ log n = 1/log n
3h=log n
Now, since we do a constant amount of work (1, specifically) at each node in the recursion tree, we note that at depth d in the recursion tree we do 3d total work. We can therefore write the sum over the tree as a geometric series as follows:
[tex]T(n)= \sum_{d=0}^{log(logn)}3^d = (1-3^{log(log(n)+1)})/1-3)=(3^{log(log(n)+1)}-1)/2\\T (n) = 3 log (n)-1[/tex]
Therefore,
T (n) = Θ(log n).
Which task is suitable for a manual process? Marvin’s software requires accurate, consistent testing. Yesenia's software requires, at most, one or two tests. Ahmad's software will be tested outside normal business hours. Braelyn’s software is subject to routine testing.
Answer:
The task that is suitable for a manual process is:
Yesenia's software requires, at most, one or two tests.
Explanation:
Manual testing of software involves a tester playing the end user's role to detect defects in the software. In such a test, the tester applies most of the features embedded in the software to ensure correct processing and output. Since Yesenia's software requires one or two tests, there is no need to automate the testing as a manual process will be economical.
Construct a SQL query that displays a list of colleges, their sity/state, the accrediting agency, and whether or not the school is distance only. Only show the first 10 records.Modify the previous query such that only colleges in New Jersey, Pennsylvania and Deleware are displayed. Only show the first 10 records.Modifiy the query such that only colleges in Philadelphia are displayed, and sort the results by the name of the college. Only show the first 10 records.Modifiy the query above to show only colleges in New Jersey, Pennsylvania and Deleware, that only offer courses online (distance education). Display only the college names, in alphabetical order.Construct a query that shows all colleges, their city/state, where the college URL's top level domain is NOT .edu, and courses are only offered online.
write a program to print the given number is prime or composit using do while loop
Answer:There are 28 chocolate-covered peanuts in 1 ounce (oz). Jay bought a 62 oz. jar of chocolate-covered peanuts.
Problem:
audio
How many chocolate-covered peanuts were there in the jar that Jay bought?
Enter your answer in the box.
Explanation:There are 28 chocolate-covered peanuts in 1 ounce (oz). Jay bought a 62 oz. jar of chocolate-covered peanuts.
Problem:
audio
How many chocolate-covered peanuts were there in the jar that Jay bought?
Enter your answer in the box.
Write a C# program named DoubleDecimalTest thatdeclares and displays two variables - a double and a decimal.Experiment by assigning the same constant value to each variable sothat the assignment to the double is legal but the assignment tothe decimal is not. In other words, when you leave the decimalassignment statement in the program, an error message should begenerated that indicates the value is outside the range of the typedecimal, but when you comment out the decimal assignment and itsoutput statement, the program should compile correctly.
Answer:
whatt is this na ni??
Explanation:
Importance
computer
In the
printing industry
Answer:
restate your question
Explanation:
What is the biggest problem with technology today?
Answer:
Employee productivity measurements and too mich focus on automation.
In the future, will training
and education become
more or less desirable?
To young children and students it'll be less desirable as they just want to play, I mean this is a natural characteristic of children so there's nothing to blame on them, but to young adults like college students and also parents, it's likely to be more desirable as they want their children to have a bright future through studying hard and landing themselves in good jobs. however, to some parents they might find it less desirable as they do not want their children to have pressure or and form of stress since it might still be the strawberry generation in the future.
mention five features on the desktop screen
Answer:
The Windows desktop has the following program access points:
Work area. The onscreen area where users can perform their work, as well as store programs, documents, and their shortcuts. ...
Start button. ...
Quick Launch. ...
Taskbar. ...
Deskbands. ...
Notification area.
Explanation:
Write a C++ program which accepts the quantity of a product purchased and prints the amount to be paid by the customer.
Answer:
firstly the exel program is very useful to costumer or to calculate by Microsoft. People use it to company or office. It works for make good commination
What is 4÷15-18×27.6
You are in charge of five software development projects. The ‘characteristics’ of each of your projects are as follows:
• Project 1: Web-site for a local company. Relatively small system. Requirements are unclear and likely to change in the near future.
• Project 2: A very large embedded system whose requirements can be easily identified and are relatively stable.
• Project 3: A ‘standard’ business application. You have developed similar systems like this one in the past.
• Project 4: A relatively complex administrative system for one of the local hospitals. Some of the requirements seem to be pretty unclear, but all the requirements are stable.
• Project 5: A small real-time control system to be used for monitoring patients in a local hospital.
Consider the following software development approaches/models: waterfall, throw-away prototyping, evolutionary prototyping, component-based development, formal development. Which of the above approaches/models would you choose for each of your projects? Briefly explain your choices.
With the GIS moving into the cloud, developers of enterprise applications based on SAP, Microsoft Office, SharePoint, MicroStrategy, IBM Cognos, and Microsoft Dynamics CRM are not using it to create a wide range of mobile applications.
a. True
b. False
Answer:
):
Explanation:
PLEASE HELP!!!
What is the next line?
>>> tupleC = (3, 8, 11, 8, 8, 11)
>>> tupleC.index(11)
O 3
О 0
O 2
O 1