JavaFX application for the Sublime Sandwich Shop. The user can order sandwiches by using list boxes and the application displays the price. Each sandwich should allow a choice of at least three main ingredients (chicken, for example) at three different prices. The user should also be able to choose between three different bread types. Use CheckBoxes for additional ingredients - lettuce, tomato, etc.
Create an ArrayList to hold all of the sandwiches associated with an order. Display information about all the sandwiches that were ordered.

Answers

Answer 1

Answer:

package GUI;  

import java.awt.*;  

import java.awt.event.*;  

import javax.swing.*;

// Class SandwichShop definition

public class SandwichShop

{

// Creates a string array for sandwich ingredients  

String sandwichIngredients [] = {"Chicken", "Mutton", "Veg"};

// Creates a string array for bread types

String breadTypes[] = {"Bloomer", "Cob", "Plait"};

// Container object declared

JFrame jf;

JPanel p1, p2, p3, p4, mainP;

// Component object declared

JList ingredient, bread;

JLabel ingL, breadL, amountL;

JTextField amountT;

JButton amountB, exitB;

// Default constructor definition

SandwichShop()

{

// Creates frame

jf = new JFrame("Sandwich Shop");

// Creates panels

p1 = new JPanel();

p2 = new JPanel();

p3 = new JPanel();

p4 = new JPanel();

mainP = new JPanel();

// Creates list box and adds string array

ingredient = new JList<String>(sandwichIngredients);

bread = new JList<String>(breadTypes);

// Creates labels

ingL = new JLabel("Select Sandwich Ingredients");

breadL = new JLabel("Select Bread Types");

amountL = new JLabel("Amount: ");

// Creates text field

amountT = new JTextField(5);

// Creates buttons

amountB = new JButton("Check Amount");

exitB = new JButton("Exit");

// Adds components to panels

p1.add(ingL);

p1.add(ingredient);

p2.add(breadL);

p2.add(bread);

p3.add(amountL);

p3.add(amountT);

p4.add(amountB);

p4.add(exitB);

// Adds panels to main panel

mainP.add(p1);

mainP.add(p2);

mainP.add(p3);

mainP.add(p4);

// Set the main panel layout to 4 rows and 1 column

mainP.setLayout(new GridLayout(4, 1));

// Adds main panel to frame

jf.add(mainP);

// Sets the frame visible property to true

jf.setVisible(true);

// Set the size of the frame to width 400 and height 150

jf.setSize(400, 300);

// Registers action listener to exit button using anonymous class

exitB.addActionListener(new ActionListener()

{

// Overrides the actionPerformed() method

public void actionPerformed(ActionEvent ae)

{

System.exit(0);

}// End of method

});// End of anonymous class

// Registers action listener to amount button using anonymous class

amountB.addActionListener(new ActionListener()

{

// Overrides the actionPerformed() method

public void actionPerformed(ActionEvent ae)

{

// Extracts index of the selected item from the list box

int indexIngredient = ingredient.getSelectedIndex();

int indexBread = bread.getSelectedIndex();

// Checks if ingredient index is 0 and bread index is 0

// then set the amount 100 in text field

if(indexIngredient == 0 && indexBread == 0)

amountT.setText("100");

// Checks if ingredient index is 0 and bread index is 1

// then set the amount 120 in text field

if(indexIngredient == 0 && indexBread == 1)

amountT.setText("120");

// Checks if ingredient index is 0 and bread index is 2

// then set the amount 160 in text field

if(indexIngredient == 0 && indexBread == 2)

amountT.setText("160");

// Checks if ingredient index is 1 and bread index is 0

// then set the amount 190 in text field

if(indexIngredient == 1 && indexBread == 0)

amountT.setText("190");

// Checks if ingredient index is 1 and bread index is 1

// then set the amount 205 in text field

if(indexIngredient == 1 && indexBread == 1)

amountT.setText("205");

// Checks if ingredient index is 1 and bread index is 2

// then set the amount 210 in text field

if(indexIngredient == 1 && indexBread == 2)

amountT.setText("210");

// Checks if ingredient index is 2 and bread index is 0

// then set the amount 97 in text field

if(indexIngredient == 2 && indexBread == 0)

amountT.setText("97");

// Checks if ingredient index is 2 and bread index is 1

// then set the amount 85 in text field

if(indexIngredient == 2 && indexBread == 1)

amountT.setText("85");

// Checks if ingredient index is 2 and bread index is 2

// then set the amount 70 in text field

if(indexIngredient == 2 && indexBread == 2)

amountT.setText("70");

}// End of method

});// End of anonymous class

}// End of default constructor

// main function definition

public static void main(String[] args)

{

// Creates an anonymous object by calling default constructor

new SandwichShop();

}// End of main method

}// End of class

