For this project, you have to write 3 functions. C++

1. remove_adjacent_digits. This takes in 2 arguments, a std::vector, and a std::vector of the same size. You need to return a std::vector, where each of the strings no longer has any digits that are equal to, one more, or one less, than the corresponding integer in the 2nd vector.

2. sort_by_internal_numbers. This takes in a single argument, a std::vector, and you need to return a std::vector, which is sorted as if only the digits of each string is used to make a number.

3. sort_by_length_2nd_last_digit. This takes in a std::vector>. It returns a vector of the same type as the input, which is sorted, first by the length of the string in the pair, and if they are the same length, then the second last digit of the int.

See the test cases for examples of each of the above functions.

You need to submit a single file called main.cpp that contains all these functions. You can (and should) write additional functions as well. There is no need for a main function.

No loops (for, while, etc) are allowed. You must use only STL algorithms for this project.

Answers

Answer 1

Find the given attachments

For This Project, You Have To Write 3 Functions. C++ 1. Remove_adjacent_digits. This Takes In 2 Arguments,
For This Project, You Have To Write 3 Functions. C++ 1. Remove_adjacent_digits. This Takes In 2 Arguments,

Related Questions

What did Aristotle teach?

Answers

Philosophy, I beleive. He tought Sikander liturature and eloquence, but his most famous teachings were of philosophy.

Aristotle taught the world science. He was considered the best scientists of his time.

Computers in a LAN are configured to use a symmetric key cipher within the LAN to avoid hardware address spoofing. This means that each computer share a different key with every other computer in the LAN. If there are 100 computers in this LAN, each computer must have at least:

a. 100 cipher keys
b. 99 cipher keys
c. 4950 cipher keys
d. 100000 cipher keys

Answers

Answer:

The correct answer is option (c) 4950 cipher keys

Explanation:

Solution

Given that:

From the given question we have that if there are 100 computers in a LAN, then each computer should have how many keys.

Now,

The number of computers available = 100

The number of keys used in  symmetric key cipher for N parties is given as follows:

= N(N-1)/2

= 100 * (100 -1)/2

= 50 * 99

= 4950 cipher keys

Look at these examples:- • Men are not emotional. • Women are too emotional. • Jewish people are good business people. • The French are great lovers. • Old people are useless. • Young people are sex mad. • Black people are poor. • Thin people are self-disciplined. • Fat people are clumsy. • Rock stars are drug addicts. To what extent do you agree with these statements? Make a note of which ones you agree with

Answers

Answer:

None

Explanation:

These are all stereotypes. Sure, there are definitely some people who fit their stereotypes, but not all. It's just a generalization at the end of the day. I can't really agree with any of them due to the fact that it's all stereotyping.

Perhaps you feel differently, and believe that some of these example are true. I can't though, sorry. Hope this take helps.

You have decided that the complexity of the corporate network facility and satellite offices warrants the hiring of a dedicated physical security and facilities protection manager. You are preparing to write the job requisition to get this critical function addressed and have solicited some ideas from the PCS working group members regarding physical and environmental security risks. Discuss the operational security functions that the physical security and facilities protection manager would be responsible for. Discuss how these functions would inform the development and implementation of system related incident response plans. Further discuss how these incident response plans fit into business continuity planning. Include at least one research reference and associated in-text citation using APA standards. In yourreplies to your peers further discuss how the concepts improve the security posture of PCS.

Answers

Answer:

All organizational security functions are as follows:  

i) Classify any vital data  

ii) Analyze of the hazard  

iii) Analyze vulnerability  

iv) Assess the risk  

v) Take the appropriate risk prevention measures.

Explanation:

These methods described the incident that will fit into this business model was its ongoing support and control of its system that involves the improvements and fix bugs.  For above-mentioned mechanisms aid in evaluating potential events/attacks and help reduce the risk involved with these, as well as promote network security by reducing the likelihood of any harm.  In this case, appropriate monitoring and monitoring should be a must.

Write a loop that sets each array element to the sum of itself and the next element, except for the last element which stays the same. Be careful not to index beyond the last element. Ex:
Initial scores: 10, 20, 30, 40
Scores after the loop: 30, 50, 70, 40
The first element is 30 or 10 + 20, the second element is 50 or 20 + 30, and the third element is 70 or 30 + 40. The last element remains the same.
SAMPLE OUTPUT:
#include
int main(void) {
const int SCORES_SIZE = 4;
int bonusScores[SCORES_SIZE];
int i = 0;
bonusScores[0] = 10;
bonusScores[1] = 20;
bonusScores[2] = 30;
bonusScores[3] = 40;
/* Your solution goes here */
for (i = 0; i < SCORES_SIZE; ++i) {
printf("%d ", bonusScores[i]);
}
printf("\n");
return 0;
}

