Suppose that the following two classes have been declared public class Car f public void m1) System.out.println("car 1"; public void m2) System.out.println("car 2"); public String toString) f return "vroom"; public class Truck extends Car public void m1) t System.out.println("truck 1"); public void m2) t super.m1); public String toString) t return super.toString) super.toString ); Write a class MonsterTruck whose methods have the behavior below. Don't just print/return the output; whenever possible, use inheritance to reuse behavior from the superclass Methog Output/Return monster 1 truck1 car 1 m2 toString "monster vroomvroom'" Type your solution here:

Answers

Answer 1

Answer: provided in the explanation section

Explanation:

// code to copy

Car.java

public class Car {

 

  public void m1()

  {

  System.out.println("car 1");

}

 

  public void m2() {

      System.out.println("car 2");

}

 

  public String toString()

  {

  return "vroom";

}

 

}

Truck.java

public class Truck extends Car{

 

  public void m1()

  {

  System.out.println("truck 1");

  }

 

  public void m2()

  {

  super.m1();

  }

 

  public String toString()

  {

      return super.toString() + super.toString();

  }

}

MonsterTruck​​​​​​​.java

public class MonsterTruck extends Truck

{

  public void m1() {

System.out.println("monster 1");

}

 

public void m2() {

super.m1();

super.m2();

}

 

public String toString() {

return "monster " + super.toString();

}

public static void main(String[] args) {

  MonsterTruck mt=new MonsterTruck();

  mt.m1();

  mt.m2();

  System.out.println(mt);

}

}

cheers i hope this helped !!!


Related Questions

Write a C++ program to find if a given array of integers is sorted in a descending order. The program should print "SORTED" if the array is sorted in a descending order and "UNSORTED" otherwise. Keep in mind that the program should print "SORTED" or "UNSORTED" only once.

Answers

Answer:

The cpp program for the given scenario is as follows.

#include <iostream>

#include <iterator>

using namespace std;

int main()

{

   //boolean variable declared and initialized  

   bool sorted=true;

   //integer array declared and initialized

   int arr[] = {1, 2, 3, 4, 5};

   //integer variables declared and initialized to length of the array, arr

   int len = std::end(arr) - std::begin(arr);

       //array tested for being sorted

    for(int idx=0; idx<len-1; idx++)

    {

        if(arr[idx] < arr[idx+1])

           {

               sorted=false;

            break;

           }

    }

    //message displayed  

    if(sorted == false)

     cout<< "UNSORTED" <<endl;

 else

    cout<< "UNSORTED" <<endl;

return 0;

}

OUTPUT

UNSORTED

Explanation:

1. An integer array, arr, is declared and initialized as shown.

int arr[] = {1, 2, 3, 4, 5};

2. An integer variable, len, is declared and initialized to the size of the array created above.

int len = std::end(arr) - std::begin(arr);

3. A Boolean variable, sorted, is declared and initialized to true.

bool sorted=true;  

4. All the variables and array are declared inside main().

5. Inside for loop, the array, arr, is tested for being sorted or unsorted.  The for loop executes over an integer variable, idx, which ranges from 0 till the length of the array, arr.

6. The array is assumed to be sorted if all the elements of the array are in descending order.

7. If the elements of the array are in ascending order, the Boolean variable, sorted, is assigned the value false and for loop is exited using break keyword. The testing is done using if statement.

8. Based on the value of the Boolean variable, sorted, a message is displayed to the user.

9. The program can be tested for any size of the array and for any order of the elements, ascending or descending. The program can also be tested for array of other numeric data type including float and double.

10. All the code is written inside the main().

11. The length of the array is found using begin() and end() methods as shown previously. For this, the iterator header file is included in the program.

A(n) ________ is a server-based operating system oriented to computer networking and may include directory services, network management, network monitoring, network policies, user group management, network security, and other network-related functions.

Answers

Answer:

Network Operating System (NOS)

Explanation:

A network operating system (NOS) is an operating system that makes different computer devices connect to a common network in order to communicate and share resources with each other using a server. A network operating system can be used by printers, computers, file sever among others, and they are connected together using a local area network. This local area network which they are connected to works as the server.

