Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "Too small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bagOunces followed by " seconds". End with a newline.

Answers

Answer 1

The completed function "PrintPopcornTime()" can be referred to as given below.

We have,

The completed function "PrintPopcornTime()" as requested:

void PrintPopcornTime(int bagOunces) {

   if (bagOunces < 2) {

       System.out.println("Too small");

   } else if (bagOunces > 10) {

       System.out.println("Too large");

   } else {

       int time = 6 * bagOunces;

       System.out.println(time + " seconds");

   }

   System.out.println();

}

In this function, we check the value of "bagOunces" using conditional statements.

If it's less than 2, we print "Too small".

If it's greater than 10, we print "Too large".

Otherwise, we calculate the time by multiplying 6 with "bagOunces" and print it followed by " seconds".

Finally, we print a new line to end the output.

Thus,

The completed function "PrintPopcornTime()" can be referred to as given above.

Learn more about programming of functions here:

https://brainly.com/question/14684896

#SPJ6

Answer 2

Final answer:

The question involves creating a function, PrintPopcornTime(), that uses conditional logic to print different messages based on the provided parameter value, demonstrating fundamental programming concepts such as if-else statements and arithmetic operations.

Explanation:

The question asks to complete a function named PrintPopcornTime() in a programming context, which requires conditional logic to print different outputs based on the value of the parameter bagOunces. The function is supposed to print "Too small" if the value of bagOunces is less than 2, "Too large" if the value is greater than 10, and compute the time in seconds (by multiplying bagOunces by 6) to print for any value between 2 and 10 inclusive.

To fulfill this requirement, a combination of if-else statements can be used to check the size of bagOunces and print the corresponding message. The computation and print statement for values between 2 and 10 inclusive uses the logic of 6 * bagOunces followed by appending " seconds" to the result. Here's an example in pseudocode:

void PrintPopcornTime(int bagOunces) {
 if (bagOunces < 2) {
   print("Too small");
 } else if (bagOunces > 10) {
   print("Too large");
 } else {
   print(6 * bagOunces + " seconds");
 }
 print("\n"); // Prints a newline
}

This function demonstrates basic control structures like conditional statements which are fundamental in programming.


Related Questions

BI is an umbrella term that combines architectures, tools, databases, analytical tools, applications, and methodologies. b. BI is a content-free expression, so it means the same thing to all users. c. BI's major objective is to allow access to data (and models) to only IT. d. BI does not help transform data, to information (and knowledge), to decisions and finally to action.

Answers

Answer:

architectures, tools, databases, analytical tools, applications, and methodologies

Explanation:

There are several features of business intelligence. It is a content-free expression, which means that it means different things to different people, and not same thing as suggested by Option B. While its major objective is to enable or allow easy access to data, it is not limited to data and IT only as suggested by Option C. Instead it provides managers of businesses with the ability of analysis of data. And finally it helps in the transformation of data to information and to action, which is contrary to the suggestions of Option D. Hence the first option is the only correct option.

in a multitasking system, the context-switch time is 1ms and the time slice is 10ms. Will the CPU efficiency increase or decrease when we increase the time slice to 15ms? Explain why.

Answers

Answer:

Answer explained below

Explanation:

It depends on the arrival time and burst time of the processes. On increasing the time slice the waiting and turn around time can increase and decrease both.

As waiting time and turn around time are the major criteria for calculating the efficiency, so we can't say whether the efficiency will increase or decrease.

Why are user application configuration files saved in the user’s home directory and not under /etc with all the other system-wide configuration files? ____________________________________________________________________________________

Answers

Explanation:

The main reason why is because regular users don't have permission to write to /etc. Assuming this is Linux, it is a multi-user operating system. Meaning if there are user-application configuration files within /etc, it would prevent users from being able to customize their applications.

1.) You are a digital forensic examiner and have been asked to examine a hard drive for potential evidence. Give examples of how the hard drive (or the data on it) could be used as (or lead to the presentation of) all four types of evidence in court; testimonial, real, documentary, and demonstrative. If you do not believe one or more of the types of evidence would be included, explain why not.

Answers

Answer & Explanation:

The hard drive could contain some type of reports which might prove to be the evidence of some bad guys involved. Some real evidence such as images or documents related to the crime committed such as corruption-related property papers details of bank accounts along with a possibility that it may also contain a video recording which may prove as evidence. so there shouldn't be any demonstrative proof which can present there by having a hard drive and can be used as evidence in the court.

Compare the elements of the basic Software Development Life Cycle with 2 other models. How are they similar? How are they different? Write a paragraph for each of 3 models describing each. Then write a paragraph comparing the differences and similarities among the 3. Your submission should be 1-2 pages of discussion.

Answers

Answer:

Explanation:

One of the basic notions of the software development process is SDLC models which stands for Software Development Life Cycle models. SDLC – is a continuous process, which starts from the moment, when it’s made a decision to launch the project, and it ends at the moment of its full remove from the exploitation. There is no one single SDLC model. They are divided into main groups, each with its features and weaknesses. The most used, popular and important SDLC models are given below:

1. Waterfall model

2. Iterative model

3. Spiral model

4. V-shaped model

5. Agile model

Stage 1. Planning and requirement analysis

Each software development life cycle model starts with the analysis, in which the stakeholders of the process discuss the requirements for the final product.

Stage 2. Designing project architecture

At the second phase of the software development life cycle, the developers are actually designing the architecture. All the different technical questions that may appear on this stage are discussed by all the stakeholders, including the customer.  

Stage 3. Development and programming

After the requirements approved, the process goes to the next stage – actual development. Programmers start here with the source code writing while keeping in mind previously defined requirements. The programming by itself assumes four stages

• Algorithm development

• Source code writing

• Compilation

• Testing and debugging

Stage 4. Testing

The testing phase includes the debugging process. All the code flaws missed during the development are detected here, documented, and passed back to the developers to fix.  

Stage 5. Deployment

When the program is finalized and has no critical issues – it is time to launch it for the end users.  

SDLC MODELS

Waterfall – is a cascade SDLC model, in which development process looks like the flow, moving step by step through the phases of analysis, projecting, realization, testing, implementation, and support. This SDLC model includes gradual execution of every stage completely. This process is strictly documented and predefined with features expected to every phase of this software development life cycle model.

ADVANTAGES  

Simple to use and understand

DISADVANTAGES

The software is ready only after the last stage is over

ADVANTAGES

Management simplicity thanks to its rigidity: every phase has a defined result and process review

DISADVANTAGES

High risks and uncertainty

Iterative SDLC Model

The Iterative SDLC model does not need the full list of requirements before the project starts. The development process may start with the requirements to the functional part, which can be expanded later.  

ADVANTAGES                                        

Some functions can be quickly be developed at the beginning of the development lifecycle

DISADVANTAGES

Iterative model requires more resources than the waterfall model

The paralleled development can be applied Constant management is required

Spiral SDLC Model

Spiral model – is SDLC model, which combines architecture and prototyping by stages. It is a combination of the Iterative and Waterfall SDLC models with the significant accent on the risk analysis.

Write a function solution that returns an arbitrary integer which is greater than n.

Answers

Answer:

   public static int greaterThanInt(int n){

       return n+10;

   }

Explanation:

This is a very simple method in Java. it will accept an argument which is an integer n and return n+10 since the question requires that an arbitrary integer greater than n be returned adding any int value to n will make it greater than n.

A complete java program calling the method is given below:

import java.util.Scanner;

public class ANot {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Please enter an integer");

       int n = in.nextInt();

       int greaterInt = greaterThanInt(n);

       System.out.println("You entered "+n+", "+greaterInt+" is larger than it");

   }

   public static int greaterThanInt(int n){

       return n+10;

   }

}

In a point-to-point single network, how many physical links will there be when a packet is transmitted?

Answers

Answer:

One

Explanation:

A network is the interconnection and communication of two or more computer devices. Computer systems on a network shares resources with one another, using network standards like OSI and TCP/IP suite model and using the protocols on each layers.

There are two major types of network communication between devices and they are peer to peer or point to point Network and client-server network.

Point to point Network uses one secure physical link to connect two computers or routers in a network.

Write a Python function uniquely_sorted() that takes a list as a parameter, and returns the unique values in sorted order.

Answers

Answer:

   Following is the program in Python language  

def uniquely_sorted(lst1): #define the function uniquely_sorted

   uni_que = [] #creating an array

   for number in lst1: #itereating the loop

       if number not in uni_que: #check the condition

           uni_que.append(number)#calling the function

   uni_que.sort() #calling the predefined function sort

   return uni_que #returns the  unique values in sorted order.

print(uniquely_sorted()([8, 6, 90, 76])) #calling the function uniquely_sorted()

Output:

[6,8,76,90]

Explanation:

   Following are the description of the Python program

Create a functionuniquely_sorted() that takes "lst1" as a list parameter. Declared a uni_que[] array . Iterating the loop and transfer the value of "lst1" into "number" Inside the loop call, the append function .the append function is used for adding the element in the last position of the list. Call the predefined function sort(for sorting). Finally, call the function uniquely_sorted() inside the print function.

   

The effectiveness of a(n) _____ process is essential to ensure the success of a data warehouse. Select one: a. visual basic b. extract-transform-load c. chamfering d. actuating

Answers

Answer:

B. Extract-transform-load

Explanation:

Extract, transform, load (ETL) and Extract, load, transform (E-LT) are the two main approaches used to ensure the success of a data warehouse system.

An extract-transform-load (ETL) process is used to pull data from disparate data sources to populate and maintain the data warehouse. An effective extract-transform-load (ETL) process is essential to ensure data warehouse success.

Option A (Visual Basic) is an example of programming language.

Answer:

b. extract-transform-load

Explanation:

A data warehouse is a repository of data gathered from other data sources, to provide a medium of central data streaming for data analysis and reporting purposes. It hold data from multiple source, where the data are extracted, transformed and loaded to the data warehouse.