Output:

JavaFX Application For The Sublime Sandwich Shop. The User Can Order Sandwiches By Using List Boxes And

Related Questions

how to count binary ? Help Better understand this question

Answers

Explanation:

For each row in the picture, you have to switch on some of the bits to create the number on the left.

Each bit has a value, a "weight" so to speak. By switching on the bit, you add that weight to the sum.

These "weights" are shown at the top row.

So to create 4, it's easy, you just switch on the '4' bit.

Same for 128, only one bit has to be switched on.

40 is a bit more involved, now you have to switch on 32 and 8, since 32+8 is 40.

For every number, there is exactly one combination of switched on bits to create that number. In the case of 40, the binary representation is:

00101000.

state the base of correct addition of 27 + 6 =34​

Answers

Answer:

9

Explanation:

lets do calculations with ONLY the rightmost digits, ie., 7 + 6 = 4, so we're ignoring the carry.

Then, following must be true as well:

7+5 = 3

7+4 = 2

7+3 = 1

7+2 = 0 <= this reveals our base 9

7+1 = 8

7+0 = 7

Consider the following declaration:
String s = "cat";
Which of the following statements assigns the number of characters in s to k?

A. int k = s.length;
B. int k = s.length();
C. int k = s.size;
D. int k = s.size();

Consider the following declarations:
String s1 = "apple";
String s2 = "apple";
What is the result of s1.compareTo(s2)?

A. true
B. false
C. 0
D. 1

Consider the following declarations:
String s1 = "apple";
String s2 = "APPLE";
Which of the following expressions is true?

A. s1.equals(s2) && s1.equalsIgnoreCase(s2)
B. !s1.equals(s2) && s1.equalsIgnoreCase(s2)
C. s1.equals(s2) && !s1.equalsIgnoreCase(s2)
D. !s1.equals(s2) && !s1.equalsIgnoreCase(s2)

Answers

Answer:

B, C, B

Explanation:

According to my understanding of these questions, these are in Java.

For the first one, there is a built in function called .length() for a string, so it's answer B.

For the second one, this should come out as C, 0 since compareTo compares the ascii values of the characters.

The third one's answer should be B. s1.equals(s2) for characters that are caps and not caps comes out with false, so ! would negate it. s1.equalsIgnoreCase(s2) would come out as true, ignoring the cases of APPLE.

A user is following the instructions of a help desk technician and is attempting to launch System File Checker from the command-line interface. Each time the user types sfc /scannow and presses Enter, the utility fails to run, and an error appears stating the command must be run using an elevated command prompt.

Answers

The user must open the command-line interface using Run as administrator.

What is property in educational technology

Answers

1. It is based on scientific and technological advancements.
2. It is more a practical discipline and less a theoretical one.
3. It is a fast growing modern discipline.
4. It makes use of the research findings of psychology, sociology, engineering, sciences and social psychology etc., and applies the same to the field of education.
5. It brings pupils, teachers and technical means together in an effective way.
6. It is the science of techniques and methods. It locates the problems in the field of education, remedies them and ultimately aims at improving the education system.
7. It is bound to improve the teacher, the learner and the teaching learning process.