Answers

Answer:

Replace /* Your solution goes here */  with the following lines of code

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

{

bonusScores[i]+=bonusScores[i+1];

}

Explanation:

The above iteration starts from the index element (element at 0) and stops at the second to the last element (last - 1).

Using an iterative variable, i

It adds the current element (element at i) with the next element; element at i + 1.

The full code becomes

#include<iostream>

using namespace std;

int main(void) {

const int SCORES_SIZE = 4;

int bonusScores[SCORES_SIZE];

int i = 0;

bonusScores[0] = 10;

bonusScores[1] = 20;

bonusScores[2] = 30;

bonusScores[3] = 40;

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

{

bonusScores[i]+=bonusScores[i+1];

}

/* Your solution goes here */

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

printf("%d ", bonusScores[i]);

}

printf("\n");

return 0;

}

See attachment for .cpp file

Answer:int main() {

const int SCORES_SIZE = 4;

int bonusScores[SCORES_SIZE];

int i;

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

cin >> bonusScores[i];

}

for (i = 0; i < SCORES_SIZE-1; ++i){

bonusScores[i] += bonusScores[i+1];

}

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

cout << bonusScores[i] << " ";

}

cout << endl;

return 0;

}

Explanation: SCORES_SIZE -1 will prevent the for loop from going past the last value in the array. bonusScores[i] += will add the value of bonusScores[i+1] to the original bonusScores[i].