The NOS also acts as a network security because it could be used as an access control or even user authentication.

There are two types of NOS

1) Peer to peer network operating system.

2) Client/server network operating system

A network operating system (NOS) is a server-based operating system oriented to computer networking and may include directory services, network management, network monitoring, network policies, user group management, network security, and other network-related functions.

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

In this assignment, you will develop a C++ program and a flowchart that calculates a cost to replace all tablets and desktop computers in a business. Customers paying cash get a ten percent discount applied to the total cost of the computers (desktop and tablets). Customers financing the purchase incur a fifteen percent finance charge based on the total cost of the computers (desktop and tablets). Tablets costs $320.00 each and desktops costs $800.00 each. The tax is 75% (.075).

Requirements:
⦁ Use the following variables of the appropriate type: name of company selling the computers, the cost per each type of computer, number of computers to be purchased, discount if paying cash, sales tax rate. Tablets =$320 each and desktop computers = $800.00 each. Sales Tax Rate = .075, Discount Percent = .10, and Finance Charge = .15.
⦁ Variable names must be descriptive.
⦁ Use additional variables to hold subtotals and totals.
⦁ For customers paying cash, the discount should be subtracted from the total computer cost.
⦁ For customers financing the purchase, the finance charge should be added to the total computer cost.
⦁ The body of your program must use variables only; there should not be any "hard coded" values in the output statements. An example of hardcoding is
***Cost of tablets = 4 * 320****.
⦁ Use cout to output the values of the variables to the console. Your cout statement MUST use the variables to display the values
⦁ Display the cost of the computers, tax and average cost per computer. The average cost will be the total cost divided by the number of computers purchased. Display the discount if the customer decides to pay cash or the finance charge if the customer finances the purchase.
⦁ Output must be labelled and easy to read as shown in the sample output below.
⦁ Program must be documented with the following:
⦁ // Name
⦁ // Date
⦁ // Program Name
⦁ // Description
⦁ Develop a flowchart

Hints:
Total cost of computers = cost per tablet * number of tablets purchased + cost per desktop * number of desktops purchased
Calculate the cost if paying cash or financing
Calculate the tax
Average cost per computer = Total computer cost divided by the number of computers purchased

Answers

Answer:

Explanation:

The objective of this program we are to develop is to compute a C++ program and a flowchart that calculates a cost to replace all tablets and desktop computers in a business.

C++ Program

#include<iostream>

#include<iomanip>

using namespace std;

/*

⦁ // Name:

⦁ // Date:

⦁ // Program Name:

⦁ // Description:

*/

int main()

{

const double SalesTaxRate = .075, DiscountPercent = .10, FinanceCharge = .15;

const double TABLET = 320.00, DESKTOP = 800.00;

double total = 0.0, subTotal = 0.0,avg=0.0;

int numberOfTablets, numberOfDesktop;

cout << "-------------- Welcome to Computer Selling Company ------------------ ";

cout << "Enter number of tablets: ";

cin >> numberOfTablets;

cout << "Enter number of desktops: ";

cin >> numberOfDesktop;

subTotal = TABLET * numberOfTablets + numberOfDesktop * DESKTOP;

char choice;

cout << "Paying cash or financing: (c/f): ";

cin >> choice;

cout << fixed << setprecision(2);

if (choice == 'c' || choice == 'C')

{

cout << "You have choosen paying cash." << endl;

total = subTotal - subTotal * DiscountPercent;

cout << "Discount you get $" << subTotal * DiscountPercent<<endl;

cout << "Sales Tax: $" << SalesTaxRate * total << endl;

total = total + total * SalesTaxRate;

cout << "Total computers' Cost: $" << total << endl;

avg = total / (numberOfDesktop + numberOfTablets);

cout << "Average computer cost: $ " << avg << endl;

}

else if (choice == 'f' || choice == 'F')

{

cout << "You have choosen Finance option." << endl;

total = subTotal + subTotal * FinanceCharge;

cout << "Finance Charge $" << subTotal * FinanceCharge << endl;

cout << "Sales Tax: $" << SalesTaxRate * total << endl;

total = total + total * SalesTaxRate;

cout << "Total computers' Cost: $" << total << endl;

avg = total / (numberOfDesktop + numberOfTablets);

cout << "Average computer cost: $ " << avg << endl;

}

else

{

cout << "Wrong choice.......Existing.... ";

system("pause");

}

//to hold the output screen

system("pause");

} }

