create a traffic light control program that will do the following things: 1. remove the traffic control logic from the main program. 2. add methods to the traffic light objects that will (1) allow them to talk to each and (2) control how they display green / yellow / red.

Answers

Answer 1

The color of the traffic light, Red indicates a stop or a danger sign, yellow indicates caution, and green indicates you may start walking with caution. Typically, red lights contain some shades of orange, and green lights contain some shades of blue.

Traffic light explanation

Each installation of a traffic light aims to have one or more of the following functions: to obtain an orderly traffic movement, to increase the traffic capacity at crossroads, to reduce the frequency of certain types of accidents. The whole world must use the same traffic lights in terms of colors, namely red, yellow and green.

Learn more about traffic lights:

brainly.com/question/28033780

#SPJ4


Related Questions

How do you use the fill handle to copy the formula in cell b11 to cells C11 and D11?

Answers

Cell C11 contains the formula you want to copy. Observe the fill handle located in the lower-right corner. Place your mouse over the fill handle, until the arrow becomes a black cross. Drag the fill handle across the cells D11 and E11 and then release the mouse button.

What is MS-Excel?

Microsoft's spreadsheet program Excel is a part of the Office family of products used for commercial applications. Users of Microsoft Excel can format, arrange, and calculate data in a spreadsheet.

What is spreadsheet?

A spreadsheet is a piece of software that can store, display, and edit data that has been organized into rows and columns. One of the most used tools for personal computers is the spreadsheet. In general, a spreadsheet is made to store numerical data and short text strings.

To fill handle to copy the formula in cell b11 to cell c11 and D11:

Select the range B8:E8.Choose Fill from the Edit menu, and from the Fill submenu choose Right.Select cell C11 and enter the formula =B11*1.02.Select the range C11:C13 and choose Fill from the Edit menu, and from the Fill submenu choose Down.

Learn more about MS Excel click on this:

https://brainly.com/question/24749457

#SPJ4

What is strong password policy?

Answers

A strong password policy states that a secure password must have at least 8 characters for your computer or computer network. Any of your private information, such as your real name, username, or business name, should not be included. It ought to differ significantly from the passwords you've previously used. It shouldn't contain any words that are completely spelled.

What is Cybercrime?

Cybercrimes are crimes committed via a computer or computer network. Either the computer was the target of the crime or it was employed in its commission.

Cybercrime is an illegal action that either targets or makes use of a computer, computer network, or networked device. It may compromise someone's security or financial stability.

Most cybercrimes are performed by hackers or cybercriminals who are motivated by financial gain. Both individuals and organizations are capable of committing cybercrime. Some cybercriminals are well-organized, employ cutting-edge methods to hack your computer network, and possess exceptional technical proficiency. Some hackers are amateurs.

To learn more about Cybercrime, use the link given
https://brainly.com/question/13109173
#SPJ4

given that integer array x has elements 5, 10, 15, 20, what is the output?

Answers

Note that where the integer array x has elements 5, 10, 15, 20 the output will be "Error: Invalid access" (Option D)

What is an integer Array?

An integer array is a collection of integers or "whole numbers" that may be used for a variety of computations. An integer is a number that has no fractions. Integers are entire integers that may be both positive and negative, such as zero, one, and a negative one.

In mathematics, integer arrays are often utilized. The array might be specified within parenthesis for use in a computation or equation. The array can be as big or small as needed. The array is a commonly used mathematical concept in computer programming.

Arrays use a single identifier to represent numerous data components of the same kind. The index number makes it simple to access or search for an element in an array. An array may be simply accessed by incrementing the index by one.

Learn more about Integer Array:
https://brainly.com/question/15048840
#SPJ1

Full Question:

Given that integer array x has elements 5, 10, 15, 20, what is the output?

int i;

for (i = 0; i < 4; ++i) {

System.out.print(x[i] + x[i + 1]);

}

Question options:

A) 10, 15, 20, 5

B) 15, 25, 35, 25

C) 15, 25, 35, 20

D) Error: Invalid access

create a phone book program that enables users to enter names and phone numbers of friends and acquaintances. create a structure to hold contact information, and use calloc() to reserve the first memory segment. the user should be able to add or modify phone book entries through a menu. use the realloc() function to add contiguous memory segments to the original memory block when a user adds a new phone book entry.

Answers

The phone book program that enables users to enter names will be:

#include<stdio.h>

#include<stdlib.h>