ETL or extract-transform-load is very important for the successful implementation of data warehousing

Write a function called cipher(phrase,shift)that accepts two parameters: a string phrase and an integer shift.The integer shift can be positive, negative or zero.

Answers

Answer:

Following is given the code according to requirement.

The code is attached as an image so that the indentation is understood by the user. Comments are given inside the code where necessary.

The output of code is also attached as well  in end.

I hope it will help you!

Explanation:

If you hear that an airplane crashes into the Empire State Building, and you immediately think of the 9/11 terrorist attack on the World Trade Center, you are reacting to what type of memory? a repressed memory a suppressed memory a flashbulb memory a pseudo-memory

Answers

Final answer:

If you think of the 9/11 terrorist attack when hearing about an airplane crashing into the Empire State Building, you are reacting to a flashbulb memory.

Explanation:

If you hear that an airplane crashed into the Empire State Building and immediately think of the 9/11 terrorist attack on the World Trade Center, you are reacting to a memory known as flashbulb memory. A flashbulb memory is an exceptionally clear recollection of an important and emotionally charged event.

Thus, a flashbulb memory is a vivid, detailed, and long-lasting recollection of the circumstances surrounding a significant, emotionally charged event. Many people remember exactly where they were and how they heard about significant events like 9/11, even years later. These memories can be vivid and distinct, often accompanied by strong emotions.

The type of memory you are experiencing is called a flashbulb memory so the correct option is C. a flashbulb memory.

If you hear that an airplane crashes into the Empire State Building and immediately think of the 9/11 terrorist attack on the World Trade Center, you are reacting to a flashbulb memory. It is a vivid and emotional memory of an unusual event that people believe they remember well. This memory is related to the strong emotional impact of the event, such as the 9/11 terrorist attack.A flashbulb memory is an exceptionally clear and vivid memory of an important and emotional event that people often believe they remember very well.For example, many people can recall exactly where they were and what they were doing when they first heard about the 9/11 attacks. These types of memories are characterized by their strong emotional associations and are typically remembered in great detail, though they are not immune to inaccuracies over time.

Complete question:

If you hear that an airplane crashes into the Empire State Building, and you immediately think of the 9/11 terrorist attack on the World Trade Center, you are reacting to what type of memory?
A. a repressed memory
B. a suppressed memory
C. a flashbulb memory
D. a pseudo-memory

Write statements that declare inFile to be an ifstream variable and outFile to be an ofstream variable.

Answers

Answer:

Following are the statement in the c++ language

ifstream inFile;  // declared a variable inFile

ofstream outFile; //declared a variable outFile

Explanation:

The  ifstream and ofstream  is the file stream object in the c++ Programming language .The ifstream file stream object is used for reading the contents from the file whereas the ofstream  file stream object is used for writting the contents into the file.

We can create the variable for the ifstream and ofstream These variable is used for reading and writing into the File.Following are the syntax to create the ifstream variable and ofstream variable

        ifstream variablename;

        ofstream  variablename