List the four types of computer cases

Answers

Answer:

full-tower, mid-tower, mini-tower, and SFF(Small Factor Form).

I hope it helps.

This is the answer. Hope it’s helpful

Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source. Nested lists The “*” operator List slices The “+=” operator A list filter A list operation that is legal but does the "wrong" thing, not what the programmer expects Provide the Python code and output for your program and all your examples.

Answers

Lists are used in Python to hold multiple values in one variable

(a) Nested list

A nested list is simply a list of list; i.e. a list that contains another list.

It is also called a 2 dimensional list.

An example is:

nested_list = [[ 1, 2, 3, 4]  , [ 5, 6, 7]]

(b) The “*” operator

The "*" operator is used to calculate the product of numerical values.

An example is:

num1 = num2 * num3

List slices

This is used to get some parts of a list; it is done using the ":" sign

Take for instance, you want to get the elements from the 3rd to the 5th index of a list

An example is:

firstList = [1, 2 ,3, 4, 5, 6, 7]

secondList = firstList[2:5]

The “+=” operator

This is used to add and assign values to variables

An example is:

num1 = 5

num2 = 3

num2 += num1

A list filter

This is used to return some elements of a list based on certain condition called filter.

An example that prints the even elements of a list is:

firstList = [1, 2 ,3, 4, 5, 6, 7]

print(list(filter(lambda x: x % 2 == 0, firstList)))

A valid but wrong list operation

The following operation is to return a single list, but instead it returns as many lists as possible

def oneList(x, myList=[]):

   myList.append(x)

   print(myList)

oneList(3)

oneList(4)

Read more about Python lists at:

https://brainly.com/question/16397886

During boom times, which of the
following is true?
A. less tax revenue is being paid by businesses
B. less tax revenue is being paid by consumers
C. more tax revenue is being collected from businesses
and consumers
D. tax increases are causing unemployment and job
loss

Answers

During boom times, the option that was true is that less tax revenue is being paid by businesses.

How does the taxation system can boom a economy?

The use of taxation is one that affect incentives, as taxes can influence supply and demand factors.

Note that by lowering marginal tax rates on wages and salaries, can bring about the zeal for people to work more and earn more.

Therefore, During boom times, the option that was true is that less tax revenue is being paid by businesses.

Learn more about  boom times from

https://brainly.com/question/26020324

#SPJ2

Write a description about this picture

Answers

Answer:

A cube which has holes in it, represented by circles and it has an oval/sphere on top of the figure

Explanation:

Answer: A Square with circular holes and a tall round circle/torus sticking out of the top circle hole in all there are 6 circular holes 1 square and 1 tall round circle/torus

Explanation:

Im sorry if this isnt what you meant if it isnt i can try again

Yvonne is matting a series of photos as an anniversary gift for her parents. She hopes that they will cherish this gift for years to come but is concerned because she can’t afford the really nice mat board. What is Yvonne MOST LIKELY worried about?

A.
that the mat will turn black

B.
that the mat will take over the picture

C.
that the mat will disintegrate

D.
that the mat will discolor and deteriorate

Answers

Answer:

That the mat will discolor and deteriorate

Explanation:

D

Yvonne will most likely worry that the mat will discolor and deteriorate. The correct option is D.

What is matting in photos?

Matting is a decorative border that surrounds the artwork. It is typically built of mat board, a type of board designed specifically for this purpose. After cutting the mat board to size, one or more holes (entries) are cut in the mat board to act as windows for displaying art.

Matting is the technique of separating an image's foreground and background components. Typically, the photos are of a frame or a video file. It adds a decorative edge to the print and a mechanism for hanging the photo.

Matting involves using a front or window mat to separate the image from the frame's glass and to give an extra border around the photo.