OUTPUT:

The Output of the program is shown in the first data file attached below:

FLOWCHART:

See the second diagram attached for the designed flowchart.

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)

A number of LC-3 instructions have an "evaluate address" step in the instruction cycle, in which a 16-bit address is constructed and written to the Memory Address Register via the MARMUX. List all LC-3 instructions that write to the MAR during the evaluate address phase of the instruction cycle, with the Register Transfer description of each.

Answers

Answer: you want to list all LC structers

Explanation:

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

Your computer is once again out of hard drive and you want to see which folders are consuming the most space on your drive. Which application below will do this? A. CClreaner B. Treesize C MalwareBytes D. Auslogics Disk Defrag

Answers

Answer:

I would say cclrearner

Explanation:

This is what helped me with my computer so it may help you but try which one works for you

What is an accessory?
A.a security setting that controls the programs children can use
B.a tool that provides proof of identity in a computing environment
C.a set of programs and applications that help users with basic tasks
D.a set of gadgets and widgets that makes it easier to create shortcuts

Answers

Answer:

C

Explanation:

Accessories are in Microsoft windows, a set of programs and applications that help users with some basic tasks

How are a members details be checked and verified when they return to log back in to the website ?

Answers

Answer:

When you sign into a website, you have to enter a password and username most of the time, which will allow the website to know that you have checked in and it is you, who is using your account.

A small publishing company that you work for would like to develop a database that keeps track of the contracts that authors and publishers sign before starting a book. What fields do you anticipate needing for this database

Answers

Answer:

The database can include the fields related to the Author such as name and address, related to Publisher such as publisher's name and address, related to book such as title and ISBN of the book and related to contract such as payment schedule, contract start and end.

Explanation:

The following fields can be needed for this database:

Author First_NameAuthor's Last_NameAuthors_addressPublisher_namePublisher_addressBook_titleBook ISBNcontract date : this can be start_date (for starting of contract) and end_date ( when the contract ends) payment_made: for payment schedule.

Write a short assembly language program in either our 8088 SCO DOSBox or 80386+ MASM Visual Studio 2017 environment that demonstrates data storage and retrieval from memory. As an example consider some value which is either 16 or 32 bits, after instantiating as an immediate value transfer to and retrieve from memory using assembly language instructions.

Answers

Answer: provided in the explanation section

Explanation:

The question says:

Write a short assembly language program in either our 8088 SCO DOSBox or 80386+ MASM Visual Studio 2017 environment that demonstrates data storage and retrieval from memory. As an example consider some value which is either 16 or 32 bits, after instantiating as an immediate value transfer to and retrieve from memory using assembly language instructions.

The Answer:

multi-segment executable file template. data segment ; add your data here! pkey db "press any key...$" ends stack segment dw 128 dup(0) ends code segment start: ; set segment registers: mov ax, data mov ds, ax mov es, ax ; add your code here mov cx,4 input: mov ah,1 int 21h push ax loop input mov dx,13d mov ah,2 int 21h mov dx,10d mov ah,2 int 21h mov cx,4 output: pop bx mov dl,bl mov ah,2 int 21h loop output exit: lea dx, pkey mov ah, 9 int 21h ; output string at ds:dx ; wait for any key....

mov ah, 1 int 21h mov ax, 4c00h ; exit to operating system. int 21h ends end start ;

set entry point and stop the assembler.

Cheers I hope this helps!!!

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

Find the given attachments

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.

For this assignment, you will create flowchart using Flow gorithm 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 billAn 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 messageFederal, 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 while the flowchart is attached.

Explanation:

The pseudocode is as follows