Write pseudocode to represent the logic of a program that allows a user to enter three values then outputs the product of the three values. (If you're not sure of the definition of product be sure to look it up to verify its meaning.)

Answers

Final answer:

The pseudocode for a program that outputs the product of three user-entered values involves prompting the user for each value, calculating the product by multiplication, and displaying the result.

Explanation:

Writing Pseudocode for a Multiplication Program

The task is to write pseudocode that represents the logic of a program allowing a user to enter three values and then outputs the product of these values. The product refers to the result of multiplying the three numbers together. Below is the pseudocode for accomplishing this task:

START
   Prompt user to enter the first value
   Read firstValue
   Prompt user to enter the second value
   Read secondValue
   Prompt user to enter the third value
   Read thirdValue
   Set product to firstValue multiplied by secondValue multiplied by thirdValue
   Output product
END

This simple algorithm prompts the user to input three separate values and calculates the product by multiplying them together. The result is then displayed to the user.

Final answer:

The pseudocode for calculating the product of three user-entered values consists of reading the values, computing the product, and outputting the result.

Explanation:

The student is asking for pseudocode to calculate the product of three values entered by the user. Pseudocode is an informal way of programming description that does not require any strict programming language syntax, yet it describes the logic of the algorithm clearly. Below is an example of how this pseudocode might look:

START
   Prompt user for first value
   Read value1
   Prompt user for second value
   Read value2
   Prompt user for third value
   Read value3
   Set product = value1 * value2 * value3
   Output product
END

This pseudocode begins by prompting the user to enter three values. It then reads the values into three variables, calculates the product of these values by multiplying them, and finally outputs the product.

Calculate the number of hours since the birthdate. Insert your calculation in cell C15. (hint: convert the number of days to number of hours by multiplying the number of days in C14 by 24.)

Answers

Final answer:

To calculate the number of hours since a birthdate, multiply the number of days by 24 and insert the result in cell C15.

Explanation:

To calculate the number of hours since the birthdate, you need to first determine the number of days that have passed since that date. Once you have the number of days in cell C14, you multiply it by 24 to convert the number of days to a number of hours. For example, if cell C14 contains 10 days, then you would calculate the hours as follows:

10 days x 24 hours/day = 240 hours

You would then insert the result, 240 hours, into cell C15 to complete the calculation.

Final Answer

The number of hours since the birthdate is calculated by multiplying the number of days in cell C14 by 24.

Explanation

To determine the duration in hours since the birthdate, the process involves converting the number of days provided in cell C14 into hours. As there are 24 hours in a day, multiplying the number of days by 24 yields the total number of hours.

This formulaic approach accounts for the full span of days indicated, translating it accurately into an hourly representation.

Act on converting different time units to facilitate precise calculations for varied temporal requirements. Understanding these conversions aids in transforming durations to the most fitting unit, catering to specific contexts and calculations.

Remember for a moment a recent trip you have made to the grocery store to pick up a few items. What pieces of data did the Point of Sale (POS) terminal and cashier collect from you and what pieces of data about the transaction did the POS terminal pull from a database to complete the sale? In addition to the data collected and retrieved what information was generated by the POS terminal at the end of the order, as it is being completed?Identify the following parts of a common grocery store transaction as data, information, or knowledge.1. An item's UPC number 2. Change back to customer 3. General changes to demand in different seasons 4. Cost each Data 5. Quantity purchased 6. Non-taxable total 7. Extended cost (quantity times cost each) 8. Amount tendered 9. Sales of an item for the last week 10. Upcoming holidays and customer's special needs 11. How paid (cash, charge card, debit card) 12. Shopper loyalty card number 13. Taxable total

Answers

Answer:

Answer is explained below

Explanation:

Data: Data are raw facts and figures that are collected together for analysis. In other words, Simple no processing is data.

Information: Information is the facts provided about something. In simple terms, processed data is information.

Knowledge: Knowledge is the processed facts that are understand for a conclusion.

1. An item's UPC number - data

Explanation: An item number is data because simple no processing is required.

2. Change back to customer - information

Explanation: Data about a customer is information.

3. General changes to demand in different seasons - knowledge

Explanation: Requires data (time and quantity purchased) to be processed/aggregated into information. The information is understood to provide a pattern of demad changes due to seasons.

4. Cost each - data

Explanation: Cost each is data because simple no processing is required.

5. Quantity purchased - data

Explanation: Cost each is data because simple no processing is required.

6. Non-taxable total - information

Explanation: -- requires that data (prices, amounts and whether the item is taxable) to be processed (price * amount for items that are non-taxable).

7. Extended cost [quantity times cost each] - information

Explanation: Extended cost requires processing two pieces of data quantity and cost

8. Amount tendered - data

Explanation: Amount tendered is data because simple no processing is required.

9. Sales of an item for the last week - information

Explanation: Sales of an item for the last week requires aggregating sales for a specific time frame together

10. Upcoming holidays and customer's special needs - knowledge

Explanation: Upcoming holidays and customer's special needs requires holiday data (dates) to be combined with information gathered about customer to understand customer's special needs

11. How paid [cash, charge card, debit card] - data

Explanation: Cost each is data because simple no processing is required.

12. Shopper loyalty card number - data

Explanation: Cost each is data because simple no processing is required.

13. Taxable total - information

Explanation: Taxable total requires that data (prices, amounts and whether the item is taxable) to be processed (price * amount for items that are taxable).

The top 3 most popular male names of 2017 are Oliver, Declan, and Henry according to babynames.

1. Write a program that modifies the male_names set by removing a name and adding a different name. Sample output with inputs: 'Oliver' 'Atlas' { 'Atlas', 'Declan', 'Henry' }

NOTE: Because sets are unordered, the order in which the names in male_names appear may differ from above.

Answers

male_names = {'Atlas', 'Declan', 'Henry'}

def modify_names(old_name, new_name, names_set):

   names_set.discard(old_name)

   names_set.add(new_name)

   return names_set

male_names = {'Oliver', 'Declan', 'Henry'}

old_name = input("Enter the name to remove: ")

new_name = input("Enter the name to add: ")

new_male_names = modify_names(old_name, new_name, male_names)

print(new_male_names)

Enter the name to remove: Oliver

Enter the name to add: Atlas

{'Atlas', 'Declan', 'Henry'}

A 1 MB digital file needs to transmit a channel with bandwidth of 10 MHz and the SNR is 10 dB. What is the minimum amount of time required for the file to be completely transferred to the destination?

Answers

Answer:

A 1 MB digital file needs 0.23 seconds to transfer over a channel with bandwidth 10 MHz and SNR 10 dB.

Explanation:

We can calculate the channel capacity using Shannon's Capacity formula:

C = B + log₂ (1 + SNR)

Where C = Channel Capacity

           B = Bandwidth of the Channel

           SNR = Signal to Noise Ratio

We are given SNR in dB so we need to convert it into a ratio.

[tex]SNR_{dB}[/tex] = 10log₁₀ (SNR)

10 = 10log₁₀ (SNR)

1 = log₁₀ (SNR)

SNR = 10¹

SNR = 10

So, using Shannon Channel Capacity formula:

C = 10 x 10⁶ log₂ (1 + 10)

C = 34.5 MHz

Total amount of time required to transmit a 1MB file:

1MB = 1 x 8 Mbytes = 8Mb

C = 34.5 MHz = 34.5 Mb/s

Time required = 8Mb/34.5Mb/s = 0.23 seconds

A 1 MB digital file needs 0.23 seconds to transfer over a channel with bandwidth 10 MHz and SNR 10 dB.

In Programming Exercise 2, the class dateType was designed and implemented to keep track of a date, but it has very limited operations. Redefine the class dateType so that it can perform the following operations on a date, in addition to the operations already defined: a. Set the month. b. Set the day. c. Set the year. d. Return the month. e. Return the day. f. Return the year. g. Test whether the year is a leap year. h. Return the number of days in the month. For example, if the date is 3-12-2011, the number of days to be returned is 31 because there are 31 days in March. i. Return the number of days passed in the year. For example, if the date is 3-18-2011, the number of days passed in the year is 77. Note that the number of days returned also includes the current day. j. Return the number of days remaining in the year. For example, if the date is 3-18-2011, the number of days remaining in the year is 288. k. Calculate the new date by adding a fixed number of days to the date. For example, if the date is 3-18-2011 and the days to be added are 25, the new date is 4-12-2011.

Answers

Answer:

Java class is given below

Explanation:

class Date{

private int date;

private int month;

private int year;

public Date(){}

public Date(int date,int month, int year){

this.date= date;

this.month = month;

this.year = year;

}

public void setDate(int date){

this.date = date;

}

public void setMonth(int month){

this.month = month;

}

public void setYear(int year){

this.year = year;

}

public int getDate(){

return date;

}

public int getMonth(){

return month;

}

public int getYear(){

return year;

}

public boolean isLeap(int year){

return year%4==0

}

}

Final answer:

To redefine the dateType class and add the requested operations, modify the class and include methods like setMonth, setDay, setYear, getMonth, getDay, getYear, isLeapYear, daysInMonth, daysPassedInYear, daysRemainingInYear, and addDays.

Explanation:Redesigning the dateType Class

To redefine the dateType class and add the requested operations, you can modify the existing class and include the following methods:

setMonth(int m): Set the month of the date.setDay(int d): Set the day of the date.setYear(int y): Set the year of the date.getMonth(): Return the month of the date.getDay(): Return the day of the date.getYear(): Return the year of the date.isLeapYear(): Test whether the year is a leap year.daysInMonth(): Return the number of days in the month.daysPassedInYear(): Return the number of days passed in the year.daysRemainingInYear(): Return the number of days remaining in the year.addDays(int numDays): Calculate the new date by adding a fixed number of days to the date.

By implementing these methods, you can enhance the functionality of the dateType class to perform all the requested operations.

Consider a system that contains 32K bytes. Assume we are using byte addressing, that is assume that each byte will need to have its own address, and therefore we will need 32K different addresses. For convenience, all addresses will have the same number n , of bits, and n should be as small as possible. What is the value of n ?

Answers

Answer:

n = 15

Explanation:

Using

Given

Number of bytes = 32k

At the smallest scale in the computer, information is stored as bits and bytes.

In the cases when used to describe data storage bits/bytes are calculated as follows:

Number of bytes when n = 1 is 2¹ = 2 bytes

When n = 2, number of bytes = 2² = 4 bytes

n = 3, number of bytes = 2³ = 8 bytes

So, the general formula is

Number of bytes = 2^n

In this case

2^n = 32k

Note that 1k = 1024 bytes,

So, 32k = 32 * 1024 bytes

Thus, 2^n = 32 * 1024

2^n = 2^5 * 2^10

2^n = 2^15

n = 15.

Final answer:

To address 32K bytes uniquely using byte addressing, 15 bits are required which [tex]2^{15}[/tex] equals 32768, the number of bytes in 32K. This demonstrates a fundamental concept of how memory is addressed in computing.

Explanation:

Understanding the minimum number of bits required to represent a certain amount of memory is a fundamental concept in computer science. To represent 32K bytes where 'K' stands for kilo (1024) due to binary base, we need to calculate the minimum number of bits (n) to address each byte. Essentially, 32K bytes equals 32 * 1024 = 32768 bytes. The question is how many bits are required to uniquely address each of these bytes.

To find the value of n, we rely on the principle that each bit can represent 2 states. Therefore, [tex]2^{n}[/tex] should be equal to or greater than 32768. Calculating this, we see that  [tex]2^{15}[/tex]  = 32768 exactly, indicating that 15 bits are sufficient to address 32K bytes uniquely. Thus, n = 15.

This example highlights how binary representation and addressing work in computing, illustrating why understanding of binary and byte addressing is crucial in fields related to computers and technology.

5)What are the differences in the function calls between the four member functions of the Shape class below?void Shape::member(Shape s1, Shape s2);void Shape::member(Shape *s1, Shape *s2);void Shape::member(Shape& s1, Shape& s2) const;void Shape::member(const Shape& s1, const Shape& s2);void Shape::member(const Shape& s1, const Shape& s2) const;