for example, i = 1; 1 < SCORES_SIZE - 1 ; bonusScores[1] += bonusScores[1+1} becomes{ bonusScores[1] + bonusScores{2];

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

Answers

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.

Chapter 15 Problem 6 PREVENTIVE CONTROLS Listed here are five scenarios. For each scenario, discuss the possible damages that can occur. Suggest a pre-ventive control. a. An intruder taps into a telecommunications device and retrieves the identifying codes and personal identification numbers for ATM cardholders. ( The user subsequently codes this information onto a magnetic coding device and places this strip on a piece of cardboard.) b. Because of occasional noise on a transmission line, electronic messages received are extremely garbled. c. Because of occasional noise on a transmission line, data being transferred is lost or garbled. d. An intruder is temporarily delaying important strategic messages over the telecommunications lines. e. An intruder is altering electronic messages before the user receives them.

Answers

Answer: seen below

Explanation:

There are various solution or ways to go about this actually. In the end, curtailing this is what matters in the end.

Below i have briefly highlighted a few precise way some of this problems can be solved, other options are open for deliberation.

A. Digital encoding of information with the calculation being changed occasionally, particularly after the frameworks advisors have finished their employments, and the framework is being used.

Which can also mean; The money could be withdrawn form the ATM. preventive Control is password to be changed periodically and regularly.

B. Noise on the line might be causing line blunders, which can bring about information misfortune. Reverberation checks and equality checks can assist with recognizing and right such mistakes.

C. If information is being lost, reverberation checks and equality checks ought to likewise help; notwithstanding, the issue might be that an intruder is blocking messages and altering them. Message arrangement numbering will assist with deciding whether messages are being lost, and in the event that they are maybe a solicitation reaction strategy ought to be executed that makes it hard for gatecrashers to dodge.

D. In the event that messages are being postponed, a significant client request or other data could be missed. As in thing c, message arrangement numbering and solicitation reaction methods ought to be utilized.

E. Messages modified by intruders can have an extremely negative effect on client provider relations if orders are being changed. For this situation, information encryption is important to keep the gatecrasher from perusing and changing the information. Additionally, a message succession numbering strategy is important to ensure the message isn't erased.

cheers i hope this was helpful !!

Given main(), define the Team class (in file Team.java). For class method getWinPercentage(), the formula is:teamWins / (teamWins + teamLosses)Note: Use casting to prevent integer division.Ex: If the input is:Ravens133 where Ravens is the team's name, 13 is number of team wins, and 3 is the number of team losses, the output is:Congratulations, Team Ravens has a winning average!If the input is Angels 80 82, the output is:Team Angels has a losing average.Here is class WinningTeam:import java.util.Scanner;public class WinningTeam {public static void main(String[] args) {Scanner scnr = new Scanner(System.in);Team team = new Team();String name = scnr.next();int wins = scnr.nextInt();int losses = scnr.nextInt();team.setTeamName(name);team.setTeamWins(wins);team.setTeamLosses(losses);if (team.getWinPercentage() >= 0.5) {System.out.println("Congratulations, Team " + team.getTeamName() +" has a winning average!");}else {System.out.println("Team " + team.getTeamName() +" has a losing average.");}}}

Answers

Answer:

Explanation:

public class Team {

   private String teamName;

   private int teamWins;

   private int teamLosses;

   public String getTeamName() {

       return teamName;

   }

   public void setTeamName(String teamName) {

       this.teamName = teamName;

   }

   public int getTeamWins() {

       return teamWins;

   }

   public void setTeamWins(int teamWins) {

       this.teamWins = teamWins;

   }

   public int getTeamLosses() {

       return teamLosses;

   }

   public void setTeamLosses(int teamLosses) {

       this.teamLosses = teamLosses;

   }

   public double getWinPercentage() {

       return teamWins / (double) (teamWins + teamLosses);

   }

}

Following are the Java program to define the Team class and calculate its  value:

Class Definition:

class Team //defining the class Team

{

   private String teamName;//defining String variable

   private int teamWins, teamLosses;//defining integer variable

   //defining the set method to set value the input value

   public void setTeamName(String teamName)//defining setTeamName method that takes one String parameter

   {

       this.teamName = teamName;//using this keyword that sets value in teamName

   }

   public void setTeamWins(int teamWins) //defining setTeamWins method that takes one integer parameter

   {

       this.teamWins = teamWins;//using this keyword that sets value in teamWins

   }

   public void setTeamLosses(int teamLosses)//defining setTeamLosses method that takes one integer parameter

   {

       this.teamLosses = teamLosses;//using this keyword that sets value in teamLosses

   }

   //defining the get method that returns the input value

   public String getTeamName() //defining getTeamName method

   {

       return teamName;//return teamName value

   }

   public int getTeamWins()  //defining getTeamWins method

   {

       return teamWins;//return teamWins value

   }

   public int getTeamLosses() //defining getTeamLosses method

   {

       return teamLosses;//return teamLosses value

   }

   public double getWinPercentage()//defining getWinPercentage method

   {              

       return ((teamWins * 1.0) / (teamWins + teamLosses));//using the return keyword that returns percentage value

   }      

}

Please find the complete code in the attached file and its output file in the attached file.

Class definition:

Defining the class "Team".Inside the class two integer variable "teamWins, teamLosses" and one string variable "teamName" is declared.In the next step, the get and set method is defined, in which the set method is used to set the value, and the get method is used to return the value.

Find out more about the Class here:

brainly.com/question/17001900

In the lab, you defined the information systems security responsibility for each of the seven domains of a typical IT infrastructure. In which domain are you most likely to find service provider service level agreements (SLAs), managed security services, monitoring, and reporting?

Answers

Answer:

LAN/WAN domain

Explanation:

This is the boundary between trusted adn untrusted zones. All SLA's, managed security services, their monitoring and reporting is done by this domain.

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

Answers

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

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

Answers

Answer:

maybe threat?

Explanation:

Array A is not a heap. Clearly explain why does above tree not a heap? b) Using build heap procedure discussed in the class, construct the heap data structure from the array A above. Represent your heap in the array A as well as using a binary tree. Clearly show all the steps c) Show how heap sort work in the heap you have constructed in part (b) above. Clearly show all the step in the heap sort

Answers

Answer:

Sorted Array A { } = { 1, 4, 23, 32, 34, 34, 67, 78, 89, 100 }

Explanation:

Binary tree is drawn given that the binary tree do not follow both minimum heap and maximum heap property, therefore, it is not a heap.

See attached picture.

A(n) _____ element, as described by the World Wide Web Consortium (W3C), is an element that "represents a section of a page that consists of content that is tangentially related to the content around that element, and which could be considered separate from that content."

Answers

Answer:

B. Aside element

Explanation:

The options for this question are missing, the options are:

A. ​article element

B. ​aside element

C. ​section element

D. ​content element

An aside element is defined as a section of a page that has content that is tangentially related to the content around the element. In other words, the aside element represents content that is indirectly related to the main content of the page. Therefore, we can say that the correct answer to this question is B. Aside element.