input customer name, number of texts  

Set Basic bill=5 $;

if the number of texts is less than or equal to 60

Extra Charge=0;

If the number of texts is greater than 60 and less than 200

number of texts b/w 60 and 200 =number of texts-60;

Extra Charge=0.1*(number of texts b/w 60 and 200);

else If the number of texts is greater than 200

number of texts beyond 200 =number of texts-200;

Extra Charge=0.25*(number of texts beyond 200)+0.1*(200-60);

Display Customer Name

Total Bill=Basic bill+Extra Charge;

Total Bill after Tax=Total Bill*1.12;

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.

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

Output values below an amount
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value.
Ex: If the input is 5 50 60 140 200 75 100, the output is:
For coding simplicity, follow every output value by a space, including the last one.
Such functionality is common on sites like Amazon, where a user can filter results.
LAB
ACTIVITY
8.3.1: LAB: Output values below an amount
0 / 10
Submission Instructions
These are the files to get you started.
main.cpp
Download these files
Compile command
g++ main.cpp -Wall -o a.out
We will use this command to compile your code

Answers

Answer:

def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):

  for value in user_values:

      if value < upper_threshold:

          print(value)  

def get_user_values():

  n = int(input())

  lst = []

  for i in range(n):

      lst.append(int(input()))

  return lst  

if __name__ == '__main__':

  userValues = get_user_values()

  upperThreshold = int(input())

  output_ints_less_than_or_equal_to_threshold(userValues, upperThreshold)

Explanation:

The degree of a point in a triangulation is the number of edges incident to it. Give an example of a set of n points in the plane such that, no matter how the set is triangulated, there is always a point whose degree is n−1.

Answers

Answer:

squarepentagon

Explanation:

The vertices of a square is one such set of points. Either diagonal will bring the degree of the points involved to 3 = 4-1.

The vertices of a regular pentagon is another such set of points. After joining the points in a convex hull, any interior connection will create a triangle and a quadrilateral. The diagonal of the quadrilateral will bring the degree of at least one of the points to 4 = 5-1.

Suppose you have 9 coins and one of them is heavier than others. Other 8 coins weight equally. You are also given a balance. Develop and algorithm to determine the heavy coin using only two measurements with the help of the balance. Clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms

Answers

Answer:

Following are the algorithm to this question:

Find_Heavier_Coins(Coin[9]):

   i) Let Coin[] Array represent all Coins.  

   ii) Divide coin[] into 3 parallel bundles and each has three coins, example 0-2, 3-5, 6-8 indicate a1 a2 a3

   iii) Randomly select any two bundles and place them in balance [say a1 and a2]

   iv) If Weigh of a1 and a2 has same:

           // checking that if a3 has heavier coin

           Choose any two 6-8 coins and place them onto balance [say 6 and 8]

           If those who weigh has the same weight:

               Third coin is coin heavier [say 7]

           else:  

               The coin [6 or 8] is the one which is heavier on the balance

       else:

           //The coin has the package which would be heavier on the balance [say a1]

           Select any two coins on balance from of the heavier package [say 0 and 1]

   If they weigh the same weight:

       Third coin is coin heavier [say 2]

   else:

       The coin that is heavier on the balance is the [or 0]

Explanation:

In the above-given algorithm code, a method Find_Heavier_Coins is declared which passes a coin[] array variable in its parameters. In the next step, if conditional block is used that checks the values which can be described as follows:

In the first, if block is used that checks a1 and a2 values and uses another if block in this it will print a3 value, else it will print 6 to 8 value. In the another, if the block it will check  third coins value and prints its value if it is not correct it will print first coin value