Therefore, the correct option is D. that the mat will discolor and deteriorate.

To learn more about matting in photos, refer to the link:

https://brainly.com/question/28279935

#SPJ2

list 3 things needed in order to complete mail merge process.



pls help me!​

Answers

There are three documents that are involved in the mail merge process:

1- the main document
2- the data source
3- the merged document.

what is the relationship between interrupt and buffer

Answers

Answer:

Operating systems have some code called an 'interrupt handler', which prioritises the interrupts and saves them in a queue. Buffers are used in computers as a temporary memory area, and they are essential in modern computers because hardware devices operate at much slower speeds than the processor.

Consider our authentication protocol 4.0, in which Alice authenticates herself to Bob, which we saw works well (i.e., we found no flaws in it.). Now suppose that at the same time that Alice authenticates herself to Bob, Bob must authenticate himself to Alice. Give a scenario by which Trudy, pretending to be Alice, can now authenticate herself to Bob as Alice.

Answers

According to protocol 4.0, the scenario can be defined in terms of Bob, Alice and Trudy as follows:

The communication is done between Bob and Alice only in whom they share a secret key KAB with each other. The Trudy is an intruder who wants to get the information that is being communicated between Alice and Bob. To do so, Trudy wants Bob to initiate the communication by authenticating herself her Alice. Thus, Trudy waits for the Bob to start in-order to make the Bob authenticate himself.

Here are the steps how the communication is done between the Bob and Trudy:

Step 1: Bob starts the communication by himself to other side and waits for the reply.

Step 2: Trudy starts to disguise as Alice herself and authenticate herself to Bob.

Step 3: After looking at the reply, Bob sends the nonce key to Trudy. At this step, still Trudy does not know the KAB(R) in-order to reply to Bob.

Step 4: At this point Trudy response to the step-1 while Bob still continuing to authentication. Trudy picks the nonce for the Bob to encrypt the message with the Bob sent nonce in the Step-3.

Step 5: Now Bob completes his own authentication to himself on the other side of encrypting the nonce he sent at step 4. Where, Trudy gets the nonce key KAB( R).

Step 6: Now, Trudy completes her authentication in responding to R that is sent by Bob in step 3. At this point, Trudy has responded properly, so Bob thinks that he is communicating with Alice(Trudy).

The actual scenario with respect to above steps, the communication is done as follows:

Bob: “I am Bob”

Trudy: “I am Alice”

Bob: “R”

Trudy: “R”

Bob: “KAB (R )” – Bob completes his authentication.

Trudy: Get the KAB (R ) – Trudy complete her authentication.

Thus, the communication is started between the Bob and Trudy instead of Bob and Alice according to protocol 4.0.

1. Import it into Eclipse. Open the file in Eclipse 2. Edit the file to add comments to identify the instance variables, constructors headings and method headings 3. Edit the file to build and add the UML in the Header comment of the code. You must do a very thorough job and be sure to pay attention to the details. 4. Save your Flower.java file. 5. Upload your updated Flower.java file here.package during_class_session;public class Flower{private String NameofFlower;private double PriceofFlower;public Flower() {this.setNameofFlower("No name yet");this.setPriceofFlower(0.0);}public Flower(String nameofFlower_initial, double priceofFlower_initial) {this.setNameofFlower(nameofFlower_initial);this.setPriceofFlower(priceofFlower_initial);}public String getNameofFlower() {return NameofFlower;}public void setNameofFlower(String nameofFlower) {NameofFlower = nameofFlower;}public double getPriceofFlower() {return PriceofFlower;}public void setPriceofFlower(double priceofFlower) {PriceofFlower = priceofFlower;}}

Answers

Answer:

/

Explanation:

Add comma(s) where needed, if needed.


My birthday October 31 2005 is on Halloween.


My birthday October 31 2005 is on Halloween. (no change)


My birthday October 31, 2005, is on Halloween.


