Answer:
Explanation:
Absconding
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.
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:
12) The Windows utility returns your computer to the state it was in when it came from the factory. Erase Refresh Reset Backup Next Question
Answer:
Reset
Explanation:
PartnerServer is a Windows Server 2012 server that holds the primary copy of the PartnerNet.org domain. The server is in a demilitarized zone (DMZ) and provides name resolution for the domain for Internet hosts.
i. True
ii. False
Answer:
i. True
Explanation:
A Domain Name System (DNS) can be defined as a naming database in which internet domain names (website URLs) are stored and translated into their respective internet protocol (IP) address.
This ultimately implies that, a DNS is used to connect uniform resource locator (URL) or web address with their internet protocol (IP) address.
Windows Server 2012 is a Microsoft Windows Server operating system and it was released to the general public on the 4th of September, 2012, as the sixth version of the Windows Server operating system and the Windows NT family.
PartnerServer is a Windows Server 2012 server that was designed and developed to hold the primary copy of the PartnerNet dot org domain.
Typically, the server is configured to reside in a demilitarized zone (DMZ) while providing name resolution for the domain of various Internet hosts.
In order to prevent a cyber attack on a private network, end users make use of a demilitarized zone (DMZ).
A demilitarized zone (DMZ) is a cyber security technique that interacts directly with external networks, so as to enable it protect a private network.
QUESTIONS Which of the following use cases are suitable for compute-optimized cloud offering? ОА. None of the listed O B. Highly Scalable Multiplayer Gaming OC. Distributed Analytics O D. Scientific Modelling O E. All of the listed
Answer:
E. All of the listed
Explanation:
For compute-optimized cloud offerings like AWS, suitable use cases are - gaming, distributed analytics, and scientific modeling. Since all these are suitable, the correct answer is E.
Select the correct statement(s) regarding IP addressing.
a. IPv4 and IPv6 addressing is fully compatible with one another.
b. CIDR address format represents a Class C network only used within an intranet.
c. Subnet masks are used with both class and classless IP addresses.
d. all statements are correct.
Subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.
What is an IP address?A device on the internet or a local network may be identified by its IP address, which is a special address. The rules defining the format of data delivered over the internet or a local network are known as “Internet Protocol,” or IP.
Only C is correct, rest other statements are incorrect because:
a. IPv4 and IPv6 addressing is fully compatible with one another is incorrect. While IPv4 and IPv6 can coexist on the same network, they are not fully compatible with one another.
b. CIDR address format represents a Class C network only used within an intranet is incorrect. Classless Inter-Domain Routing (CIDR) is a technique used to allocate IP addresses more efficiently.
Therefore, subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.
Learn more about, here
https://brainly.com/question/3805118
#SPJ6
give one advantage of saving file in the same folder
Answer:
it's easier to find
Explanation:
things are much more organized
Question No: 9 Of 50 Time Left : 59:18
ОА
QUESTION
Which of the following two entities (reading from Left to right) can be connected by the dot operator?
A class member and a class object.
A class object and a class,
A constructor and a member of that class.
OB
Ос
OD
A class object and a member of that class.
Answer:b
Explanation:
to get points
Neymar machine that Run on electricity
"Neymar" = "name a"?
if so, well, there are many, like the little glowing box you use the type questions to the brainliest community, let it be a phone, a pc, or a molded Nintendo
if you meant Neymar indeed, I'm not sure if he runs on electricity, unless he is a soccer playing android somehow.
encode the original string by finding sequences in the string * where the same character repeats. replace each such sequence * by a token consisting of: the number of characters in the sequence * followed by the repeating character. * return the encoded string.
Im gonna use python3 for this example
def encode(string):
if not string:
return string
new_string = []
last_char = ""
count = 1
for char in string:
if char == last_char:
new_string.pop(len(new_string)-1)
count += 1
elif char != last_char and count > 1:
new_string.append(str(count)+last_char)
count = 1
new_string.append(char)
last_char = char
else:
last_char = char
new_string.append(char)
return "".join(new_string)
print(encode("Hello There"))
Give examples of applications that access files by each of the following methods:
+ Sequentially.
+ Random.
Answer:
Explanation:
Usually, applications would have the capability of using either one of these options. But for the sake of the question here are some that usually prefer one method over the other.
Any program that targets an API usually uses Sequential access. This is because API's contain all of the data as objects. Therefore, you need to access that object and sequentially navigate that object to the desired information in order to access the data required.
A music application would have access to an entire folder of music. If the user chooses to set the application to randomly play music from that folder, then the application will use a Random Access method to randomly choose the music file to load every time that a song finishes.
how many dog breed are there
Answer:
360 officially recognized breeds (would appreciate if given brainliest) <3
Write a program that accepts the lengths of three sides of a triangle as an input from the user: A, B, C
Validate the user input so that the user can only enter positive values for sides A, B, C. All three must be true:
A > 0
B > 0
C > 0
Answer:
The program in Python is as follows:
A = int(input("A: "))
B = int(input("B: "))
C = int(input("C: "))
while A<=0 or B <= 0 or C <= 0:
A = int(input("A: "))
B = int(input("B: "))
C = int(input("C: "))
print("Valid inputs")
Explanation:
Get input for A, B and C
A = int(input("A: "))
B = int(input("B: "))
C = int(input("C: "))
The loop is repeated until inputs for A, B and C are above 0
while A<=0 or B <= 0 or C <= 0:
Get input for A, B and C
A = int(input("A: "))
B = int(input("B: "))
C = int(input("C: "))
Print valid inputs when user inputs are correct
print("Valid inputs")
g A catch block that expects an integer argument will catch Group of answer choices all exceptions all integer exceptions any exception value that can be coerced into an integer C
Answer:
Hence the correct option is 2nd option. all integer exceptions.
Explanation:
A catch block that expects an integer argument will catch all integer exceptions.
Peter is a new business owner. Because Peter is on a strict budget, he uses an older Novell NetWare server. The NetWare server still relies on the legacy IPX/SPX network protocol suite. Peter needs to connect his server to the Internet. He decides to use a gateway instead of a router. What is the likely motive behind Peter's decision
The most likely motive of Peter's decision to use a gateway for connecting his serve to the internet is to get a wireless connection for the internet.
A gateway server is used to communicate to the internet service provider. It is used to receives the data. It helps to sends the data to the router in order to translate as well as distribute the wireless devices.
In the context, Peter who is on a strict budget uses gateway system to connect to the internet and he uses the older version of Novell NetWare server.
Learn More :
https://brainly.in/question/35731153
The internet's data pathways rely on what kind of hardware device to route data to its destination?
servers
routers
IP addresses
ISPs
Answer:
Routers
Explanation:
Essentially a router is a device used in networking that route packets of data from one computer network to another.
Answer:
routers
Explanation:
Routers are hardware devices that route the data from place to place. Data "hops" from one router to another until it reaches its destination. ISPs and IP addresses are not hardware devices. Servers are hardware devices but do not route data.
-Edge 2022
Use the tables below to show the difference between the results of a natural join, an equijoin (with PROF_CODE = 2) and a full outer join. Provide the resulting table of each join
Answer:
Code:
CREATE TABLE student (
stu_code INTEGER PRIMARY KEY,
prof_code INTEGER
);
INSERT INTO student VALUES (100278,null);
INSERT INTO student VALUES (128569,2);
INSERT INTO student VALUES (512272,4);
INSERT INTO student VALUES (531235,2);
INSERT INTO student VALUES (531268,null);
INSERT INTO student VALUES (553427,1);
CREATE TABLE professor (
prof_code INTEGER PRIMARY KEY,
dept_code INTEGER
);
INSERT INTO professor VALUES (1,2);
INSERT INTO professor VALUES (2,6);
INSERT INTO professor VALUES (3,6);
INSERT INTO professor VALUES (4,4);
The SQL NATURAL JOIN is a type of EQUI JOIN and is structured in such a way that, columns with the same name of associated tables will appear once only. In our Example, Prof_code will appear only once and it will be matched in both the table;
SELECT * FROM Student natural join Professor on student.prof_code=Professor.prof_code ;
Stud_code Prof_code Dept_code
128569 2 6
512272 4 4
531235 2 6
553427 1 2
EQUI JOIN performs a JOIN against equality or matching column(s) values of the associated tables and an equal sign (=) is used as a comparison operator in the where clause to refer to equality. In our example, it will only show the result with prof_code=2 from the natural join result.
SELECT * FROM Student join Professor on student.prof_code=Professor.prof_code where student.prof_code=2;
Stud_code Prof_code Prof_code Dept_code
128569 2 2 6
531235 2 2 6
In SQL the FULL OUTER JOIN combines the results of both left and right outer joins and returns all (matched or unmatched) rows from the tables on both sides of the join clause.
SELECT * FROM professor full outer join student on professor.prof_code=student.prof_code ;
Stud_code Prof_code Prof_code Dept_code
100278
128569 2 2 6
512272 4 4 4
531235 2 2 6
531268
3 6
553427 1 1 2
Calculator is an example of
computer
A. analogue
B. hybrid
C. manual
D. digital
E. public
D. digital
Explanation:
I hope it helps you
Code Example 9-1 struct Product { string name; double price; int quantity; }; (Refer to Code Example 9-1.) Given a Product object named product, which of the following statements would you use to display the value of the name data member on the console? a. cout << product::name; b. cout << product.name; c. cout << product("name"); d. cout << product[0];
Answer:
a. cout << Product ::name;
Explanation:
Computer software use different languages which helps user to initiate command. When a user initiates command the results are displayed according to input command. If product name is required as output then insert command should be product::name; this will display names of different products present in the system.
Why is it useful for students to practice the MLA and APA citation methods?
Answer:
Citing or documenting the sources used in your research serves three purposes:
It gives proper credit to the authors of the words or ideas that you incorporated into your paper.
It allows those who are reading your work to locate your sources, in order to learn more about the ideas that you include in your paper.
What are the Strategies to Maintain a Healthy Sales Funnel?
Answer:
Use LinkedIn Automation Tools to Level Up Your Prospecting GameKnow Your Target AudienceSync With Prospects' InterestsPolish Your LinkedIn ProfileCreating and maintaining a healthy sales pipeline is challenging but not impossible.
The B2B world has changed, and you need to adopt new strategies to build a healthy pipeline. Choose the best LinkedIn automation tool, optimize your profile, know your audience and share personalized content for quick outcomes.
25. Các phát biểu nào sau, phát biểu nào là đúng:
- tên file không được chứa khoảng trắng
- tên file không nên có dấu tiếng viết
- tên file được dài trên 255 ký tự
- tên file được chấp nhận ký tự khác
(1)similarities between backspace key and delete key. (2) different between backspace key and delete key. (3) explain the term ergonomics. (4) explain the following. a click b right click double click d triple click e drag and drop.
Answer:
ddhejaajegxhzi
Explanation:
jfrhsjadigugud
Over-activity on LinkedIn?
Answer:
Being over-enthusiastic and crossing the line always get you in trouble even if you’re using the best LinkedIn automation tool in the world.
When you try to hit the jackpot over the night and send thousands of connection requests in 24 hours, LinkedIn will know you’re using bots or tools and they will block you, temporarily or permanently.
This is clearly against the rules of LinkedIn. It cracks down against all spammers because spamming is a big ‘NO’ on LinkedIn.
What people do is that they send thousands of connection requests and that too with the same old spammy templates, “I see we have many common connections, I’d like to add you to my network.”
It will only create spam.
The LinkedIn algorithm is very advanced and it can easily detect that you’re using a bot or LinkedIn automation tool and you’ll be called out on it.
An engineer is configuring AMP for endpoints and wants to block certain files from executing. Which outbreak control method is used to accomplish this task
Question Completion with Options:
A. device flow correlation
B. simple detections
C. application blocking list
D. advanced custom detections
Answer:
The outbreak control method that is used to accomplish the task of configuring AMP for endpoints and to block certain files from executing is:
C. application blocking list
Explanation:
The application blocking list creates a list of application files, which the AMP continuously tracks and analyzes to compare the file activities with previous cyber attacks. Specifically, the AMP for Endpoints is a cloud-managed endpoint security solution, which provides a retrospective alert to prevent cyber-security threats, and rapidly detects, contains, and remediates malicious files on the endpoints.
continuously tracks and analyzes files and file activities across your systems, and compares these events to what preceded or happened in past attacks. If a file exhibits malicious behavior, the AMP provides you with a retrospective alert which enables you to stop a potential threat from succeeding.
Is IBM 1041, Minicomputer? Yes or no
Answer:
No
Explanation:
To nest one structure within another structure, you a. define both structures and then create a data member of the nested structure type within the other structure b. create a container that holds objects of the nested structure type and then include the container within another structure c. define the nested structure within another structure
Answer:
Hence the correct option is option a) define both structures and then create a data member of the nested structure type within the other structure.
Explanation:
To make Address nested to Employee, we've to define Address structure before and out of doors Employee structure and make an object of Address structure inside Employee structure.
For example, we may need to store the address of an entity employee in a structure.
please give me correct answer
please give me very short answer
Answer:
1.A table is a range of data that is defined and named in a particular way.
2.Table tools and layout
3.In insert tab Select the table and select the number of rows and colums
4.Split cell is use to split the data of a cell.Merge cell is used to combine a row or column of cells.
5.Select the cell and click down arrow next to the border button.
5. A student wants to send a picture to the printer, how should they
send it?
a. 0,99,0
b. -65, 10, 5,0
c. 115, 118,0
d. #584504
Answer:
d
Explanation:
Write a program get_price.py with a function get_price() that takes a dictionary of fruits as an argument and returns the name of the most expensive fruit. Each item of the dictionary includes: A key: the name of the fruit A value: the price of the fruit.
Answer:
The program is as follows:
def get_price(fruits):
AllPrice = fruits.values()
value_iterator = iter(AllPrice)
mostExpensive = next(value_iterator)
for item in fruits:
if fruits[item]>=mostExpensive:
mostExpensive = fruits[item]
fruitName = item
print(fruitName)
fruits = {}
n = int(input("Number of Fruits: "))
for i in range(n):
name = input("Fruit name: ")
price = int(input("Fruit price: "))
fruits[name] = price
get_price(fruits)
Explanation:
This defines the get_price function
def get_price(fruits):
This gets all price in the dictionary fruit
AllPrice = fruits.values()
This passes the values to a value iterator
value_iterator = iter(AllPrice)
This initializes mostExpensive to the first price in the dictionary
mostExpensive = next(value_iterator)
This iterates through the elements of the dictionary
for item in fruits:
If current element is greater than or equals most expensive
if fruits[item]>=mostExpensive:
Set most expensive to the current element
mostExpensive = fruits[item]
Get the corresponding fruit name
fruitName = item
Print fruit name
print(fruitName)
The main begins here
This initializes the fruit dictionary
fruits = {}
This gets input for the number of fruits
n = int(input("Number of Fruits: "))
This is repeated for every inputs
for i in range(n):
Get fruit name
name = input("Fruit name: ")
Get fruit price
price = int(input("Fruit price: "))
Append name and price to dictionary
fruits[name] = price
Call the get_price function
get_price(fruits)
3. Write a program that prompts the user to input an integer that represents cents. The program will then calculate the smallest combination of coins that the user has. For example, 27 cents is 1 quarter, 0 nickle, and 2 pennies. That is 27=1*25+0*5+2*1.
Answer:
The program in Python is as follows:
cents = int(input("Cents: "))
qtr = int(cents/25)
cents = cents -qtr * 25
nkl = int(cents/5)
pny = cents -nkl * 5
print(qtr,"quarters,",nkl,"nickels,",pny,"pennies")
Explanation:
This gets input for cents
cents = int(input("Cents: "))
This calculates the quarters in cents
qtr = int(cents/25)
This gets the remaining cents
cents = cents -qtr * 25
This calculates the nickel in remaining cents
nkl = int(cents/5)
This calculates the pennies in remaining cents
pny = cents -nkl * 5
This prints the required output
print(qtr,"quarters,",nkl,"nickels,",pny,"pennies")