Programming CRe-type the code and fix any errors. The code should convert non-positive numbers to 1.
if (userNum > 0)
printf("Positive.\n");
else
printf("Non-positive, converting to 1.\n");
user Num = 1;
printf("Final: %d\n", userNum);
1 #include Hem
int main(void) {
int userNum;
scanf("%d", &userNum);
return 0;

Answers

Answer:

Given

The above lines of code

Required

Rearrange.

The code is re-arrange d as follows;.

#include<iostream>

int main()

{

int userNum;

scanf("%d", &userNum);

if (userNum > 0)

{

printf("Positive.\n");

}

else

{

printf("Non-positive, converting to 1.\n");

userNum = 1;

printf("Final: %d\n", userNum);

}

return 0;

}

When rearranging lines of codes. one has to be mindful of the programming language, the syntax of the language and control structures in the code;

One should take note of the variable declarations and usage

See attachment for .cpp file

The following are reasons why many organizations are trying to reduce and right-size their information foot-print by using data governance techniques like data cleansing and de-duplication:
A. None of the above
B. reduce risk of systems failures due to overloading
C. improve data quality and reduce redundancies, reduce increased and staggering storage management costs,
D. Both A and B

Answers

Answer:

C. improve data quality and reduce redundancies, reduce increased and staggering storage management costs

Explanation:

Excess data retention can lead to retention of redundant and irrelevant data, which can reduce data handling and processing efficiency, while at the same time increasing the cost of data storage and management. This can be curbed be reducing data to the right size by using data governance techniques like data cleansing and de-duplication

Python high school assignment: please keep simpleIn pythonInstructionsUse the following initializer list:w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]Write a loop that prints the words in uppercase letters.Sample RunALGORITHMLOGICFILTERSOFTWARENETWORKPARAMETERSANALYZEALGORITHMFUNCTIONALITYVIRUSES

Answers

Answer:

w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

for i in range (len(w)):

   print(w[i].upper())

Explanation:

every element needs to be upper cased

A loop that prints the words in uppercase letters is written below with the help of Python.

What is a function?

Simply said, a function is a "chunk" of code that you may reuse repeatedly so instead of having to write it out several times. Software developers can divide an issue into smaller, more manageable parts, which can each carry out a specific task, using functions.

A function, according to a technical definition, is a relationship between an amount of parameters and a set of potential outputs, where every other input is connected to precisely one output.

All the functions are to be written in uppercase:

w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

for i in range (len(w)):

  print(w[i].upper())

Learn more about function, Here:

https://brainly.com/question/29050409

#SPJ5

Write a program that keeps track of where cars are located in a parking garage to estimate the time to retrieve a car when the garage is full. This program will demonstrate the following:_________.
How to create a list for use as a stack,
How to enter and change data in a stack.

Answers

Answer: Provided in the explanation section

Explanation:

Code to use;

# Define the main() function.

def main():

   # Declare the required variables.

   stack_cars = []

   move_time = 1

   retrieve_time = 2

   # Start the loop to display the menu.

   while True:

       # Display the choices to the user.

       print("\n\t\t\t Car Stack Menu")

       print("\n1. Add a car")

       print("2. Retrieve a car")

       print("3. Show the car stack")

       print("4. Exit")

       # Prompt the user to enter the input.

       choice = input("\nEnter your choice: ")

       # Append the car in the stack if the choice is 1.

       if choice == '1':

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

           stack_cars.append(car)

       

       # Remove the car from the stack if the choice is 2.

       elif choice == '2':

           car = input("Enter the car name to retrieve: ")

           # Display the error message if the car is not present.

           if car not in stack_cars:

               print(car + " is not present in the stack.")

           # Otherwise, compute the time to retrieve a car.

           else:

               # Declare a temp stack to move the cars.

               temp = []

               x = stack_cars.pop()

               count = 0

               # Start the loop to pop the cars from the stack

               # until the car to be retrieved is found.

               while x != car:

                   count += 1

                   # Store the car in the temp stack.

                   temp.append(x)

                   x = stack_cars.pop()

               # Start the loop to move the cars back in the

               # original stack.

               while len(temp) != 0:

                   stack_cars.append(temp.pop())

               # Compute and display the total time.

               total_time = move_time * count + retrieve_time

               print("Total time to retrieve", car, "=", total_time)

       

       # Display the stack if the choice is 3.

       elif choice == '3':

           print("Car stack =", stack_cars)

       # Return from the funtion if the choice is 4.

       elif choice == '4':

           print("Exiting from the program...")

           return

       

       # Display the message for invalid input.

       else:

           print("Error: Invalid choice!")