My birthday October 31, 2005 is on Halloween.


My birthday, October 31, 2005, is on Halloween.

Answers

Answer:

My birthday, October 31, 2005, is on Halloween.

Explanation:

The correct option with commas is "My birthday, October 31, 2005, is on Halloween."

Why is this correct?

The revised sentence "My birthday, October 31, 2005, is on Halloween." correctly uses commas to separate the date from the year and to set off the date as an appositive.

This improves clarity and follows proper punctuation rules.

Hence,. The correct option with commas is "My birthday, October 31, 2005, is on Halloween."

Read more about commas here:

https://brainly.com/question/2142088

#SPJ2

write a short paragraph (three to four sentences) that explains how it works for computers and internet communications in relation to cybersecurity.

Answers

Answer:

Public and private keys form the basis for public key cryptography, also known as asymmetric cryptography. In public key cryptography, every public key corresponds to only one private key. Together, they are used to encrypt and decrypt messages. If you encode a message using a person’s public key, they can decode it using their matching private key.

Explanation:

Change up the wording.

how many MB are there in 1000 KB?

Answers

Answer:

1 megabyte

Explanation:

Ok so there should be 1

Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in StudentInfo.tsv. Assume the number of students is at least 1 and at most 20.
The program performs the following tasks:
Read the file name of the tsv file from the user.
Open the tsv file and read the student information.
Compute the average exam score of each student.
Assign a letter grade to each student based on the average exam score in the following scale:
A: 90 = < X o
B: 80 = < x < 90
C: 70 = < X < 80
D: 60 = < x < 70
E: X < 60
• Compute the average of each exam.
• Output the last names, first names, exam scores, and letter grades of the students into a text file named report.txt. Output one student per row and separate the values with a tab character.
• Output the average of each exam, with two digits after the decimal point, at the end of report.txt. Hint: Use the setprecision manipulator to format the output.
Ex: If the input of the program is:
StudentInfo.tsv
and the contents of StudentInfo.tsv are: 70 45 59
Barrett Edan 96 97 88
Bradshaw Reagan 73 94 80
Charlton Caius 88 61 36
Mayo Tyrese 90 86 45
the file report txt should contain
Barrett Edan 70 45 59 F
Baadha Boagan 9e 157 89 A
Charlton Caius 73 94 80 B
Mayo and Tyrese 58 61 36 D
Stern and Brenda 90 36 45 C
Average midterm 83.40, midterm2 76.60, final 61.60

Answers

#include
#include
#include
#include
#include
#include


using namespace std;

// Class student required to store the data
class Student{
public:
string lname;
string fname;
int marks[3];
char grade;

// Function which generates the grade for student
void calculate_grade(){
double sum = 0;
for(int i=0;i<3;i++){
sum+= marks[i];
}
double average = sum/3;
if(average>=90 && average<100)
this->grade = 'A';
else if(average>=80)
this->grade = 'B';
else if(average>=70)
this->grade = 'C';
else if(average>=60)
this->grade= 'D';
else this->grade = 'F';
}
};

// This function reads the file , and creates a vector of Students data
vector read_file(string fileName){

// Opening the file
fstream fin;
fin.open(fileName);


// Temp variables
vector list;
vector row ;
string line, word, temp;

// Read the data into vector
while(getline(fin,line)){
row.clear();
stringstream s(line);

while(getline(s,word,'\t')){

row.push_back(word);

}
Student st;
st.fname = row[0];
st.lname = row[1];
st.marks[0] = stoi(row[2]);
st.marks[1] = stoi(row[3]);
st.marks[2] = stoi(row[4]);
st.calculate_grade();
list.push_back(st);
}
fin.close();
return list;
}