Answers

Answer:

void Shape :: member ( Shape s1, Shape s2 ) ; // pass by value

void Shape :: member ( Shape *s1, Shape *s2 ) ; // pass by pointer

void Shape :: member ( Shape& s1, Shape& s2 ) const ; // pass by reference

void Shape :: member ( const Shape& s1, const Shape& s2 ) ; // pass by const reference

void Shape :: member ( const Shape& s1, const Shape& s2 ) const ; // plus the function is const

Explanation:

void Shape :: member ( Shape s1, Shape s2 ) ; // pass by value

The s1 and s2 objects are passed by value as there is no * or & sign with them. If any change is made to s1 or s2 object, there will not be any change to the original object.

void Shape :: member ( Shape *s1, Shape *s2 ) ; // pass by pointer

The s1 and s2 objects are passed by pointer as there is a * sign and not & sign with them. If any change is made to s1 or s2 object, there will be a change to the original object.

void Shape :: member ( Shape& s1, Shape& s2 ) const ; // pass by reference

The s1 and s2 objects are passed by reference  as there is a & sign and not * sign with them. If any change is made to s1 or s2 object.

void Shape :: member ( const Shape& s1, const Shape& s2 ) ; // pass by const reference

The s1 and s2 objects are passed by reference  as there is a & sign and not * sign with them. The major change is the usage of const keyword here. Const keyword restricts us so we cannot make any change to s1 or s2 object.

