Answer:
The cpp program for the given scenario is as follows.
#include <iostream>
#include <iterator>
using namespace std;
int main()
{
//boolean variable declared and initialized
bool sorted=true;
//integer array declared and initialized
int arr[] = {1, 2, 3, 4, 5};
//integer variables declared and initialized to length of the array, arr
int len = std::end(arr) - std::begin(arr);
//array tested for being sorted
for(int idx=0; idx<len-1; idx++)
{
if(arr[idx] < arr[idx+1])
{
sorted=false;
break;
}
}
//message displayed
if(sorted == false)
cout<< "UNSORTED" <<endl;
else
cout<< "UNSORTED" <<endl;
return 0;
}
OUTPUT
UNSORTED
Explanation:
1. An integer array, arr, is declared and initialized as shown.
int arr[] = {1, 2, 3, 4, 5};
2. An integer variable, len, is declared and initialized to the size of the array created above.
int len = std::end(arr) - std::begin(arr);
3. A Boolean variable, sorted, is declared and initialized to true.
bool sorted=true;
4. All the variables and array are declared inside main().
5. Inside for loop, the array, arr, is tested for being sorted or unsorted. The for loop executes over an integer variable, idx, which ranges from 0 till the length of the array, arr.
6. The array is assumed to be sorted if all the elements of the array are in descending order.
7. If the elements of the array are in ascending order, the Boolean variable, sorted, is assigned the value false and for loop is exited using break keyword. The testing is done using if statement.
8. Based on the value of the Boolean variable, sorted, a message is displayed to the user.
9. The program can be tested for any size of the array and for any order of the elements, ascending or descending. The program can also be tested for array of other numeric data type including float and double.
10. All the code is written inside the main().
11. The length of the array is found using begin() and end() methods as shown previously. For this, the iterator header file is included in the program.
Alejandra is using a flash drive that a friend gave to her to copy some financial records from the company database so she can complete a department presentation at home. She does not realize that the flash drive is infected with a virus that enables a malicious hacker to take control of her computer. This is a potential __________ to the confidentiality of the data in the files
Answer:
maybe threat?
Explanation:
TCPDump is used by Wireshark to capture packets while Wireshark own function is:
a. to provide a graphical user interface (GUI) and several capture filters.
b. to act as an intrusion prevention system (IPS) by stopping packets from a black-listed website or packets with payloads of viruses.
c. to defend the network against TCP SYN Flooding attacks by filtering out unnecessary TCP packets.
d. yet to be defined.
Answer:
a. to provide a graphical user interface (GUI) and several capture filters
Explanation:
TcPDump is a command line tool used to capture packets. TcPDump is used to filter packets after a capture has been done. To control network interfaces, TcPDump need to be assigned root privileges. Data is represented in form of text
Wireshark provide a graphical user interface (GUI) and several capture filters. It is a graphical tool used in packet capture analysis. Data is represented in wireshark as text in boxes.
The university computer lab’s director keeps track of lab usage, as measured by the number of students using the lab. This function is important for budgeting purposes. The computer lab director assigns you the task of developing a data warehouse to keep track of the lab usage statistics. The main requirements for this database are to:
Answer:
to keep count of how many users there are in total.
Explanation:
all i had to do was read the question twice to understand the answer is pretty
much in the question.
The director of the computer lab tasks with creating a data warehouse to manage lab utilization data. The major needs for this database are to keep count of how many users there are in total.
What is the budgeting process?
The tactical measures used by a corporation to create a financial plan are the budgeting processes. Budgeting for a future time entails more than simply allocating spending; it also entails figuring out how much income is required to achieve organizational objectives.
These procedures are used by accounting departments to regulate corporate activities, particularly expenditure. A person may use budgeting process to record how much money a business makes and spends over a specific time period.
Therefore, With the aid of budgeting, it may establish financial objectives for the team and the entire organization.
Learn more about the budgeting process, refer to:
https://brainly.com/question/21411418
#SPJ2
Bill downloaded an antivirus software from the Internet. Under the Uniform Commercial Code (UCC), the software is a: Select one: a. good. b. service. c. good-faith warranty. d. mixture of goods and services.
Answer:
a. good
Explanation:
According to the Uniform Commercial Code (UCC), It deals with all the contracts that also involves the sale of the goods,
Here goods include those things or items that are movable in a nature and also consist of manufactured goods that are specialized in nature
Therefore, as per the given situation, the bill downloaded an antivirus software so here the software is treated as a good
You have recently resolved a problem in which a user could not print to a particular shared printer by upgrading her workstation's client software. Which of the following might be an unintended consequence of your solution?
a. The user complains that word-processing files on her hard disk take longer to open.
b. The user is no longer able to log on to the network.
c. The shared printer no longer allows users to print double-sided documents.
d. The shared printer no longer responds to form-feed commands from the print server.
Answer:
B - The user is no longer able to log on to the network
Explanation:
Write a program that displays a menu allowing the user to select air, water, or steel, and then has the user enter the number of feet a sound wave will travel in the selected medium. The program should then compute and display (with four decimal places) the number of seconds it will take. Your program should check if the user enters a valid menu choice, if not, it should terminate with an appropriate message.
Answer:
yooooooooooooooooooooo
Explanation:
Paul has opened a bespoke tailoring shop. He wants to work online to keep a database of all his customers, send emails when garments are ready, create designs, and maintain financial records using software. Which productivity suite should he consider?
a. Prezi, G suite
b. G suite, Zoho
c. OpenOffice, G suite
d. Zoho, Apple iWork
Answer:
c. OpenOffice, G suite
Explanation:
The main advantage of OpenOffice is that it is free and obviously keeps your costs down. It has a lot of features that can help Paul (and really anyone else). It offers decent word processing, spreadsheets, databases and graphics, which can cover most, if not all, of Paul's needs.
Google's G Suite also offers cheap plan's that can satisfy Paul's needs regarding emails, CRM features and cloud storage. Even though it is not free, Paul would probably need only the most basic plan at just $6 per month.
The productivity suite Paul should consider is OpenOffice. Therefore, the correct answer is option C.
The primary benefit of OpenOffice is that it is cost free, which obviously lowers your expenses. Paul can benefit mostly from its many features. The majority if not all of Paul's demand may be met by its decent word processing, spreadsheets, databases, and graphical features.
Therefore, the correct answer is option C.
Learn more about the OpenOffice here:
https://brainly.com/question/4463790.
#SPJ6
Write a function named file_stats that takes one string parameter (in_file) that is the name of an existing text file. The function file_stats should calculate three statistics about in_file i.e. the number of lines it contains, the number of words and the number of characters, and print the three statistics on separate lines.
For example, the following would be be correct input and output. (Hint: the number of characters may vary depending on what platform you are working.)
>>> file_stats('created_equal.txt')
lines 2
words 13
characters 72
Answer:
Here is the Python program.
characters = 0
words = 0
lines = 0
def file_stats(in_file):
global lines, words, characters
with open(in_file, 'r') as file:
for line in file:
lines = lines + 1
totalwords = line.split()
words = words + len(totalwords)
for word in totalwords:
characters= characters + len(word)
file_stats('created_equal.txt')
print("Number of lines: {0}".format(lines))
print("Number of words: {0}".format(words))
print("Number of chars: {0}".format(characters))
Explanation:
The program first initializes three variables to 0 which are: words, lines and characters.
The method file_stats() takes in_file as a parameter. in_file is the name of the existing text file.
In this method the keyword global is used to read and modify the variables words, lines and characters inside the function.
open() function is used to open the file. It has two parameters: file name and mode 'r' which represents the mode of the file to be opened. Here 'r' means the file is to be opened in read mode.
For loop is used which moves through each line in the text file and counts the number of lines by incrementing the line variable by 1, each time it reads the line.
split() function is used to split the each line string into a list. This split is stored in totalwords.
Next statement words = words + len(totalwords) is used to find the number of words in the text file. When the lines are split in to a list then the length of each split is found by the len() function and added to the words variable in order to find the number of words in the text file.
Next, in order to find the number of characters, for loop is used. The loop moves through each word in the list totalwords and split each word in the totalwords list using split() method. This makes a list of each character in every word of the text file. This calculates the number of characters in each word. Each word split is added to the character and stored in character variable.
file_stats('created_equal.txt') statement calls the file_stats() method and passes a file name of the text file created_equal.txt as an argument to this method. The last three print() statements display the number of lines, words and characters in the created_equal.txt text file.
The program along with its output is attached.
In this assignment, you will develop a C++ program and a flowchart that calculates a cost to replace all tablets and desktop computers in a business. Customers paying cash get a ten percent discount applied to the total cost of the computers (desktop and tablets). Customers financing the purchase incur a fifteen percent finance charge based on the total cost of the computers (desktop and tablets). Tablets costs $320.00 each and desktops costs $800.00 each. The tax is 75% (.075).
Requirements:
⦁ Use the following variables of the appropriate type: name of company selling the computers, the cost per each type of computer, number of computers to be purchased, discount if paying cash, sales tax rate. Tablets =$320 each and desktop computers = $800.00 each. Sales Tax Rate = .075, Discount Percent = .10, and Finance Charge = .15.
⦁ Variable names must be descriptive.
⦁ Use additional variables to hold subtotals and totals.
⦁ For customers paying cash, the discount should be subtracted from the total computer cost.
⦁ For customers financing the purchase, the finance charge should be added to the total computer cost.
⦁ The body of your program must use variables only; there should not be any "hard coded" values in the output statements. An example of hardcoding is
***Cost of tablets = 4 * 320****.
⦁ Use cout to output the values of the variables to the console. Your cout statement MUST use the variables to display the values
⦁ Display the cost of the computers, tax and average cost per computer. The average cost will be the total cost divided by the number of computers purchased. Display the discount if the customer decides to pay cash or the finance charge if the customer finances the purchase.
⦁ Output must be labelled and easy to read as shown in the sample output below.
⦁ Program must be documented with the following:
⦁ // Name
⦁ // Date
⦁ // Program Name
⦁ // Description
⦁ Develop a flowchart
Hints:
Total cost of computers = cost per tablet * number of tablets purchased + cost per desktop * number of desktops purchased
Calculate the cost if paying cash or financing
Calculate the tax
Average cost per computer = Total computer cost divided by the number of computers purchased
Answer:
Explanation:
The objective of this program we are to develop is to compute a C++ program and a flowchart that calculates a cost to replace all tablets and desktop computers in a business.
C++ Program
#include<iostream>
#include<iomanip>
using namespace std;
/*
⦁ // Name:
⦁ // Date:
⦁ // Program Name:
⦁ // Description:
*/
int main()
{
const double SalesTaxRate = .075, DiscountPercent = .10, FinanceCharge = .15;
const double TABLET = 320.00, DESKTOP = 800.00;
double total = 0.0, subTotal = 0.0,avg=0.0;
int numberOfTablets, numberOfDesktop;
cout << "-------------- Welcome to Computer Selling Company ------------------ ";
cout << "Enter number of tablets: ";
cin >> numberOfTablets;
cout << "Enter number of desktops: ";
cin >> numberOfDesktop;
subTotal = TABLET * numberOfTablets + numberOfDesktop * DESKTOP;
char choice;
cout << "Paying cash or financing: (c/f): ";
cin >> choice;
cout << fixed << setprecision(2);
if (choice == 'c' || choice == 'C')
{
cout << "You have choosen paying cash." << endl;
total = subTotal - subTotal * DiscountPercent;
cout << "Discount you get $" << subTotal * DiscountPercent<<endl;
cout << "Sales Tax: $" << SalesTaxRate * total << endl;
total = total + total * SalesTaxRate;
cout << "Total computers' Cost: $" << total << endl;
avg = total / (numberOfDesktop + numberOfTablets);
cout << "Average computer cost: $ " << avg << endl;
}
else if (choice == 'f' || choice == 'F')
{
cout << "You have choosen Finance option." << endl;
total = subTotal + subTotal * FinanceCharge;
cout << "Finance Charge $" << subTotal * FinanceCharge << endl;
cout << "Sales Tax: $" << SalesTaxRate * total << endl;
total = total + total * SalesTaxRate;
cout << "Total computers' Cost: $" << total << endl;
avg = total / (numberOfDesktop + numberOfTablets);
cout << "Average computer cost: $ " << avg << endl;
}
else
{
cout << "Wrong choice.......Existing.... ";
system("pause");
}
//to hold the output screen
system("pause");
} }
OUTPUT:
The Output of the program is shown in the first data file attached below:
FLOWCHART:
See the second diagram attached for the designed flowchart.
The following if statement uses an overloaded > operator to determine whether the price of a Car object is more than $5000. Car is a struct and myCar is an object of Car. Each Cor object has two variables: id (int) and price (float). As you can see in the following code, the ID of myCar is 12345 and the price is $6,000. Car myCar - [12345, 6000.); float price - 5000; if (myCar > price) cout << "My car price is more than $5,000/n": Which one of the following function prototypes is correct syntax to overload the > operator based on the if statement above. void operator> float price: O bool operator>(Car & car, float price): bool operator (float amt): bool operator> Car & your Car): None of the above
Answer:
The correct syntax to overload is bool operator (float amt): so, the third statement is right.
Explanation:
Solution
From the given question we have to find which statements is correct for the following function prototype.
Now,
Since the price of a Car object is above $5000, the car here is considered a struct and myCar is an object of Car
Both Car object consists of two variables which are id (int) and price (float)
Thus, from the given example the corresponding code says that the ID of myCar is represented as follows:
myCar - [12345, 6000);
The float price = 5000
Then,
cout << "My car price is more than $5,000/n"
Therefore the following statement bool operator (float amt): is the right syntax to overload.
You just got back from a convention where you saw some new software you think the information technology director could use. You can get a discount on the software for the next six weeks because you attended the convention. Unfortunately, the technology director is on vacation this week. How should you tell the IT director about this opportunity
Answer:
Video or Teleconferencing.
Explanation:
Solution
The method in which you will inform the IT director about this opportunity is through video conferencing or tele conferencing.
Video conferencing : refers to a method whereby it enables people at two or more locations or places to hear and see each other simultaneously through computers and communication technology.
what is exchanged between them are information such as visual web cameras and online streaming videos.
Teleconferencing: It is a method of sharing or discussion information and news among a large group of people or team at different places at the same time.
What is the maximum duration of daily Scrum meetings?
Answer:
15 minutes
Explanation:
this meeting is normally timeboxed to a maximum duration of 15 minutes.
Answer:
A. 15 minutes
B. 45 minutes
C. 10 minutes
D. 30 minutes
The Answer is A): 15 minutes
explanation:
PLZ Mark Me As Brainliest
. The total processing speed of microprocessors (based on clock rate and number of circuits) is doubling roughly every year. Today, a symmetric session key needs to be 100 bits long to be considered strong. How long will a symmetric session key have to be in 30 years to be considered strong?
Answer:
130 bits
Explanation:
If the length of a key = N bits
Total number of key combinations = [tex]\frac{2^{N} }{2}[/tex]
For a key length of 100, the total number of key combinations will be [tex]\frac{2^{100} }{2} = 2^{99}[/tex] combinations. This is a whole lot and it almost seems impossible to be hacked.
The addition of one bit to the length of the symmetric key in 1 year is sufficient to make the key strong, because even at double its speed, the processor can still not crack the number of combinations that will be formed.
Therefore, if a bit is added to the key length per year, after 30 years, the length of the symmetric session key will be 130 bits.
1. Implement the function dict_intersect, which takes two dictionaries as parameters d1 and d2, and returns a new dictionary which contains only those keys which appear in both d1 and d2, whose values are a tuple of the corresponding values from d1 and d2.
E.g., dict_intersect({'a': 'apple', 'b': 'banana'}, {'b': 'bee', 'c': 'cat'}) should return {'b': ('banana', 'bee')}
2. Implement the function consolidate, which accepts zero or more sequences in the star parameter seqs, and returns a dictionary whose keys consist of values found in those sequences, which in turn map to numbers indicating how many times each value appears across all the sequences.
E.g., consolidate([1,2,3], [1,1,1], [2,4], [1]) should return the dictionary {1: 5, 2: 2, 3: 1, 4: 1}.
Answer:
1
def dict_intersect(d1,d2): #create dictionary
d3={} #dictionaries
for key1,value1 in d1.items(): #iterate through the loop
if key1 in d2: #checking condition
d3[key1]=(d1[key1],d2[key1]) #add the items into the dictionary
return d 3
print(dict_intersect({'a': 'apple', 'b': 'banana'}, {'b': 'bee', 'c': 'cat'})) #display
2
def consolidate(*l1): #create consolidate
d3={} # create dictionary
for k in l1: #iterate through the loop
for number in k: #iterate through the loop d3[number]=d3.get(number,0)+1 #increment the value
return d 3 #return
print(consolidate([1,2,3], [1,1,1], [2,4], [1])) #display
Explanation:
1
Following are the description of program
Create a dictionary i.e"dict_intersect(d1,d2) " in this dictionary created a dictionary d3 .After that iterated the loop and check the condition .If the condition is true then add the items into the dictionary and return the dictionary d3 .Finally print them that are specified in the given question .2
Following are the description of program
Create a dictionary consolidate inside that created a dictionary "d3" .After that iterated the loop outer as well as inner loop and increment the value of items .Return the d3 dictionary and print the dictionary as specified in the given question .
Maya wrote a program and forgot to put the steps in the correct order. Which step does Maya need to review? Pattern following Planning Segmenting Sequencing
Answer:
Sequencing
Explanation:
Answer:
SEQUENCING
Explanation:
Shut down and unplug the computer. Remove the CPU case lid. Locate the various fans, and then use
compressed air to blow dirt out through the internal slits from inside the case.
Answer:
Cleaning the fan
Explanation:
Just did it on Ed
Would you mind giving me brainliest?
Which of the following statements about CASE is not true?CASE tools provide automated graphics facilities for producing charts.CASE tools reduce the need for end user participation in systems development.CASE tools have capabilities for validating design diagrams and specifications.CASE tools support collaboration among team members.CASE tools facilitate the creation of clear documentation
Answer:
CASE tools reduce the need for end user participation in systems development.
Explanation:
CASE is an acronym for Computer-aided Software Engineering and it comprises of software application tools that provide users with automated assistance for Software Development Life Cycle (planning, analysing, designing, testing, implementation and maintenance). The CASE tools helps software developers in reducing or cutting down of the cost and time of software development, as well as the enhancement of the software quality.
Some other benefits of using the CASE tools are;
- CASE tools provide automated graphics facilities for producing charts.
- CASE tools have capabilities for validating design diagrams and specifications.
- CASE tools support collaboration among team members.
- CASE tools facilitate the creation of clear documentation.
- CASE tools checks for consistency, syntax errors and completeness.
The CASE tools can be grouped as, requirement and structure analysis, software design, test-case and code generation, reverse engineering, and document production tools.
Examples of CASE tools are flowchart maker, visible analyst (VA), dreamweaver, net-beans, microsoft visio, adobe illustrator and photoshop etc.
5. Write a C++ program that can display the output as shown below. Your
program will calculate the price after discount. User will input the
price and the discount is 20%
Answer:
#include<iostream>
using namespace std;
int main()
{
float price;
float discount;
cout<<"enter price : ";
cin>>price;
discount=price - (price * 20 / 100);
cout<<"discount rate is :"<<discount;
}
Explanation:
Write a short program in C that will display the following information:
Name : Phones:
email:
Hometown:
High School(s):
Previous colleges:
List college math/CS courses:
What, when, and where was your last math and cs course?
Type(s) of computers that you are confident working on:
Extracurricular activities (jobs, clubs, sports, etc.)
Favorite books, movies, music:
What you plan to do after graduation? (Be as specific as you can.)
Be sure to include all necessary documentation within your code
Answer:
Explanation:
The objective of this question and what we are meant to do is to compute a short program in C++ that will display the information given in the question.
Let get started!.
C ++ Program Code.
#include <iostream>
#include<string>
using namespace std;
int main()
{
string name,email,hometown,highschool,previousColleges,mathOrCSCource,lastMathOrCSCource,CompType,ExtraCur,FavBook
,planAfterGrad,phone;
//Reading Data
cout<<"Name:";
getline(cin,name);
cout<<"Phone:";
getline(cin,phone);
cout<<"Email:";
getline(cin,email);
cout<<"HomeTown:";
getline(cin,hometown);
cout<<"High School(s):";
getline(cin,highschool);
cout<<"Previous Colleges:";
getline(cin,previousColleges);
cout<<"List of math/CS Cources:";
getline(cin,mathOrCSCource);
cout<<"When,Where and what was your last math or CS course:";
getline(cin,lastMathOrCSCource);
cout<<"Type(s) of computer you are confident working with:";
getline(cin,CompType);
cout<<"ExtraCurricular Activities (job,club,sports,etc.):";
getline(cin,ExtraCur);
cout<<"Favourite books,movies,music:";
getline(cin,FavBook);
cout<<"What you plan to do after Graduation:";
getline(cin,planAfterGrad);
//Printing data
cout<<"--------------------Printing Data---------------------------"<<endl;
cout<<"Name:"<<name<<endl;
cout<<"Phone:"<<phone<<endl;
cout<<"Email:"<<email<<endl;
cout<<"HomeTown:"<<hometown<<endl;
cout<<"High School(s):"<<highschool<<endl;
cout<<"Previous Colleges:"<<previousColleges<<endl;
cout<<"List of math/CS Cources:"<<mathOrCSCource<<endl;
cout<<"When,Where and what was your last math or CS course:"<<lastMathOrCSCource<<endl;
cout<<"Type(s) of computer you are confident working with:"<<CompType<<endl;
cout<<"ExtraCurricular Activities (job,club,sports,etc.):"<<ExtraCur<<endl;
cout<<"Favourite books,movies,music:"<<FavBook<<endl;
cout<<"What you plan to do after Graduation:"<<planAfterGrad<<endl;
return 0;
}
(Find the number of days in a month) Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, If the user entered month 2 and year 2012, the program should display that February 2012 has 29 days. If the user entered month 3 and year 2015, the program should display that March 2015 has 31 days.
Consider the following class definitions.
public class Robot
{
private int servoCount;
public int getServoCount()
{
return servoCount;
}
public void setServoCount(int in)
{
servoCount = in;
}
}
public class Android extends Robot
{
private int servoCount;
public Android(int initVal)
{
setServoCount(initVal);
}
public int getServoCount()
{
return super.getServoCount();
}
public int getLocal()
{
return servoCount;
}
public void setServoCount(int in)
{
super.setServoCount(in);
}
public void setLocal(int in)
{
servoCount = in;
}
}
The following code segment appears in a method in another class.
int x = 10;
int y = 20;
/* missing code */
Which of the following code segments can be used to replace /* missing code */ so that the value 20 will be printed?
A Android a = new Android(x);
a.setServoCount(y);
System.out.println(a.getServoCount());
B Android a = new Android(x);
a.setServoCount(y);
System.out.println(a.getLocal());
C Android a = new Android(x);
a.setLocal(y);
System.out.println(a.getServoCount());
D Android a = new Android(y);
a.setServoCount(x);
System.out.println(a.getLocal());
E Android a = new Android(y);
a.setLocal(x);
System.out.println(a.getLocal());
Answer:
The correct answer is option A
Explanation:
Solution
Recall that:
From the question stated,the following segments of code that should be used in replacing the /* missing code */ so that the value 20 will be printed is given below:
Android a = new Android(x);
a.setServoCount(y);
System.out.println(a.getServoCount());
The right option to be used here is A.
Based on the information given, the code segments that's appropriate will be A Android a = new Android(x);
a.setServoCount(y);System.out.println(a.getServoCount());From the question stated, it was inferred that we should get the segments of code that should be used in replacing the /* missing code */ so that the value 20 will be printed.
This will be:
Android a = new Android(x);
a.setServoCount(y);
System.out.println(a.getServoCount());
In conclusion, the correct option is A.
Learn more about codes on:
https://brainly.com/question/22654163
Two-factor authentication can best be breached by the adversary using:________. a. social engineering attack b. using sniffers like Wireshark and capturing packets c. using rootkits and privilege escalation to get to the kernel processes d. using a virus and destroying the computer that stores authentication information.
Answer:
a. social engineering attack
Explanation:
Two-factor authentication requires that the user/owner of the account enter a second verification code alongside their password in order to access the account. This code is usually sent to a personal phone number or email address. Therefore in order to breach such a security measure the best options is a social engineering attack. These are attacks that are accomplished through human interactions, using psychological manipulation in order to trick the victim into making a mistake or giving away that private information such as the verification code or access to the private email.
Wireshark capture files, like the DemoCapturepcap file found in this lab, have a __________ extension, which stands for packet capture, next generation.
(a) .packcng
(b) .paccapnextg
(c) .pcnextgen
(d) .pcapng
Answer:
Option (d) is correct
Explanation:
Previously saved capture files can be read using Wireshark. For this, select the File then open the menu. Then Wireshark will pop up the “File Open” dialog box.
Wireshark capture files, like the DemoCapturepcap file found in this lab, have a .pcapng extension, which stands for packet capture, next generation.
Enter a formula in cell C9 using the PMT function to calculate the monthly payment on a loan using the assumptions listed in the Status Quo scenario. In the PMT formula, use C6 as the monthly interest rate (rate), C8 as the total number of payments (nper), and C4 as the loan amount (pv). Enter this formula in cell C9, and then copy the formula to the range D9:F9.
Answer:
=PMT(C6,C8,C4)
Put that in cell c9
Then use the lower right of the cell to drag it from D9:F9
In this exercise we have to use excel knowledge, so we have to:
=PMT(C6,C8,C4) in the cell C9 and extended to D9:F9
How is PMT calculated in Excel?PMT, one of the financial functions, calculates the payment for a loan based on constant payments and a constant interest rate. Use the Excel Formula Coach to figure out a monthly loan payment.
For this we need to put the form as:
=PMT(C6,C8,C4)
See more about excel at brainly.com/question/12788694
Design an algorithm for a monitor that implements an alarm clock that enables a calling program to delay itself for a specified number of time units (ticks). You may assume the existence of a real hardware clock that invokes a function tick() in your monitor at regular intervals.
Answer:
The algorithm a monitor that implements an alarm clock is designed below.
Monitor alarm
{
Condition c;
int current = 0;
void delay (int ticks)
{
int alarms;
alarms = current + ticks;
while (current > alarms)
c. wait (alarms) ;
c. signal;
}
void tick ( )
{
current = current + 1;
delay. signal;
}
}
Transaction is an action or series of actions the execution of which should lead to a consistent database state from another consistent database state. Discuss which properties that transactions should have for their correct executions. Provide two examples to support your answer.
Explanation:
A transaction is a very small system unit that can contain many low-level tasks. A transaction in a database system should maintain, Atomicity, Consistency, Isolation, and Durability − these are commonly known as ACID properties − in order to ensure accuracy, completeness, and integrity of the data.
An example of a simple transaction is as below, Suppose a bank employee transfers Rs 500 from A's account to B's account.
A’s Account
Open_Account(A)
Old_Balance = A.balance
New_Balance = Old_Balance - 500
A.balance = New_Balance
Close_Account(A)
B’s Account
Open_Account(B)
Old_Balance = B.balance
New_Balance = Old_Balance + 500
B.balance = New_Balance
Close_Account(B)
Write a program that takes in an integer in the range 10 to 100 as input. Your program should countdown from that number to 0, printing
the count each of each iteration After ten numbers have been printed to the screen, you should start a newline. The program should stop
looping at 0 and not output that value
I would suggest using a counter to cổunt how many items have been printed out and then after 10 items, print a new line character and
then reset the counter.
important: Your output should use %3d" for exact spacing and a space before and after each number that is output with newlines in order
to test correctly. In C please
Answer:
The program written in C language is as follows
#include<stdio.h>
int main()
{
//Declare digit
int digit;
//Prompt user for input
printf("Enter any integer: [10 - 100]: ");
scanf("%d", &digit);
//Check if digit is within range 10 to 100
while(digit<10 || digit >100)
{
printf("Enter any integer: [10 - 100]: ");
scanf("%d", &digit);
}
//Initialize counter to 0
int counter = 0;
for(int i=digit;i>0;i--)
{
printf("%3d", i); //Print individual digit
counter++;
if(counter == 10) //Check if printed digit is up to 10
{
printf("\n"); //If yes, print a new line
counter=0; //And reset counter to 0
}
}
}
Explanation:
int digit; ->This line declares digit as type int
printf("Enter any integer: [10 - 100]: "); -> This line prompts user for input
scanf("%d", &digit);-> The input us saved in digit
while(digit<10 || digit >100) {
printf("Enter any integer: [10 - 100]: ");
scanf("%d", &digit); }
->The above lines checks if input number is between 10 and 100
int counter = 0; -> Declare and set a counter variable to 0
for(int i=digit;i>0;i--){ -> Iterate from user input to 0
printf("%3d", i); -> This line prints individual digits with 3 line spacing
counter++; -> This line increments counter by 1
if(counter == 10){-> This line checks if printed digit is up to 10
printf("\n"); -> If yes, a new line is printed
counter=0;} -> Reset counter to 0
} - > End of iteration
In this assignment you'll write a program that encrypts the alphabetic letters in a file using the Hill cipher where the Hill matrix can be any size from 2 x 2 up to 9 x 9. The program can be written using one of the following: C, C++, or Java. Your program will take two command line parameters containing the names of the file storing the encryption key and the file to be encrypted. The program must generate output to the console (terminal) screen as specified below.Command Line Parameters1. Your program compile and run from the command line.2. The program executable must be named "hillcipher" (all lowercase, no spaces or file extension).3. Input the required file names as command line parameters. Your program may NOT prompt the user to enter the file names. The first parameter must be the name of the encryption key file, as described below. The second parameter must be the name of the file to be encrypted, as also described below. The sample run command near the end of this document contains an example of how the parameters will be entered.4. Your program should open the two files, echo the input to the screen, make the necessary calculations, and then output the ciphertext to the console (terminal) screen in the format described below.Note: If the plaintext file to be encrypted doesn't have the proper number of alphabetic characters, pad the last block as necessary with the letter 'X'. It is necessary for us to do this so we can know what outputs to expect for our test inputs.
Answer: Provided in the explanation section
Explanation:
C++ Code
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
// read plain text from file
void readPlaneText(char *file,char *txt,int &size){
ifstream inp;
inp.open(file);
// index initialize to 0 for first character
int index=0;
char ch;
if(!inp.fail()){
// read each character from file
while(!inp.eof()){
inp.get(ch);
txt[index++]=ch;
}
}
// size of message
size=index-1;
}
// read key
int **readKey(char *file,int **key,int &size){
ifstream ink;
//
ink.open(file);
if(!ink.fail()){
// read first line as size
ink>>size;
// create 2 d arry
key=new int*[size];
for(int i=0;i<size;i++){
key[i]=new int[size];
}
// read data in 2d matrix
for(int i=0;i<size;i++){
for(int j=0;j<size;j++){
ink>>key[i][j];
}
}
}
return key;
}
// print message
void printText(string txt,char *msg,int size){
cout<<txt<<":\n\n";
for(int i=0;i<size;i++){
cout<<msg[i];
}
}
// print key
void printKey(int **key,int size){
cout<<"\n\nKey matrix:\n\n";
for(int i=0;i<size;i++){
for(int j=0;j<size;j++){
cout<<key[i][j]<<" ";
}
cout<<endl;
}
}
void encrypt(char *txt,int size,int **key,int kSize,char *ctxt){
int *data=new int[kSize];
for(int i=0;i<size;i=i+kSize){
// read key size concecutive data
for(int a=0;a<kSize;a++){
data[a]=txt[i+a]-'a';
}
// cipher operation
for(int a=0;a<kSize;a++){
int total=0;
for(int b=0;b<kSize;b++){
total+=key[a][b]*data[b];
}
total=total%26;
ctxt[i+a]=(char)('a'+total);
}
}
}
int main(int argc,char **argv){
char text[10000];
char ctext[10000];
int **key;
int keySize;
int size;
// input
key=readKey(argv[1],key,keySize);
readPlaneText(argv[2],text,size);
encrypt(text,size,key,keySize,ctext);
// output
printKey(key,keySize);
cout<<endl<<endl;
printText("Plaintext",text,size);
cout<<endl<<endl;
printText("Ciphertext",ctext,size);
return 0;
}
cheers i hope this helped !!!
Which of the following are true of trademarks?
Check all of the boxes that apply.
They protect logos.
They protect fabric.
They show who the maker of the item is.
They can be registered with the government.
Answer:
A, C, D
They protect logos
They show who the maker of the item is.
They can be registered with the government
Explanation:
The following are true of trademarks:
They protect logos.
They show who the maker of the item is.
They can be registered with the government.
A trademark is a type of intellectual property consisting of a recognizable sign, design, or expression which identifies products or services of a particular source from those of others. A trademark exclusively identifies a product as belonging to a specific company and recognizes the company's ownership of the brand.
Trademarks protect logos, show who the maker of the item is and can be registered with the government.
Find out more on trademark at: https://brainly.com/question/11957410
Write a Java program that reads from the user four grades between 0 and 100. The program the, on separate ines, prints out the entered grades followed by the highest grade, lowest grade, and averages of all four grades. Make sure to properly label your output. Use escape characters to line up the outputs after the labels.
Answer:
import java.util.*;
public class Grade {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
double[] grades = new double[4];
for (int i=0; i<4; i++){
System.out.print("Enter a grade: ");
grades[i] = input.nextDouble();
}
double lowest = grades[0];
double highest = grades[0];
double total = 0;
for (int i=0; i<4; i++){
System.out.println("Grade " + (i+1) + " is: " + grades[i]);
if(grades[i] >= highest)
highest = grades[i];
if(grades[i] <= lowest)
lowest = grades[i];
total += grades[i];
}
double average = total/4;
System.out.println("The highest grade is: " + highest);
System.out.println("The lowest grade is: " + lowest);
System.out.println("The average is: " + average);
}
}
Explanation:
Ask the user for the grades and put them in the grades array using a for loop
Create another for loop. Inside the loop, print the grades. Find highest and lowest grades in the grades array using if-structure. Also, add each grade to the total.
When the loop is done, calculate the average, divide the total by 4.
Print the highest grade, lowest grade and average.