# Call the main() function.

if __name__ == "__main__":

   main()

Which of the following meanings of the plus sign, +, are built-in to the language (and/or standard libraries or classes that we have been using with the language)?
A. Numeric subtraction
B. Numeric addition
C. string concatenation
D. The logical "or" operation

Answers

Answer:

Numeric Addition

Explanation:

Literally, the + sign is an arithmetic operator used to perform addition operation between numeric datatypes (integer, float, decimal, double, long integer, etc...)

Its default built in function of the plus is sign is to add variables, constants and/or expressions.

The plus sign is used as follows;

a = 5;

b = 3;

c = a + b

-------------

a + b = 5 + 3 = 8

8 will be saved in variable c. This is only possible using the plus sign.

The plus sign also has other function such as string concatenation but this function is language dependent (i.e. some programming languages do not use + for string concatenation).

Conclusively, the built in function of the plus sign is for numeric addition

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 are a network technician for a small corporate network that supports 1000 Mbps (Gigabit) Ethernet. The manager in the Executive Office says that his network connection has gone down frequently over the past few days. He replaced his Ethernet cable, but the connection problem has continued. Now his network connection is either down or very slow at all times. He wants you to install a new 1000 Mbps Ethernet network card in his workstation to see if that solves the problem.
If the new card does not resolve the issue, you will need to perform troubleshooting tasks to find the cause of the issue and confirm that the problem is fixed after you implement a solution. Following are some troubleshooting tasks you can try:
• Use the Network and Sharing Center and the ipconfig command on the Exec workstation to check for a network connection or an IP address.
• Look at the adapter settings to see the status of the Ethernet connection.
• Use the ping command to see if the workstation can communicate with the server in the Networking Closet. (See the exhibit for the IP address.)
• View the network activity lights for all networking devices to check for dead connections. In this lab, your task is to complete the following:
1. Install a new Ethernet adapter in one of the open slots in the Exec workstation per the manager's request.
2. Make sure that the new adapter is connected to the wall outlet with a cable that supports Gigabit Ethernet.
3. Resolve any other issues you find using the known good spare components on the Shelf to fix the problem and restore the manager's internet connection.
After you replace the network adapter and resolve the issues you found while troubleshooting, use the Network and Sharing Center to confirm that the workstation is connected to the network and the internet
If necessary, click Exhibits to see the network diagram and network wiring schematics.

Answers

Answer:

The step by step explanation

Explanation:

Before doing anything, the first thing to do is to select the 100BaseTX network adapter and reconnect the Cat5e cable. The 100BaseTX network adapter supports Fast

Ethernet which is all that is required.

Now do the following steps:

Step one

In Office 2, switch to the motherboard view of the computer (turning off the workstation as necessary).

Step two

On the Shelf, expand the Network Adapters category.

Step three

Identify the network adapter that supports Fast Ethernet 100BaseTX. Drag the network adapter from the Shelf to a

free PCI slot on the computer.

Step four

To connect the computer to the network, switch to the back view of the computer.

Step five

Drag the Cat5 cable connector from the motherboard's NIC to the port of the 100BaseTX network adapter.

Step six

To verify the connection to the local network and the Internet, switch to the front view of the computer.

Step seven

Click the power button on the computer case.

Step eight

After the workstation's operating system is loaded, click the networking icon in the notification area and click

Open Network and Sharing Center. The diagram should indicate an active connection to the network and the

Internet.

For one to be able to confirm the speed of the connection, it can be done by clicking the Local Area Connection link in the Network and

Sharing Center.