// This function takes filname to be output as input, and list of student
void writeFile(string filename, vector list){

// Opening the new file
ofstream fin(filename);
for(int i=0;i string line = list[i].fname+"\t"+list[i].lname+"\t"+to_string(list[i].marks[0])+"\t"
+to_string(list[i].marks[1])+"\t"+to_string(list[i].marks[2])+"\t"+list[i].grade+"\n";
fin<
}


// Find the stats required
double average1 =0,average2 =0 ,average3 = 0;
for(int i=0;i average1+=list[i].marks[0];
average2+=list[i].marks[1];
average3+=list[i].marks[2];
}
average1/=list.size();
average2/=list.size();
average3/=list.size();

// Writting the stats
fin<<"\n"<<"Average: "<<"mid_term1 "<
// Closing the file
fin.close();
}
int main(){

// Taking the input
cout<<"Enter the filename: ";
string filename;
cin>>filename;
vector list;

// Reading and Writting to the file
list = read_file(filename);
writeFile("report.txt",list);


}

In this exercise we have to use the knowledge of the JAVA 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:

using namespace std;

// Class student required to store the data

class Student{

public:

string lname;

string fname;

int marks[3];

char grade;

// Function which generates the grade for student

void calculate_grade(){

double sum = 0;

for(int i=0;i<3;i++){

sum+= marks[i];

}

double average = sum/3;

if(average>=90 && average<100)

this->grade = 'A';

else if(average>=80)

this->grade = 'B';

else if(average>=70)

this->grade = 'C';

else if(average>=60)

this->grade= 'D';

else this->grade = 'F';

}

};

// This function reads the file , and creates a vector of Students data

vector read_file(string fileName){

// Opening the file

fstream fin;

fin.open(fileName);

// Temp variables

vector list;

vector row ;

string line, word, temp;

// Read the data into vector

while(getline(fin,line)){

row.clear();

stringstream s(line);

while(getline(s,word,'\t')){

row.push_back(word);

}

Student st;

st.fname = row[0];

st.lname = row[1];

st.marks[0] = stoi(row[2]);

st.marks[1] = stoi(row[3]);

st.marks[2] = stoi(row[4]);

st.calculate_grade();

list.push_back(st);

}

fin.close();

return list;

}

// This function takes filname to be output as input, and list of student

void writeFile(string filename, vector list){

// Opening the new file

ofstream fin(filename);

for(int i=0;i string line = list[i].fname+"\t"+list[i].lname+"\t"+to_string(list[i].marks[0])+"\t"

+to_string(list[i].marks[1])+"\t"+to_string(list[i].marks[2])+"\t"+list[i].grade+"\n";

fin<

}

// Find the stats required

double average1 =0,average2 =0 ,average3 = 0;

for(int i=0;i average1+=list[i].marks[0];

average2+=list[i].marks[1];

average3+=list[i].marks[2];

}

average1/=list.size();

average2/=list.size();

average3/=list.size();

// Writting the stats

fin<<"\n"<<"Average: "<<"mid_term1 "<

// Closing the file

fin.close();

}

int main(){

// Taking the input

cout<<"Enter the filename: ";

string filename;

cin>>filename;

vector list;

// Reading and Writting to the file

list = read_file(filename);

writeFile("report.txt",list);

}

See more about JAVA at brainly.com/question/2266606

Game Changer Technologies has four software teams. Each of them is developing four different examples of its new game app. Which software development methodology is used by the Game Changer teams

Answers

The software development methodology used by the Game Changer teams is called; Prototyping

We are given that;

- Game changer technologies has four software teams

- Each of the teams develops 4 different examples of the new game app.

Now, since each of them is developing four four different examples of its new game app, the method being used is called prototyping. This is because prototyping is referred to as the early approximation of the final system of a product whereby such a product is built, tested and rebuilt if required until an acceptable prototype is achieved.

When the acceptable prototype is gotten, then it will be used to develop its final game app.

Read more about prototype at; https://brainly.com/question/25824140


• R7.9 Write enhanced for loops for the following tasks.
a. Printing all elements of an array in a single row, separated by spaces.
b. Computing the maximum of all elements in an array.
2. Counting how many elements in an array are negative.