void Shape :: member ( const Shape& s1, const Shape& s2 ) const ; // plus the function is const

The s1 and s2 objects are passed by reference  as there is a & sign and not * sign with them. const keyword restricts us so we cannot make any change to s1 or s2 object as well as the Shape function itself.

____ was the first-generation cellular telephone system.​ a. ​Advanced Mobile Phone Service (AMPS) b. ​Global System for Mobile (GSM) Communications c. ​Time Division Multiple Access (TDMA) d. ​Personal Communications Services (PCS)

Answers

Answer:

Global system for mobile

Explanation:

Answer:

The answer is "Option b"

Explanation:

GSM is a cellular network system of the second generation, which is currently used in the world's. It is most useful in a telecommunications network. It is also regarded as open-ended and wireless cellular technology for mobile voice and data transmission, and certain choices were incorrect, which is explained as follows:  

In option a, It is wrong because it is part of the first generation. In option c, It works on channels, that's why it is wrong. In option d, It is part of wireless communication, that's why it is wrong.

Re-write the following arithmetic expressions as Scheme expressions and show the result of the Scheme interpreter when invoked on your expressions. (a) (22+42) (54 x 99).(b) ((22+42) x 54) x 99. (c) 64 x 102 + 16 x (44/22).

Answers

Answer:

See Answer Below:

Explanation:

a) (22+42) (54 x 99)

= (22 + 42) × (54 × 99)

  (*      (+ 22 42)

           (* 54 99))