Java programing:
Add two more statements to main() to test inputs 3 and -1. Use print statements similar to the existing one (don't use assert)
import java.util.Scanner;
public class UnitTesting {
// Function returns origNum cubed
public static int cubeNum(int origNum) {
return origNum * origNum * origNum;
}
public static void main (String [] args) {
System.out.println("Testing started");
System.out.println("2, expecting 8, got: " + cubeNum(2));
/* Your solution goes here */
System.out.println("Testing completed");
return;
}
}
__________

Answers

Answer:

import java.util.Scanner;

public class UnitTesting {

   // Function returns origNum cubed

   public static int cubeNum(int origNum) {

       return origNum * origNum * origNum;

   }

   public static void main (String [] args) {

       System.out.println("Testing started");

       System.out.println("2, expecting 8, got: " + cubeNum(2));

       System.out.println("3, expecting 27, got: " + cubeNum(3));

       System.out.println("-1, expecting -1, got: " + cubeNum(-1));

       System.out.println("Testing completed");

       return;

   }

}

Explanation:

Added statements are highlighted.

Since the cubeNum function calculates the cube of the given number and we are asked to write two statements to test inputs 3 and -1, pass the parameters 3 and -1 to the function called cubeNum and print the results using print statements

Write a short program in C that will display the following information:
Name : Phones:
email:
Hometown:
High School(s):
Previous colleges:
List college math/CS courses:
What, when, and where was your last math and cs course?
Type(s) of computers that you are confident working on:
Extracurricular activities (jobs, clubs, sports, etc.)
Favorite books, movies, music:
What you plan to do after graduation? (Be as specific as you can.)
Be sure to include all necessary documentation within your code

Answers

Answer:

Explanation:

The objective of this question and what we are meant to do is to compute a short program in C++ that will display the information given in the question.

Let get started!.

C ++ Program Code.

#include <iostream>

#include<string>

using namespace std;

int main()

{

string name,email,hometown,highschool,previousColleges,mathOrCSCource,lastMathOrCSCource,CompType,ExtraCur,FavBook

,planAfterGrad,phone;

//Reading Data

cout<<"Name:";

getline(cin,name);

cout<<"Phone:";

getline(cin,phone);

cout<<"Email:";

getline(cin,email);

cout<<"HomeTown:";

getline(cin,hometown);

cout<<"High School(s):";

getline(cin,highschool);

cout<<"Previous Colleges:";

getline(cin,previousColleges);

cout<<"List of math/CS Cources:";

getline(cin,mathOrCSCource);

cout<<"When,Where and what was your last math or CS course:";

getline(cin,lastMathOrCSCource);

cout<<"Type(s) of computer you are confident working with:";

getline(cin,CompType);

cout<<"ExtraCurricular Activities (job,club,sports,etc.):";

getline(cin,ExtraCur);

cout<<"Favourite books,movies,music:";

getline(cin,FavBook);

cout<<"What you plan to do after Graduation:";

getline(cin,planAfterGrad);

//Printing data

cout<<"--------------------Printing Data---------------------------"<<endl;

cout<<"Name:"<<name<<endl;

cout<<"Phone:"<<phone<<endl;

cout<<"Email:"<<email<<endl;

cout<<"HomeTown:"<<hometown<<endl;

cout<<"High School(s):"<<highschool<<endl;

cout<<"Previous Colleges:"<<previousColleges<<endl;

cout<<"List of math/CS Cources:"<<mathOrCSCource<<endl;

cout<<"When,Where and what was your last math or CS course:"<<lastMathOrCSCource<<endl;

cout<<"Type(s) of computer you are confident working with:"<<CompType<<endl;

cout<<"ExtraCurricular Activities (job,club,sports,etc.):"<<ExtraCur<<endl;

cout<<"Favourite books,movies,music:"<<FavBook<<endl;

cout<<"What you plan to do after Graduation:"<<planAfterGrad<<endl;

return 0;

}

Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula: futureInvestmentValue = investmentAmount * (1 + monthyInterestRate)numberOfYears*12. For example if you enter amount 1000, annual interest rate 3.25%, and number of years 1, the future investment value is 1032.98.NB: Please make sure to use the NumberFormat coding for currency to display your results. (Java Programming)

Answers

Answer:

Following are the code to this question:

import java.util.*; //importing package for user input

public class Main //defining class

{

public static void main(String []ar) //defining main method

{

double investment_amount,interest_rate,future_investment_value; //defining double variables

int years; //defining integer variable

Scanner obx=new Scanner(System.in); //creating Scanner class Object

System.out.print("Enter invest value: "); //print message

investment_amount=obx.nextDouble(); //input value

System.out.print("Enter interest rate: ");//print message

interest_rate=obx.nextDouble();//input value

System.out.print("Enter number of years: ");//print message

years=obx.nextInt();//input value

future_investment_value=investment_amount*Math.pow((1+interest_rate/1200.),years*12); //calculating value by apply formula

System.out.println("you enter amount: $"+investment_amount); //print calculated value

System.out.println("annual interest rate:"+interest_rate+"%");//print calculated value

System.out.printf("Number of years: "+years+" the future investment value is :$%.2f\n",future_investment_value);//print calculated value

}

}

output:

please find the attachment.

Explanation:

Program Description:

In the above-given program, inside the main method, a variable is declared that are investment_amount, interest_rate, future_investment_value, and years, in which only year variable is an integer type and other variables are double types.In the next step, a scanner class object that is "obx" is created, which is used to input value from the user end, in the next line we apply the formula to calculate the future_investment_value.At the last step, we all the input and a calculated value    
Other Questions
What is the most likely reason the author wrote this passage? to show the animals increasing resistance to Napoleon to show that Napoleon will use extreme cruelty to stop a revolt to show that food can be a very powerful motivating force to show that rebelling against authority does not change anything Is this statement true or false? 600 meters = 6 hectometers Help I being asking for help for weeks When did Pangaea begin to break apart? Given g(x)=-5x-4, solve for x when g (x)=1 1. What were the first living things on Earth? The value of x in 3(x+5)=12 8. Nate bought two large pizzas and one small pizza and paid $36. If the difference in cost between a large and small pizza is $5.25, how much does a small pizza cost? I need help with problem ASAP! The following comparative income statement (in thousands of dollars) for the two recent fiscal years was adapted from the annual report of Speedway Motorsports, Inc., owner and operator of several major motor speedways, such as the Atlanta, Texas, and Las Vegas Motor Speedways. 1 Current Year Previous Year 2 Revenues:3 Admissions $116,034.00 $130,239.00 4 Event-related revenue 151,562.00 163,621.00 5 NASCAR broadcasting revenue 192,662.00 185,394.00 6 Other operating revenue 29,902.00 26,951.00 7 Total revenue $490,160.00 $506,205.00 8 Expenses and other:9 Direct expense of events $101,402.00 $106,204.00 10 NASCAR purse and sanction fees 122,950.00 120,146.00 11Other direct expenses 18,908.00 20,352.00 12 General and administrative 183,215.00 241,223.00 13 Total expenses and other $426,475.00 $487,925.00 14 Income from continuing operations $63,685.00 $18,280.00 Required: A. Prepare a comparative income statement for these two years in vertical form, stating each item as a percent of revenues. Enter all amounts as positive numbers. Rounding instructions B. Comment on the significant changes.Prepare a comparative income statement for these two years in vertical form, stating each item as a percent of revenues. Enter all amounts as positive numbers. Rounding instructions Chang knows one side of a triangle is 13 cm. Which set of two sides is possible for the lengths of the other two sides of thistriangle?5 cm and 8 cm6 cm and 7 cm7 cm and 2 cm8 cm and 9 cmSave and ExitNextSubmitMark this and retumI NEED HELP ASAPPP!!!!! 1) Contextualization: Which event brought on the Great Depression and marked the end ofthe prosperity of the 1920's? The FITT principle stands for __________. A. frequency, intensity, time, and type B. fitness, intensity, toughness, and type C. frequency, ideal, time, and toughness D. frequency, ideal, time, and type Please select the best answer from the choices provided. A B C D Local government gets its authority from the government Why was the Cold War tilted as such? convert 3.9cm to hm What was the boys' father's nickname for Sodapop? What are the solutions to the equation? 4x=32-x^2 Please help me asap! What was a goal of French expansion into Asia?O spreading ChristianityO establishing inessesO creating a larger armyO improving technology