Answers

Answer:

a is the correct answer

Explanation:

correct me if I'm wrong hope it's help thanks

Write a program that generates 100 random numbers and keeps a count of how many of those random numbers are even and how many of them are odd.

Answers

Answer:

import random

numbers = []

even = 0

odd = 0

for i in range(100):

   numbers.append(random.randint(1, 200))

for i in range(100):

   if numbers[i] % 2 == 0:

       even += 1

   else:

       odd += 1

print("Even:", even)

print("Odd:", odd)

Explanation:

Gg ez.

a
2 A car is fitted with the latest GPS navigation system. This device is controlled
by an embedded system in the form of a microcontroller.
Describe the inputs needed by the embedded system and describe which
outputs you would expect it to produce.
b Since updates to the GPS device are required every six months, explain how
the device is updated without the need to take the car to the garage every six
months.

Answers

Answer:

It probaly connected to the internet in some way to resieve updates

Hope This Helps!!!

You have just purchased a brand new Windows 8 computer. What should you do right away with the Administrator account?

Answers

The correct answer is:

Enable EFS for the account

Filtering is a function of _____.

Answers

The answer is: switches.

Explanation:

Filtering is a function of switches.

what is office course
how to learn office course

Answers

Answer:

It includes Word, to create, polish, and share documents; Excel, to analyze and visualize data; PowerPoint, to create, collaborate, and effectively present ideas; OneNote, to organize ideas into a digital notebook; Outlook, to organize email, coordinate schedules, and stay up to date with contacts; Access, to create .

Hope this helps you XD ✌️

check image dont answer if you dont know please

Answers

Answer:

Explanation:

1-2nd option

2-1st option

3-last option

hope this helps!! have a good rest of ur day!! <3

Write a program that simulates applying a "boost" to a spaceship in a spaceship race game.
A spaceship makes progress by getting a "boost" value between 0 and 10. The boost value
is determined from generating a random number between 0 and 10. Assuming the starting
distance of the spaceship is 0, the program will output the boost value and the total
distance travelled by the spaceship after applying the boost. (Note: Two newlines are output
after the final output of the program).
When a random seed value of 2 is used, the output of the program will look like:
Boost: 6
Distance travelled: 6

Answers

Programming languages can be used to simulate several scenarios; in this case, the "boost"

The simulating program in C++ where comments are used to explain each line is as follows:

#include<iostream>

#include<cstdlib>

#include<ctime>

using namespace std;

int main() {

 // This sets the seed to time(0)

 srand(time(0));

 // This generates a random number between 0 and 10, to represent the boost

 int boost = rand()%10;

 // This prints the required outputs

 cout << "Boost: " << boost;

 cout << "\nDistance travelled: " << boost;

 return 0;

}

Read more about similar programs at:

https://brainly.com/question/16240699

What was the main limitation of computer networking that the invention of the Robert website of the 1990s

Answers

Answer:

The TCP/IP protocol could only be used in universities, governments, and businesses. People around the world could not send data to one another.

Buddys machine shop has a kiosk computer located in the lobby for customers to use. The kiosk computer has recently been updated to Windows 10 from Windows 7 and is not part of a domain. The local computer policy created for Windows 7 has been applied to Windows 10. This policy severely restricts the use of the computer, so that customers can only use the web browser.
Occasionally, an administrator needs to sign in to the kiosk computer to perform maintenance and update software. However, this is awkward because the administrator needs to disable settings in local policy be performing any task. Then, when the tasks are complete, the administrator needs to re-enable the settings in the local policy. Explain how this system can be improved upon.

Answers

If your PC's are in an Active Directory domain, you can leverage Active Directory Group Policies to deploy the appropriate settings. Be sure to include the below settings in your Group Policy for the user accounts and workstations that will be running as a Kiosk. After creating this Group Policy, you can test by running gpupdate /force and then restarting the PC.