Devon keeps his commitments, submits work when it's due, and shows up when scheduled. What personal skill does Devon
demonstrate?
Attire
Collaboration
Dependability
Verbal


It’s D

Answers

Answer:

dependability

Explanation:

devon keeps his commitment

The personal skill that's demonstrated by Devin is dependability.

Dependability simply means when an individual is trustworthy and reliable. Dependability simply means when a person can be counted on and relied upon.

In this case, since Devon keeps his commitments, submits work when it's due, and shows up when scheduled, it shows that he's dependable.

It should be noted that employers love the people that are dependable as they can be trusted to have a positive impact on an organization.

Read related link on:

https://brainly.com/question/14064977

For this assignment, you will create flowchart using Flowgorithm and Pseudocode for the following program example:
Hunter Cell Phone Company charges customer's a basic rate of $5 per month to send text messages. Additional rates apply as such:
The first 60 messages per month are included in the basic bill
An additional 10 cents is charged for each text message after the 60th message and up to 200 messages.
An additional 25 cents is charged for each text after the 200th message
Federal, state, and local taxes add a total of 12% to each billThe company wants a program that will accept customer's name and the number of text messages sent. The program should display the customer's name and the total end of the month bill before and after taxes are added.

Answers

Answer:

The pseudocode is as given below in the explanation while the flow diagram is attached herewith

Explanation:

The pseudocode is as follows

input cust_name, num_texts  

Set Main_bill=5 $;

if the num_texts is less than or equal to 60

Excess_Charge=0;

If the num_texts is greater than 60 and less than or equal to 200

num_text60200 =num_texts-60;

Excess_Charge=0.1*(num_text60200);

else If the num_texts is greater than 60

num_texts200 =num_texts-200;

Excess_Charge=0.25*(num_texts200)+0.1*(200-60);

Display cust_Name

Total_Bill=Main_bill+Excess_Charge;

Total_Bill_after_Tax=Total_Bill*1.12;

It's inventiveness, uncertainty futuristic ideas typically deal with science and technology.what is it?

Answers

Answer:

Engineering and Science

Explanation:

Which of the following is true about operating system.

a. acts as an intermediary between the computer user and the computer hardware.
b. program that manages the computer hardware.
c. provides a basis for application progra

Answers

Answer:

google kis kam ka hai us se puch lo

You acquire a network vulnerability-scanning tool and try it out on a network address segment belonging to people at your university of business. The scanner identifies one computer named Prince Hal that has many serious vulnerabilities. You deduce to whom the machine belongs. Explain the ethical implication of:________.
a. telling the owner what you have found,
b. telling you local administrator or security officer what you have found
c. exploiting one of the relatively minor vulnerabilities to show the owner how serious the exposure is
d. exploiting a relatively minor vulnerability as a prank without telling the owner,
e. telling the owner what you have found and the demanding money for details on the vulnerabilities
f. using one of the vulnerabilities to acquire control of the machine, downloading and installing patches and changing settings to address all the vulnerabilities, and never telling anyone what you have done.

Answers

Answer and Explanation:

The speculates on either the morality of transmitting vulnerabilities to an individual over all the internet. The node is a very possible target of a criminal charge, these are highly recommended in terms of the problem not just ethical.The question argues the etiquette of telling a compromised network infrastructure to something like a domain admins or security guard. Throughout this case the primary admin issue is power. Informing individuals about both the potential problem is prudent or legal, which is also preferable to recommend the future course of action.The speculates on either the moral values of leveraging the infrastructure for a mild vulnerability. This same proprietor including its node is truly likely to be victims of a prospective infringement, and therefore it is advantageous to notify him including its problem that the equitable access is considered to become an ethical manipulate susceptibility for possessor data as well as potential threats to understanding.The theories a small flaw throughout the channel's ethics. The device's leader is the likely guilty party of even a future offense to notify him of both the actual problem. The law is ridiculous as well as comparable to trying to hack without permission vulnerability it's immoral vulnerability.The content upon the ethical principles of manipulating the channel's small susceptibility. The device's owner seems to be the likely casualty of such a future offense to instruct him including its subject. As well as trying to sell him much farther documents socially responsible borders. It's the holder who has so far notified the weakness she perhaps she has just one option to obtain products and services. Having clear data on the sale still seems to be ethical.The issue argues mostly on ethics with repairing security flaws without channel assent. Although the controlled variable of the modules has been the true likely target of such a future infringement, exploiting susceptibility without permission is appropriate as well as unethical, this same objective being honorable as well as noble.