(b)    ((22+42) x 54) x 99

      = (*     (*    (+ 22 42)

                       54

                 99)

(c)  64 x 102 + 16 x (44/22)

   = (+    (* 64 102)

             (* 16

                 (/ 44 22) ) )

What does Lowenstam mean by the "interactive" model as a way of describing the relationship between images and texts? Explain.

Answers

Answer:

What does Lowenstam mean by the "interactive" model as a way of describing the relationship between images and texts? Explain.

Explanation:

The Lowenstam intercative model tries to explain the relationship between myth, poetry and art in the Homeric poems and the epic stories, stating that archaic Greek vases painters were representing, with their own artistic features, not thinking themselves as to be the illustrators of the  texts the way we inherited them, but in the way they interpreted them.

The laptop has a built-in wireless adapter or the wireless adapter is physically installed on a computer and it does not appear in Network Connections. What is most likely the problem when it does not show in Network Connections

Answers

Answer:

The wireless adapter driver software.

Explanation:

All computer systems are composed of hardware and software components. The hardware components is driven by the software components.

The operating system software is the mainly software component of the computer system, which creates the proper environment to run application software. It also runs the activities the hardware with the connection called the kernel.

Kernels are device drivers that runs the hardware components. The wireless adapter is the hardware that needs the wireless adapter driver to be recognised run by the computer.

1. Write an expression whose value is the result of converting the str value associated with s to an int value. So if s were associated with "41" then the resulting int would be 41.2. Write an expression whose value is the last character in the str associated with s.

3. Given variables first and last, each of which is associated with a str, representing a first and a last name, respectively. Write an expression whose value is a str that is a full name of the form "Last, First". So, if first were associated with "alan" and last with "turing", then your expression would be "Turing,Alan". (Note the capitalization! Note: no spaces!) And if first and last were "Florean" and "fortescue" respectively, then your expression’s value would be "Fortescue,Florean".

4. Write an expression whose value is the result of converting the int value associated with x to a str. So if 582 was the int associated with x you would be converting it to the str "582".

5. Write an expression whose value is the str consisting of all the characters (starting with the sixth) of the str associated with s.

Answers

Answer:

The solution or expression for each part is given below:

int(s) s[len(s)-1] last.capitalize()+','+first.capitalize()str(x)s[5:]

Explanation:

Following are attached the images that show how these expressions will be used. I hope they will make the concept clear.

All the images below are respective to the questions given.

Explain why deploying software as a service can reduce the IT support costs for a company. What additional costs might arise if this deployment model is used?

Answers

Answer:

It reduces the cost of multiple subscription, but the cost of management is applied.

Explanation:

Cloud computing is the use of online resources like storage infrastructure available on database servers to hold company resources on a central level. There are various platforms available in adopting cloud services and they are SaaS or software as a service, PaaS, or platform as a service, IaaS or infrastructure as a service etc.

SaaS is a cloud computing services where software applications are made centrally available for an organisation. It reduces the cost of purchasing multiple activation keys for software traditionally installed. But it requires a skilled personnel and annual or monthly subscription, which when added together, might spike the cost of deployment.

What policy definition defines the standards, procedures, and guidelines for how employees are to be granted and authorized access to internal IT resources through the public Internet?

Answers

Answer:

Explanation:

Regularly in a company the senior management establish the policy and standards about the network and the employees, we can find different kind of these standards, for example:

Policies

RegulatoryAdvisoryInformative

Security policies

OrganizationalIssue-specificSystem-specific

Standards

Actions or rulesSupportInternal or external

In C#Write the program SubscriptExceptionTest in which you use an array of 10 doubles. Write a try block in which you place a loop that prompts the user for a subscript value and displays the value stored in the corresponding array position or asks the user to quit the program by entering 99. Create a catch block that catches any IndexOutOfRangeException and displays the message: Index was outside the bounds of the array.

Answers

Answer:

using System;

namespace ConsoleApp3

{

   class Program

   {

       static void Main(string[] args)

       {

           double[] doubleArray = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 };

           Console.WriteLine("Double Array values are:");

           foreach (var b in doubleArray)

           {

               Console.WriteLine(b);

           }

           Console.WriteLine("Enter value to find position in Array");

           var input = Console.ReadLine();

           var value = Convert.ToDouble(input);

           if (value == 99.0)

           {

               Environment.Exit(0);

           }

           try

           {

               var index = Array.IndexOf(doubleArray, value);

               if (index == -1)

               {

                   Console.WriteLine("Index was outside the bounds of the array");

                   Console.ReadLine();

               }

               else

               {

                   Console.WriteLine("Position in Array is:" + index);

                   Console.ReadLine();

               }

           }

           catch (Exception e)

           {

               Console.WriteLine("Index was outside the bounds of the array");

               Console.ReadLine();

           }

       }

   }

}

Explanation:

this is the code of console program which initialize the double array from 1-10 and displays the existing values of array in console.

Then it will take input from user, convert it to double and find the value position in double array.

if 99, then program will be exist

if exist in array:display the index position

else:index was outside the bounds of the array in try catch block.

Implement the function calcWordFrequencies() that uses a single prompt to read a list of words (separated by spaces). Then, the function outputs those words and their frequencies to the console.

Ex: If the prompt input is:

hey hi Mark hi mark
the console output is:

hey 1
hi 2
Mark 1
hi 2
mark 1

Answers

Final answer:

The function calcWordFrequencies prompts for input, splits the input into words, counts their occurrences using an object, and logs each word along with its frequency to the console.

Explanation:

To implement the function calcWordFrequencies that reads a list of words separated by spaces and outputs their frequencies, you can use a programming language like JavaScript. The function will prompt the user for input, then split the input string by spaces to get an array of words. After that, the function will count the occurrences of each word using an object to store the frequencies, and finally, it will log the words and their respective frequencies to the console.

Here is an example of how this function might look:

function calcWordFrequencies() {
 var input = prompt('Enter a list of words separated by spaces:');
 var words = input.split(' ');
 var frequencies = {};
 for (var i = 0; i < words.length; i++) {
   var word = words[i].toLowerCase();
   frequencies[word] = (frequencies[word] || 0) + 1;
 }
 for (var word in frequencies) {
   console.log(word + ' ' + frequencies[word]);
 }
}
Note: The example above converts all words to lowercase to count 'Mark' and 'mark' as two occurrences of the same word. You can remove the toLowerCase call if you want to distinguish between capitalized and lowercase words.

Final answer:

To count word frequencies in Python, use the input() function to collect user input, split the input into words, use a dictionary to track frequencies, then iterate and print each word with its frequency.

Explanation:

To implement the function calcWordFrequencies that reads a list of words from the user and outputs the frequency of each word, you can follow these steps in Python:

Use the input() function to prompt the user to enter a list of words separated by spaces.Create an empty dictionary to keep track of word frequencies.Split the input string into words using the split() method.Iterate over the list of words and for each word: If the word is already in the dictionary, increment its frequency.If the word is not in the dictionary, add it with a frequency of 1.Iterate over the dictionary and print each word along with its frequency.

Here is an example code snippet that demonstrates these steps:

def calcWordFrequencies():
   text_input = input("Enter words separated by spaces: ")
   frequencies = {}
   for word in text_input.split():
       if word in frequencies:
           frequencies[word] += 1
       else:
           frequencies[word] = 1
   for word, frequency in frequencies.items():
       print(word, frequency)
calcWordFrequencies()
This function will output the frequency of each word entered by the user, satisfying the prompt's requirement.

Load the titanic sample dataset from the Seaborn library into Python using a Pandas dataframe, and visualize the dataset. Create a distribution plot (histogram) of survival conditional on age and gender

Answers

Answer:

Following is given the data as required.

The images for histograms for age and gender are also attached below.

I hope it will help you!

Explanation:

Other Questions
Which number completes the inequality? Two-thirds less-than blank less-than StartFraction 7 over 9 EndFraction Three-fifths StartFraction 6 Over 9 EndFraction Three-fourths StartFraction 6 Over 7 EndFraction Find the value of c such that the equation x^2 - c = 0 has 12 and 12 as solutions. When a liquid evaporates - does it take energy from its surroundings or does it give off energy to its surroundings? For KNO3 the heat of solution is 23.8 kJ/mol and the lattice energy is -685.0 kJ/mol. Calculate the heat of hydration. 3.148.78.714.7 Round to the nearest hundreds The idea that the meaning and value of work is whatever the workers determine that it is simply doesn't challenge in any significant way Bowie's contention that employers have an obligation to provide meaningful work.A.TrueB.False Positive-sequence components consist of three phasors with _____ magnitudes and _____ phase displacement in positive sequence; negativesequence components consist of three phasors with _____ magnitudes and _____ phase displacement in negative sequence; and zero-sequence components consist of three phasors with _____ magnitudes and _____ phase displacement. A rectangular field measures 6.0 m by 8.0 m. What is the area of the field in square centimeters (cm 2 )? Use the formula: Area = length width.A: 4.8 10 4 cm 2B: 4.8 10 5 cm 2C: 4.8 10 3 cm 2 A swimming pool, 10.0 m by 4.0 m is filled to a depth of 3.0 m with water at a temperature of 20.0 degrees Celsius. How much energy is required to raise the temperature of the water to 30.0 degrees Celsius. In muscles, ATP is generated by glycolysis from two sources of glucose. One source is glucose that is broken down from glycogen stored in the muscles, and the other is from glucose that is taken up from the blood. Which of the following statements is true? A) A net 3 ATPs are generated per glucose from glycogen instead of a net of 2 ATPs from glucose taken up from the blood B) a net 2 ATPs are always generated per glucose regardless of its source C) glycogen is broken-down into UDP-glucose D) glucose only comes from glycogen (1,4) links and not (1,6) branches E) none of the above What impact have nuclear weapons had on the world? In what ways have they made the world more dangerous? How have they helped to create peace? Whereas the American system of government is characterized by federalism, most nations are governed by __________. The major function of the cell wall is to Choose one: A. serve as a barrier to prevent entry of molecules into the cytoplasm. B. constrain bacterial cell growth. C. serve as a rigid barrier to prevent cell lysis. D. allow for bacterial motility. A mother is three times as old as her son, and in 11 years she will be just twice his age. Find their present ages An important part of employee compensation is a benefits package, which might include health insurance, life insurance, child care, vacation days, retirement plan, parental leave, bonuses, etc. Suppose you want to conduct a survey of benefits packages available in private businesses in Hawaii. You want a sample size of 100. Some sampling techniques are described below. Categorize each technique as simple random sample, stratified sample, systematic sample, cluster sample, or convenience sample.(a) Assign each business in the Island Business Directory a number, and then use a random-number table to select the businesses to be included in the sample.simple random (b) Use postal ZIP Codes to divide the state into regions. Pick a random sample of 10 ZIP Code areas and then include all the businesses in each selected ZIP Code area.(c) Send a team of five research assistants to Bishop Street in downtown Honolulu. Let each assistant select a block or building and interview an employee from each business found. Each researcher can have the rest of the day off after getting responses from 20 different businesses. What effect did the Columbian Exchange have on Europes population A group of 86 people consist of men women and children. There are twice as many women then there are men. There are 6 more children than there are women. How many men women and children in group a 150 kg roller coaster is released from rest at the top of a 50 m hill. how fast will it be going if the second hill is 10 m high? You are designing a wall Mural that will be composed of squares of different sizes. One of the requirements of your design is that the side length of each square itself is a perfect square. If you represent the side length of the square as x to the power of 2 write an expression for the area of the mural square. what had happened to the Federalist Party by the time James Monroe became president