User Configuration
Administrative Templates
Start Menu and Taskbar
Change Start Menu power button (enabled) - set to "Lock" (I know this sounds weird, but Windows 7 won't completely disable Logoff if the Start Menu power button is defaulting to the Logoff action).
Remove Logoff on the Start Menu (enabled)
Remove and prevent access to the Shut Down, Restart, Sleep and Hibernate commands (enabled)
System
Ctrl+Alt+Del Options
Remove Lock Computer (enabled)
Remove Logoff (enabled)
Computer Configuration
Administrative Templates
System
Logon
Hide entry points for Fast User Switching (enabled)
For Windows PCs not in a Domain Environment

If your PC's are not in an Active Directory domain, then you'll need to make the below changes manually at each Kiosk PC. Note that you may be able to automate the changes via the use of operating system imaging tools and local mandatory user profiles - leave a comment below if you have interest in those steps.

Login at each Kiosk PC using a user account that will ultimately be used to run the Kiosk desktop applications.
Launch the Windows Registry Editor (REGEDIT.EXE) and make the following changes to the registry (note that you may need to temporarily grant local Administrative access to your Kiosk user account to do this if it is already in a very locked down state)
HKEY_CURRENT_USER
SOFTWARE
Microsoft
Windows
CurrentVersion
Policies
Explorer

state an application that would be better to write c++ than java and give a rationale for your answer

Answers

Microsoft Visual Studio is the best deal
Other Questions
Brett had always hoped to live on the seashore What is the phrase?What type of phrase is it? A student mixes 20.0gof white KCl crystals with distilled water in a beaker. After the mixture was stirred, no crystals are visible and the solution is clear. After several days, all of the water evaporates and white crystals are found in the beaker. Which of following pieces of experimental evidence would best help the student to confirm that a new compound had not been made and that only a physical change occurred?a- The solution does not change color after stirring.b- The KCl crystals are no longer visible after mixing with water.c- There is a temperature change in the solution during the dissolving process.d- After the water has evaporated, the white crystals in the beaker have a mass of 20.0g Complete the sentence with the correct form in the preterite or the imperfect of the verb in parentheses, based on context.Ayer fui a la doctora porque no ____(sentirse) bien. What were the major goals of the Vietnam War? Presentation topic "Revelation"written by flannery "O'Connor" identify the figurative device,charater analysis,themes,symbols,authour background,relate the author background to the story,characteristic of authors age and find those very characteristics in the story? Find the roots of the equation: y^2-1/16=0 how many sightings of fish in spongebob were there, person who gets it right will get brainliest on god on everything What should you do before inserting a wire into an outlet box?A. Place a bushing inline.B. Remove a foot of the outer covering.C. Clean the terminals.D. Strip at least three inches and re-twist the strands to retighten. describe how the artificial heart is different from a normal heart 1.041. Complete the chart belowStatesEconomyLeadersSouthernMiddleNew Englandi need someone to answer in the next 40 minutes if you do you get 100 points Questions that prespecify the set of response alternatives and the response format are called ________. The length of a rectangle is 5cm more than its breadth . if the perimeter of the rectangle is 40cm , find the dimension of the rectangle .Don't give unwanted ans to get the pointsno spams and plagiarism ( kindly stay out of the question if you don't know the ans ) well explained ans needed thx !! 80 cm of 2m express as percentage what is found in the body cells but not sex cells solve one step equation -9x = 45 Summarize the Baker v. Carr court case. Include the vocabulary words census, reapportionment, redistricting, and gerrymandering. An estuary is _______.For environmental science plz helpp my dad ever come back Job advertisements can found in stores and on billboards. They aslo can be found on websites, magazines, and newspapers. At noon, a tank contained 8 in. of water. After several hours, it contained 6 in. of water. What is the percent decrease of water in the tank?