Universal Containers has two customer service contact centres and each focuses on a specific product line. Each contact centre has a varying call volume, contributing to a high operational cost for the company. Universal Containers wants to optimize the cost without compromising customer satisfaction.; What can a consultant recommend to accomplish these objectives?
A. Prioritize customer calls based on their SLA
B. Cross-train agents on both product lines
C. Enable agents to transfer calls to other agents
D. Implement a customer self-service portal

Answers

Answer:

B. Cross-train agents on both product lines

D. Implement a customer self-service portal

Explanation:

Cross-training is a way of teaching employees different aspects of the job so that they can have a measure of flexibility in the discharge of duties. Managers find this approach to be effective as they believe it saves cost and maximizes the usefulness of employees. It also helps to serve and satisfy a wider range of customers.

So for Universal Containers seeking to optimize cost without compromising customer satisfaction while managing two customer service contact centers, an effective way of dealing with the large call volumes is cross-training agents on both product lines so that they can attend to a wider range of customers. Cross-training agents on both product lines would make them more knowledgeable of the services being offered and this would minimize the need to transfer calls as all agents can provide information on the various products.

Implementing a customer self-service portal would also reduce the workload on the customer service agents as customers can access the information they need on their own.

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

Answers

Answer:

Sequencing

Explanation:

Answer:

SEQUENCING

Explanation:

web pages with personal or biograpic information are called ​

Answers

Answer:

Web pages with personal or biographic information are called. a. Social Networking sites. c.

Explanation:

The U.S. continues to become more dependent on the global domain within the information environment consisting of the interdependent network of information technology infrastructures, including the Internet, telecommunications networks, computer systems, and embedded processors and controllers. It is imperative that we safeguard this domain known as _____.

Answers

Answer:

cyberspace

Explanation:

It is the notional environment in which communication over computer networks occurs.

It is imperative that we safeguard this domain known as cyberspace.

What is cyberspace?

The meaning of the cyberspace is the climate of the Internet.

There is large network of computers connected together in offices or organizations to explore the internet. The cyberspace has formed the first important needed thing in this century without which nothing can be done in personal space or in any companies.

The U.S. continues to become more dependent on the global domain within the information environment consisting of the interdependent network of information technology infrastructures, including the Internet, telecommunications networks, computer systems, and embedded processors and controllers.

So, we safeguard this domain known a cyberspace.

Learn more about cyberspace.

https://brainly.com/question/832052

#SPJ2

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.

Answers

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)

The Nigerian 4-6-9 scam refers to a fraudulent activity whereby individuals claiming to be from a foreign country will promise a victim large sums of money for assisting them in secretly moving large sums of money.

a. True
b. False

Answers

Answer:

b. False

Explanation:

The system of fraud is called 4-1-9 scam. And yes, victims are always promised large sum of money to secretly help in moving a large sum of money.

Write a program in C# : Pig Latin is a nonsense language. To create a word in pig Latin, you remove the first letter and then add the first letter and "ay" at the end of the word. For example, "dog" becomes "ogday" and "cat" becomes "atcay". Write a GUI program named PigLatinGUI that allows the user to enter a word and displays the pig Latin version.

Answers

Answer:

The csharp program is as follows.

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;  

namespace WindowsFormsApplication1

{

   public partial class Form1 : Form

   {

       public Form1()

       {

           InitializeComponent();

       }

private void button1_Click(object sender, EventArgs e)

       {

           string word = textBox1.Text;

               string  ch = word.Substring(0, 1);

               string str = word.Substring(1, word.Length-1);

               string s = str.Insert(str.Length, ch);

               textBox2.Text = s.Insert(s.Length, "ay");            

       }

     private void button3_Click(object sender, EventArgs e)

       {

           Close();

       }

       private void button2_Click(object sender, EventArgs e)

       {

           textBox1.Text = "";

           textBox2.Text = "";

       }

   }

}

Explanation:

1. A string variable to hold the user input is declared and initialized accordingly. The user inputted string is taken from textbox1.

string word = textBox1.Text;

2. A string variable to hold the first character of the user inputted string is declared and initialized.

string  ch = word.Substring(0, 1);

3. A string variable to hold the user inputted string without the first character is declared and initialized accordingly.

string str = word.Substring(1, word.Length-1);