struct phonebook{

char name[10];

double phoneno;

};

int main()

{

int t,i,total;

typedef struct phonebook phone;

phone *arr;

arr = (phone *)calloc(1,sizeof(phone));

printf("want to add a phone number:(0/1)\t");

scanf("%d",&t);

i = 1;

while(t!=0)

{

printf("enter name:\t");

scanf("%s",arr[i-1].name);

printf("enter phoneno:\t");

scanf("%lf",&arr[i-1].phoneno);

printf("want to add a phone number:(0/1)\t");

scanf("%d",&t);

i++;

arr = (phone *)realloc(arr,i*sizeof(phone));

}

total = i;

for(i=0;i<total-1;i++)

{

printf("name:\t%s",arr[i].name);

printf("\tphoneno:\t%.0lf\n",arr[i].phoneno);

}

What is a computer program?

A computer program is a set of instructions written in a programming language that a computer can execute. Software includes computer programs as well as documentation and other intangible components.

Source code refers to a computer program in its human-readable form. The program based on the information is illustrated above.

Learn more about program on:

https://brainly.com/question/26642771

#SPJ1

computers and robots can perform a wide range of routine physical work activities better, cheaper, faster, and more safely than humans. true false

Answers

It is true, robots and computers can not only perform a range of routine physical work activities better and more cheaply than humans.

What is the difference between robots and humans?

According to the neuroscientist, that's exactly what it is, the difference between the value and price of personal experiences – what differentiates us from robots. “Human experiences have another level of complexity and many of them cannot be replaced in depth by any machine”, he adds.

In addition to repetition, robots help humans with their precision, which is far superior in all aspects. If built correctly, it can perform millimeter movements without any deviation, something beyond most people's capabilities.

See more about robots at brainly.com/question/15561225

#SPJ1

What are uses of Spreadsheet

Answers

Answer: The three most common general uses for spreadsheet software are to create budgets, produce graphs and charts, and for storing and sorting data. Within business spreadsheet software is used to forecast future performance, calculate tax, completing basic payroll, producing charts and calculating revenues.

Explanation:

Answer: You can use it to storing and sorting data and to produce graphs  , it also has other uses.

Some automated troubleshooting programs identify certain keywords in the customer’s query to provide potential solutions to the query. For example, ‘There is no display on my mobile phone screen.’ The keywords ‘display’ and ‘phone’ would link to common problems with a phone display. Analyse the requirements for this system and design, develop, test and evaluate a program to identify keywords in a query typed in by the user and provide a linked solution to common problems related to a mobile device from a selection stored in a text file or database. You will need to identify appropriate keywords that can be linked to general advice related problems. You need to account for variations in the form of the user input e.g. one user may query ‘There is no display on my mobile phone’, another user may query ‘My phone screen is blank.’

Answers

We may group all terms into four basic types of intent when conducting research to determine a user's motivations for conducting a search: commercial, transactional, informational, and navigational.

What is navigate?

The term navigate is a field of study that concentrates on the process of observing and controlling the movement of a trades or vehicle from one place to another field of navigation includes four general collections: land navigation, marine navigation, aeronautic navigation, and space navigation

A database table's records are retrieved using a SQL SELECT statement in accordance with clauses (such as FROM and WHERE) that define criteria. As for the syntax: the following query: SELECT column1, column2 FROM table1, table2 WHERE column2='value';

Therefore, a user's motivations for conducting a search: commercial, transactional, informational, and navigational.

Learn more about navigating here:

https://brainly.com/question/8888625

#SPJ1

Select the statement XXX that will correctly swap the values in smallArray[0] and smallArray[2].
int temp;
int smallArray[] = {5, 12, 16};
XXX

Answers

The statement XXX that will correctly swap the values in smallArray[0] and smallArray[2] are:

temp = smallArray[0];

smallArray[0] = smallArray[2];

smallArray[2] = temp;

What is a statement in coding?

A statement is a grammatical unit of an imperative computer language that expresses some action to be performed. A program developed in this language is made up of a series of one or more statements.

A program code can contain a variety of statements that regulate the input and output of the tasks that the program is supposed to do.

A coding instruction that is used to compare data, express and make judgments. A conditional statement instructs a program to do action based on whether a condition is true or false. It's frequently expressed as an if-then or if-then-else expression.

Learn more about statements:
https://brainly.com/question/13735734
#SPJ1

a netbios suffix may identify a computer or server being enumerated as a domain controller. why do hackers often exert more effort to attack computers identified as domain controllers?

Answers

Hackers frequently expend more effort attacking domain controllers because they provide more information, such as logon names for user accounts and network resources.

What is Domain controllers?

On computer networks, a domain controller is a server that responds to authentication requests and verifies users. Domains are a hierarchical method of organizing users and computers that share a network. The domain controller organizes and secures all of that data

The domain controller (DC) is the box that houses the kingdom's keys—Activ Directory (AD). While attackers can use a variety of techniques to gain elevated access to networks, including attacking the DC itself, you can not only protect your DCs from attackers, but also use them to detect cyberattacks in progress.

To learn more about Domain controllers, visit: https://brainly.com/question/25664001

#SPJ1

listen to exam instructions a user calls the help desk. each time he creates a new text file, permissions of 640 are applied to the file, and he must use chmod to set them to 644. what command should you enter in the user's profile to set the default permission for newly created files to 644?

Answers

umask 0022 is the command that should be entered in the user's profile to set the default permission for newly created files to 644.

Mention any ten LINUX commands.

ls - The most frequently used command in Linux to list directories.pwd - Print working directory command in Linux.cd - Linux command to navigate through directories.mkdir - Command used to create directories in Linux.mv - Move or rename files in Linux.cp - Similar usage as mv but for copying files in Linux.rm - Delete files or directories.touch - Create blank/empty files.ln - Create symbolic links (shortcuts) to other files.cat - Display file contents on the terminal.

To learn more about LINUX commands, use the link given
https://brainly.com/question/28331559
#SPJ4

we are going to revisit our course assignment. however, there is going to be some changes. stop when and only when the user has exactly five courses. whenever the user must add courses, accept a comma-separated list of courses, and add each of them. o before adding the course, remove any whitespace around its name, and correct its capitalization. whenever the user must drop courses, accept a comma-separated list of courses, and delete each of them. o treat the names the same way as you add them and the comparisons will be easy. o you need to check for, and ignore, courses the user is trying to drop courses they are not taking!

Answers

Using the knowledge in computational language in python it is possible to write a code that comma-separated list of courses, and delete each of them.

Writting the code:

def printCourses(l):

   if len(l)==0:

       print("You aren't currently taking any courses.")

   else:

       print('You are currently taking these courses:')

       for i in range(len(l)):

           print(str(i+1)+': '+l[i])

#main

l=[]

printCourses(l)

while(len(l)!=5):

   if len(l)<5:

       s=input('What courses would you like to take? ')

       s = s.split(',')

       for i in s:

           l.append(i.strip().capitalize())

   else:

       s=input('What courses would you like to drop? ')

       s = s.split(',')

       for i in s:

           if i.strip().capitalize() in l:

               l.pop(l.index(i.strip().capitalize()))

   printCourses(l)

See more about python at brainly.com/question/12975450

#SPJ1

What is the benefit of password policy?

Answers

Answer:

Passwords provide the first line of defense against unauthorized access to your computer and personal information. The stronger your password, the more protected your computer will be from hackers and malicious software. You should maintain strong passwords for all accounts on your computer. While you may not be able to control user's activities 100%, it enables you to guide them for their own safety.A password strength rule is a rule to which a password must conform. For example, password strength rules might specify that the minimum number of characters of a password must be 5.

The standards for judging whether a new password is secure are set forth in a password policy.

For instance, password strength guidelines can mandate that a password have a minimum of five characters.

What is IBM® Security Privileged?

Privilege credential and access management, application identity management, and session recording are all provided by an appliance-based solution known as the IBM® Security Privileged Identity Manager.

A password policy specifies the requirements that passwords for a service must meet, including the minimum length and character types that are acceptable and unacceptable. The password policy may further specify that if a word is in a dictionary of objectionable words, it is prohibited from being entered. Before selecting this option in the user interface, you must first load a dictionary.ldif file into the IBM® Security Privileged Identity Manager.

The following standards and other guidelines for passwords are available to you:

The shortest and longest lengthslimitations on charactersReusing passwords frequentlyUser IDs or names that are not permittedSet a password's minimum age.

Establishing password guidelines:

An administrator can create a password policy to be used with one or more services. A rule that states that a character can only be used three times in a password, for instance, could be established in your password policy.

Making a rule for password policies:

As an administrator, you can add a rule to an existing password policy. For example, you could create a rule that requires a minimum number of digits in a password.

Altering the password guidelines:

An administrator can change a password policy to conform to your company's password requirements. For instance, you could change a password policy to state the required minimum and maximum number of characters.

Altering a password policy stipulation:

A password policy rule may be modified by an administrator. You may, for instance, modify or eliminate the settings for an existing rule.

A password policy being deleted:

A password policy that is no longer required to regulate password entries can be deleted by an administrator.

Individual password guidelines:

The IBM Security Privileged Identity Manager server allows you to include special logic for password generation. The logic can be added using a particular rule, a customized generator, or a mix of the two.

Learn more about password policy click here:

https://brainly.com/question/28389547

#SPJ4

select one or more: group of answer choices it is best practice to create one maintenance plan to support all databases for an instance a database user needs to be a part of the sysadmin role in order to execute sql server agent jobs database maintenance plans do not require sql server agent sql server job schedules can be attached to multiple sql server agent jobs or none at all sql server agent jobs cannot be run simply based on cpu idle time; a specific start time is required each sql server instance has its own sql server agent process database maintenance plans help automate many standard dba maintenance tasks.

Answers

A database maintenance plan is a list of specified, preventative actions that must be taken on a regular basis to maintain the performance and availability of databases.

Open the SQL Server Enterprise Manager, then go to your server using the hierarchy. Expand the Management folder under the server. To launch the Database Maintenance Plan Wizard, right-click Database Maintenance Plans under Management and choose New Maintenance Plan. To guarantee the availability and performance of the database, you must monitor and improve the database server. Updating statistics, tracking database, server, and space usage, and organizing backup and recovery plans are all part of maintaining DB2 and Oracle databases.

Learn more about database here-

https://brainly.com/question/6447559

#SPJ4

write a program that operates like a cashier terminal in a grocery store. it begins by prompting for the number of different items being purchased and then starts a loop. in the loop, the program should prompt for the item description, price and quantity of each item being purchased. these three values should be passed as arguments to a custom function that is defined in a separate module file. the imported function should print the subtotal for the item and return it to main. the total should be printed in main after the loop ends.

Answers

Using the knowledge in computational language in python it is possible to write a code that operates like a cashier terminal in a grocery store.

Writting the code:

def subtotal(description, price, quantity):

total = price * quantity

print("Item: " + description + ", subtotal: $" + str(round(total, 2)))

return total

import subtotal

num = int(input("How many different items are being purchased? "))

total = 0

for i in range(num):

desc = input("Enter description of item " + str(i+1) + " ")

price = float(input("Enter price of item " + str(i+1) + " "))

quant = int(input("Enter the quantity for item " + str(i+1) + " "))

total = total + subtotal.subtotal(desc, price, quant)

print("\nYour total is $" + str(round(total, 2)))

See more about python at brainly.com/question/12975450

#SPJ1

consider the following indicators in the ir process. no incident response plan no recording of commands failure to control access to digital info failure to report what best describes this status?

Answers

A phrase which best describes the aforementioned status in an incident response (IR) process is common forensic mistakes.

What is incident management?

Incident management can be defined as a strategic process through which a business organization (company or firm) identifies, analyzes, and correct hazards and potential problems, in order to ensure that normal service operation is restored as quickly as possible to its end users after a disruption, as well as to prevent a re-occurrence of these hazards and mistakes in the future.

Generally speaking, some examples of common forensic mistakes (indicators) in an incident response (IR) process include the following:

"No incident response plan.""No recording of commands." "Failure to control access to digital info.""Failure to report.""Underestimating the scope of an incident."

Read more on incident management here: brainly.com/question/11595883

#SPJ1

when blogging for business, you can write without using proper grammatical conventions, as long as you write with an authentic voice. True or False

Answers

The given statement is false because, when you write blogs for business, you cannot write without using proper grammatical conventions, just only with an authentic voice.

A business blog is a regular feature representing part of an online publication that generally relates to a particular, service, product, or topic. A business blog consists of personal commentary and articles by one or multiple authors. The business blog is usually appearing on a company’s website; some business blogs may feature on an independent commentator’s site.

Whenever a business blog is written it is ensured that the author makes it error-free if there are any grammatical or spelling errors. For this purpose, the author requires to make use of proper grammatical conventions with an authentic voice.

You can leran more about blogging at

https://brainly.com/question/10893702

#SPJ4

To decompress a file using the gzip command, which parameter do you need to use?.

Answers

Gzip has compression levels ranging from 1 to 9, with 9 providing the highest compression but the slowest performance.

A nice balance between speed and compression ratio can be found in the default compression level of 6, which is 6. HTTP compression, a method for accelerating the transmission of HTML and other content on the World Wide Web, uses the gzip format. According to RFC 2616, it is one of the three accepted formats for HTTP compression. We may use gunzip with filename as an input to recover our original, uncompressed file. 7. Gzip cannot be used to uncompress files. Utilizing the gzip function is quite easy. You only need to type "gzip" and the file's name to compress it.

Learn more about compression here-

https://brainly.com/question/13707757

#SPJ4

Before you use a plugin, you have to know all but one of the following. Which one is it?

a. the options that it provides
b. the HTML that it requires
c. the methods that it provides
d. how its CSS works

Answers

Answer:

d. how its CSS works

Explanation:

A JavaScript utility called PostCSS converts your CSS code into an abstract syntax tree (AST) and then offers an API (application programming interface) for JavaScript plugins to analyze and change it. It offers a wide range of plugins to carry out various tasks, like linting, minifying, inserting vendor prefixes, and many other things.

Postcss-import is one of the most fundamental and crucial plugins to utilize. We can import CSS files into other files using it. Visit src/style.css in the postcss-tutorial repository to see how to utilize this plugin.

Click here to learn more about CSS here

https://styleguide.brainly.com/220.4.0/docs/

#SPJ4

Other Questions
What process produces most of the nadh that contributes to atp synthesis in the cell?. how many triangles can be constructed with the side lengths of 5 inches, 8 inches, and 20 inches Yall should please help me this is the 8th time am asking this Analyze the photo below and answer the question that follows.Photo by Erwin ColeWhat are the structures shown in the photo above, and why were they created? During a race, all members of a rowing team should keep the oars parallel to produce maximum speed. Let m1 = 6x + 18 and m2 = 9x +12, and x = 10. What type of angle pair are angles 1 and 2? (3 points)Find the measure of angles 1 and 2. Show your steps. (4 points)Are the oars parallel? Which theorem would be used to prove that the oars are parallel? (3 points) What is the general form of the equation of the line shown? in gothic era cathedrals, the use of architectural innovations like the flying buttress and ribbed vaulting provided builders the opportunity to open up the walls for the installation of windows allowing light believed to be the physical manifestation of the divine spirit to illuminate the building. When preparing a solution in a cuvette, make sure to handle the cuvette by the choose. And avoid touching the choose. . Then, choose. The cuvette before placing it in the spectrophotometer. The graph shows the change in the duration of the sea-ice melt season in attic from 1980 to 2015. The blue band represents the time between when ice began to melt and when it froze each year. Which conclusion can you draw from the graph? Which of the following is the solution ofthe system of equations shown?A. (2, 2)B. (-2, 2)C. (2,-2)D. (-2,-2)(The answer isnt B. I already tried that) Factor -1/2 out of 1/2x+6 what is the common denominator of 5, 12, 3 , 8 Last year, Lisa opened an investment account with $6600. At the end of the year, the amount in the account had increased by 6.5%. How much is this increase in dollars? How much money was in her account at the end of last year?Increase in amount:Year-end amount: If you buy an AED 50 meal with a 5% tax.The tax amount to be paid is AED What was a sepoy? sds question content areawhich of the following schedules is prepared to maintain accuracy in computing product costs? a.schedule of goods under production b.schedule of cost of goods manufactured c.schedule of finished goods d.schedule of overhead You are driving (too fast) down a straight, country road. The posted limit is 40 miles per hour along this road. Two police officers are posted one mile apart along this road tracking vehicle speeds and are in contact with each other. At the first officers position, you drive by going 39 miles per hour. At the second officers position 63 seconds later, you drive by going 38 miles per hour. The second officer pulls you over and gives you a ticket. Were they justified in giving you a ticket, even though you were not caught speeding?Hint: refer to the Mean Value Theorem to assist with your justification and reasoning. In early-stage valuation, what factor are most influential in valuation? select all that apply. in the outbreaks of witchcraft hysteria that marked new england colonial life, those accused were most commonly group of answer choices criminals. indentured servants. middle-aged women with few or no children. not members of the church. indians or slaves. How long after medical debts become past due will they show up on a persons credit report?.