4. A string variable to hold the substring from step 3 along with the inserted characters at the end, is declared and initialized accordingly.

string s = str.Insert(str.Length, ch);

5. The final string is assigned to the textbox 2, which is the PigLatin conversion of the user inputted string.

textBox2.Text = s.Insert(s.Length, "ay");

6. All the above take place when the user clicks Convert to PigLatin button.

7. Two additional buttons, clear and exit are also included in the form.  

8. When the user clicks clear button, both the textboxes are initialized to empty string thus clearing both the textboxes.

 textBox1.Text = "";

           textBox2.Text = "";

9. When the user clicks the exit button, the application closes using the Close() method.

10. The program is done in Visual Studio.

11. The output of the program is attached.

12. The program can be tested for any type of string and any length of the string.

Describe and list advantages and disadvantages of each of the following backup types:

full, differential, incremental, selective, CPD, and cloud. ​

Answers

Answer:

Full back up

It creates complete copy of the source of data. This feature made it to the best  back  up with good speed of recovery of the data and  simplicity.However, because it  is needed for backing up  of  a lot of data, it is time consuming process,Besides it also  disturbs the routine application of  the technologist infrastructure. In addition large capacity storage is needed  for the  storage of  the large volume of back up with each new creation.

Incremental back up: back up work at high speed thus saves time, Little storage capacity is needed. This type of back up can be run as  many time as wished.

However, the restoration of data takes time, due to the time spent for restoration of initial back up and the incremental.

Differential Back up has very fast back up operation, because it only requires two pieces of back up.This is however slower compare to the Incremental.

The selective back up enable selection of certain type of file or folders for back up.

it can only be used to back up folders only when important data  are needed only.Thus the  storage capacity is low.

CPD eliminates back up window and reduces the recovery point objective.However, it has issue of compatibility with the resources to back up.,it is also expensive because its solutions are disk based.

Cloud based is affordable and save cost,It is easier to access. it is efficient,it can be access remotely for convenience.

However, Internet sources and some bandwidth must be available for access., always depends on third party providers,There is also problems encountered when switching providers.

Explanation:

Using MARS/MIPS
A) Write a program which increments from 0 to 15 and display results in Decimal on the console
B) Modify above program to increment from 0 to 15 and display results in Hexadecimal on the console

Answers

Answer:

Explanation:

MIPS program which increments from 0 to 15 and display results in Decimal on the console

In this program the user defined procedures print_int and print_eot were used to print the integer values and new line characters(\n) respectively.the mechanisam of the loop is explaine in the comment section of the program.

     addi $s0, $0, 0

     addi $s1, $0, 15

print_int:

              li $v0, 1                # system call to print integer

              syscall                

              jr $ra                     # return

print_eol:                      # prints "\n"

            li $v0, 4            

              la $a0, linebrk      

              syscall              

              jr $ra                  # return

main: . . .          

              li $a0, 0                # print 0

              jal print_int         # print value in $a0

loop:   move $a0, $s0           # print loop count

       jal print_int        

       jal print_eol           # print "\n" character

       addi $s0, $s0, 1        # increment loop count by 1

       ble $s1, $s0, loop      # exit if $s1<$s0

beq $s0, $0, end

end:

MIPS progam to increment from 0 to 15 and display results in Hexadecimal on the console

this program is slightly differed from the previous program in this program the system call issued in print_int is implemented with a system call that prints numbers in hex.

addi $s0, $0, 15

     addi $s1, $0, 0

print_int:

   li      $v0,34                  # syscall number for "print hex"

   syscall                         # issue the syscall

              jr $ra                     # return

print_eol:                      # prints "\n"

            li $v0, 4            

              la $a0, linebrk      

              syscall              

              jr $ra                  # return

main: . . .          

              li $a0, 0                # print 0

              jal print_int         # print value in $a0

loop:   move $a0, $s0           # print loop count

       jal print_int        

       jal print_eol           # print "\n" character

       addi $s0, $s0, 1        # increment loop count by 1

       ble $s1, $s0, loop      # exit if $s0>$s1

beq $s0, $0, end

end:

Consider the following skeletal C-like program:
void fun1(void); /* prototype */
void fun2(void); /* prototype */
void fun3(void); /* prototype */
void main() {
int a, b, c;
. . .
}
void fun1(void) {
int b, c, d;
. . .
}
void fun2(void) {
int c, d, e;
. . .
}
void fun3(void) {
int d, e, f;
. . .
}
Given the following calling sequences and assuming that dynamic scoping is used, what variables are visible during execution of the last function called? Include with each visible variable the name of the function in which it was defined
a. main calls funl; funl calls fun2; fun2 calls fun3
b. main calls fun1; fun1 calls fun3
c. main calls fun2; fun2 calls fun3; fun3 calls funl
d. main calls fun1; funl calls fun3; fun3 calls fun2.

Answers

Answer:

In dynamic scoping the current block is searched by the compiler and then all calling functions consecutively e.g. if a function a() calls a separately defined function b() then b() does have access to the local variables of a(). The visible variables with the name of the function in which it was defined are given below.

Explanation:

a. main calls fun1; fun1 calls fun2; fun2 calls fun3

Solution:

Visible Variable:  d, e, f         Defined in: fun3Visible Variable: c                  Defined in: fun2 ( the variables d and e of fun2 are not visible)Visible Variable: b                  Defined in: fun1 ( c and d of func1 are hidden)Visible Variable: a                  Defined in: main (b,c are hidden)

b. main calls fun1; fun1 calls fun3

Solution:

Visible Variable:  d, e, f          Defined in: fun3 Visible Variable:  b, c              Defined in: fun1 (d not visible)Visible Variable:  a                 Defined in: main ( b and c not visible)

c. main calls fun2; fun2 calls fun3; fun3 calls fun1

Solution:

Visible Variable:  b, c, d         Defined in: fun1 Visible Variable:  e, f              Defined in: fun3 ( d not visible)Visible Variable:  a                 Defined in: main ( b and c not visible)

Here variables c, d and e of fun2 are not visible .

d. main calls fun1; fun1 calls fun3; fun3 calls fun2

Solution:

Visible Variable: c, d, e        Defined in: fun2Visible Variable:  f                Defined in: fun3 ( d and e not visible)Visible Variable:  b              Defined in: fun1 ( c and d not visible)Visible Variable: a                Defined in: main ( b and c not visible)

Let K(x, y) denote the statement "x knows y" and D denote the domain of all people. Express the following English sentences as a quantified proposition using the definitions above:

1. Everybody knows somebody.
2. There is somebody that no one knows.
3. There is no one who knows everybody

Answers

Answer:

Given: K(x,y) denotes statement:

"x knows y"

D denote domain of all people.

Explanation:

1. Everybody knows somebody.

Solution:

∀x∈D ∃y∈D : K(x, y)

∀ means for all. Here it is used for Everybody.

∃ means there exists some. Here it represents Somebody.

∈ means belongs to . Both x and y belongs to the domain D of all people.

2. There is somebody that no one knows.

Solution:

∀x∈D ∃y∈D : ¬K(x, y)

∀ means for all. ∃ means there exists some. ∈ means belongs to both x and y belongs to the domain D of all people.¬ this is negation sign which means not K(x,y). So the negation of everybody knows somebody can be expressed as there is somebody that no one knows.

3. There is no one who knows everybody

Solution:

This can be represented in both the ways below.

∀ y∈D ∃ x∈D : K(x, y)

∀ means for all. ∃ means there exists some. ∈ means belongs to both x and y belongs to the domain D of all people.

∀x∈D ∀y∈D : ¬K(x, y)

∀ means for all. The negation shows that there is no one who knows everybody.

The Fast Freight Shipping Company charges the following rates for different package weights:
2 pounds or less: $1.50
over 2 pounds but not more than 6 pounds: $3.00
over 6 pounds but not more than 10 pounds: $4.00
over 10 pounds: $4.75
Write a program that asks the user to enter the weight of a package and then displays the shipping charges. The program should also do "Input Validation" that only takes positive input values and show a message "invalid input value!" otherwise.

Answers

Answer:

import java.util.Scanner;

public class ShippingCharge

{

   static double wt_2=1.50;

   static double wt_6=3;

   static double wt_10=4;

   static double wt_more=4.75;

   static double charge;

   static double weight;

public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

   do

   {

 System.out.print("Enter the weight of the package: ");

 weight = sc.nextDouble();

 if(weight<=0)

     System.out.println("Invalid input value!");

}while(weight<=0);

 if(weight<=2)

    charge=wt_2;

else if(weight<=6 && weight>2)

    charge=wt_6;

else if(weight<=10 && weight>6)

    charge=wt_10;

else

    charge=wt_more;

System.out.println("Shipping charges for the entered weight are $"+charge);

}

}

OUTPUT

Enter the weight of the package: 0

Invalid input value!

Enter the weight of the package: 4

Shipping charges for the entered weight are $3.0

Explanation:

1. The variables to hold all the shipping charges are declared as double and initialized.

   static double wt_2=1.50;

   static double wt_6=3;

   static double wt_10=4;

   static double wt_more=4.75;

2. The variable to hold the user input is declared as double.

   static double charge;

   static double weight;

3. The variable to hold the final shipping charge is also declared as double.  

4. Inside main(), an object of Scanner class is created. This is not declared static since declared inside a static method, main().

Scanner sc = new Scanner(System.in);

5. Inside do-while loop, user input is taken until a valid value is entered.

6. Outside the loop, the final shipping charge is computed using multiple if-else statements.

7. The final shipping charge is then displayed to the user.

8. All the code is written inside class since java is a purely object-oriented language.

9. The object of the class is not created since only a single class is involved.

10. The class having the main() method is declared public.  

11. The program is saved with the same name as that of the class having the main() method.

12. The program will be saved as ShippingCharge.java.

13. All the variables are declared as static since they are declared outside main(), at the class level.

Other Questions
I need help please! Im really confused about it what is the rule for the reflection? Youre about ready to sign a big new client to a contract worth over $50,000. Your boss is under a lot of pressure to increase sales. He calls you into his office and tells you his job is on the line, and he asks you to include the revenue for your contract in the sales figures for the quarter that ends tomorrow. You know the contract is a sure thing but the client is out of town and cannot possibly sign by tomorrow. What do you do? How many grams of the salt CaF2 (g) are formed when 15.7 mL of 0.612 M KF reacts with an excess of aqueous calcium bicarbonate (Ca(HCO3)2) via a metathesis reaction? A wealth gap is an economic difference between nations. economic classes. businesses. governments. Three consecutive integers have a sum of 45. Find the integers. Answer these correctly pls 1) 2x y = 1 2x +2y = 102) 5x y =15 x + y = -3please do both of these with explanation!! A company starts to track the number of phone calls received each month. Information about the number of phone calls the company received the first months of tracking is listed below. ~ During the first month, the company received 4,264 phone calls. ~ During the second month, the company received 25% more phone calls than in the first month. ~ During the third month, the company received 6,396 phone calls. What was the percent increase in the number of phone calls from the second month to the third month? Show your work. Please answer this correctly What is the value of the trig ratio cos x ? Help ASAP The following is a passage from Homer's The Odyssey, whichwas written in ancient Greece.Of all that breathes and crawls across the earth,our mother earth breeds nothing feebler than a man.So long as the gods grant him power, spring in his knees,he thinks he will never suffer affliction down the years.But then, when the happy gods bring on the long hardtimes,bear them he must, against his will, and steel his heart.What does the underlined line in this passage tell the readerabout the cultural context of this passage?O A. The author is deeply religiousB. Gods have no influence over people's lives.O C. People believed in multiple gods.O D. Christianity is the main religion of this culture. The purchase price of a home is $159,000.00 and the 30-year mortgage has a 20% down payment and an annual interest rate of 4.4%. What is the monthly mortgage payment? Enter your answer as a dollar value, such as 3456.78 The ______ model of mental disorder, which proposes that an individual develops a disorder when a genetic weakness is sufficiently stressed by an event in the environment, is supported by Bowen theorists and psychoeducational therapists. Group of answer choices From a sample with nequals24, the mean number of televisions per household is 4 with a standard deviation of 1 television. Using Chebychev's Theorem, determine at least how many of the households have between 2 and 6 televisions. At least nothing of the households have between 2 and 6 televisions. Please help...What is an equation in terms of x and y that can be used to model the proportional relationship? Match each situation below to a letter on the illustration.BallstartshereLetterSituationPotential energy is the highestLosing kinetic energy, gaining potential energyKinetic energy is highestLosing potential energy, gaining kinetic energy , what measures will you put in place to ensure that your bank will not be caught up in the same situation as the collapsed banks? What are the coordinates of point P on the directed line segment from A to B such that P is One-fourth the length of the line segment from A to B? (StartFraction negative 29 Over 4 EndFraction , negative three-halves) (negative thirteen-fourths, one-half) (negative eleven-fourths, negative one-half) (twenty-five-fourths, negative one-half) True or false :you can use basic information gathering questions (who , what , where, and why). To identify the cause of a person behaviors