In: Computer Science
In one paragraph, please briefly explain why cloud customer should use AWS KMS.
In: Computer Science
Use one sentence to briefly describe the difference between symmetric encryption and asymmetric encryption.
In: Computer Science
Resource Monitor. Windows 10
Uncheck perfmon.exe.
In: Computer Science
C++
// Program Description: This program accepts three 3-letter words and prints out the reverse of each word
A main(. . . ) function and the use of std::cin and std::cout to read in data and write out data
as described below.
Variables to hold the data read in using std::cin and a return statement.
#include <iostream >
int main(int argc, char *argv[]) {
.... your code goes here
}//main
Example usage:
>A01.exe Enter three 3-letter space separated words, then press enter to display the reverse: cat eye fix tac eye xif Enter any key to exit:
In: Computer Science
Python
Problem 4. Estimate pi version 2: write a program that will quickly estimate pi to a precision of 1e-4 using a monte carlo approach. Your program should employ a loop where each iteration produces a new x,y pair. One will then determine whether the x,y pair lies inside or outside the circle. (see below) Since all the points will land within the square shown above but only a fraction will land within the circle, we can estimate pi by relating the area of the quarter circle shown above to the area of the square. As we randomly choose points, we can determine if they fall within the circle or not and form a ratio as shown below: AreaQtrcircle / AreaSqaure = πr 2 / 4r 2 = π / 4 = Points in Circle / All Points, π ≅ 4* Points in Circle / All Points.
Your loop should continue until the absolute value of the difference between the current estimate and the previous estimate is less than 1e-4. The program should output the estimate of pi and the number of iterations (points) needed to reach the desired level of precision. Run your program several times to see if the number of points changes. Note any observations in the comments.
In: Computer Science
(In Java) Implement a Deque in which addFirst(), addLast(), removeFirst(), removeLast(), and getMin() are all in O(1) (amortized). The getMin() method is supposed to find the minimum value in the deque and update after ever add/remove. I tried implementing this with a Deque and LinkedList but wasn't successful, you do not need to use either. Must use the comparator and iterator. The goal is to be as fast as possible, so this includes avoiding any operations that aren't O(1) as much as possible. I used my own testing class. Thanks!
import java.util.*;
public class FMinDeque<T> implements MinDeque<T> {
protected Comparator<? super T> comp;
Deque<T> dq;
protected List<T> min;
T m;
public FMinDeque() {
this(new DefaultComparator<T>());
}
public FMinDeque(Comparator<? super T> comp) {
this.comp = comp;
dq = new ArrayDeque<T>();
min = new LinkedList<T>();
}
public Comparator<? super T> comparator() {
return comp;
}
public void addFirst(T x) {
}
public void addLast(T x) {
}
public T removeFirst() {
return null;
}
public T removeLast() {
return null;
}
public T getMin() {
}
public int size() {
return dq.size();
}
public Iterator<T> iterator() {
return dq.iterator();
}
}
This extends:
import java.util.Comparator;
public interface MinDeque<T> extends Iterable<T>
{
public Comparator<? super T> comparator();
public void addFirst(T x);
public void addLast(T x);
public T removeFirst();
public T removeLast();
public T getMin();
public int size();
And
import java.util.Comparator;
class DefaultComparator<T> implements Comparator<T> {
@SuppressWarnings("unchecked")
public int compare(T a, T b) {
return ((Comparable<T>)a).compareTo(b);
}
}In: Computer Science
Prove or disprove with a counterexample the next claims:
(a) The complement of a decidable language is decidable.
(b) The Kleene star of a Turing-recognizable language is Turing-recognizable.
In: Computer Science
A)Write a C++ program using a while loop for Programming Exercise 5.1 on p. 193.
Turn in a printout of the program and a printout of the results.
Test the program for the two test cases in the book along with a third test case that includes 10 valid numbers (including some negative and some positive).
In: Computer Science
Java
Write a class called Car that contains instance data that represents the make, model, and year of the car.
Define the Car constructor to initialize these values
Include getter and setter methods for all instance data and a toString method that returns a one-line description of the car.
Add a method called isAntique that returns a boolean indicating if the car is an antique (if it is more than 45 years old).
Create a driver class called CarTest, whose main method instantiates and updates several Car objects
Must have two constructors, one accepts nothing and another overloaded constructor that accepts parameters.
Must have accessor and mutator methods for each instance variable, and the toString method
Must test ALL (the two constructors, the accessors, and mutators for each variable and the other methods if there are any) methods explicitly in the driver class’s main method with at least two objects.
Addon:
Create an array of five objects of the class you have created. Use a for loop to display the five objects first. Then test all methods using the objects in the array and finally print out each object using a for loop again.
In: Computer Science
Write a Java program to convert decimal (integer) numbers into their octal number (integer) equivalents. The input to the program will be a single non-negative integer number. If the number is less than or equal to 2097151, convert the number to its octal equivalent.
If the number is larger than 2097151, output the phrase “UNABLE TO CONVERT” and quit the program.
The output of your program will always be a 7-digit octal number with no spaces between any of the digits. Some of the leading digits may be 0.
Use a while loop to solve the problem. Do not use strings.
Sample Program Run
Please enter a number between 0 and 2097151 to convert:
160000
Your integer number 160000 is 0470400 in octal.
Please enter a number between 0 and 2097151 to convert:
5000000
UNABLE TO CONVERT
In: Computer Science
I need to answer the the following questions in Javascript;
------------------------------------------------------------------------------------------------------------------------
3 Buttons to display “Lion”, “Tiger” and “Leopard” in a line and display textfield on next line
When“Cat” button is clicked the following 3 things will perform
Display text field “User clicks Lion”;
Under the text field display a message “Lion is clicked”;
Under the message, a photo of a lion is displayed. other buttons will work in a similar logic.
------------------------------------------------------------------------------------------------------------------------
Display the pictures of following “Lion”, “Tiger” and “Leopard”.
When users click on the “Lion” pic., alert window displays warning “Please do not click me, click the Leopard”.
When users click on the “Tiger” pic, alert window displays warning “Please do not click me, click the Leopard”
When users click on the “Leopard” pic, the leopard will jump over the Lion and Tiger, meaning that in the beginning it shows Lion Tiger Leopard, when users click the Leopard then it becomes Leopard Lion Tiger, and users click the leopard again then it becomes Lion Tiger Leopard, etc.
-----------------------------------------------------------------------------------------------------------------------
In: Computer Science
In Java or C++, implement a stack and a queue using a linkedlist data structure. You may not use any standard Java or C++ libraries.
Assume your data structure only allows Strings. Implement the following operations for the data structure:
Queue: enqueue, dequeue, create, isEmpty (10 points)
Stack: push, pop, create, isEmpty (10 points)
Here is a link to get started on transferring from Java to C++ http://www.horstmann.com/ccj2/ccjapp3.html (Links to an external site.)
Upload a zip file with one implementation for your Stack and one for your Queue, along with any classes required to implement your linkedlist (i.e. nodes for linkedlist). In each file include a test method which shows how you've tested each operation.
In: Computer Science
All Hail Modulus Agustus! The modulus operator is used all the time. Realize that if you “mod” any number by a number “n”, you’ll get back a number between 0 and n-1. For example, “modding” any number by 20 will always give you a number between 0-19. Your job is to design (pseudocode) and implement (source code) a program to sum the total of all digits in an input integer number between 0 and 1000, inclusive. Notice that you need to extract individual digits from the input number using the remainder (modulus) and division mathematical operators. For example, if the input number is 123, the sum of its digits is 6. Document your code and properly label the input prompts and the outputs as shown below. PLEASE DO IN JAVA
In: Computer Science
Case Study 3.2: AT&T The case of the BTC and its successor the American Telegraph and Telephone Company (AT&T) illustrates the business and policy issues associated with telephony service provision. Bell’s contributions as discussed in the Historical Note included perfecting the technologies necessary for transmission of voice using electrical wires. However, these by themselves were not enough to ensure the success of telephony service provision. Bell also created a company which in time would provide a universal telephony service to almost the entire North American market. The BTC (and its successor, AT&T) was greatly successful and grew to become one of the most valuable companies on the New York Stock Exchange. The success of the BTC was based initially on its utilization of Bell’s patented technology, licensing fees and ensuring competitors remained at a disadvantage. In the process BTC successfully defended its patents in courts over a period of some 20 years [1]. As it grew, BTC’s cost advantage allowed it to outperform and acquire competitors one after another: eventually becoming almost the sole provider of telephony services in the United States. Telegraphy and telephony were nascent industries: BTC established an R&D entity, and equipment manufacturing subsidiaries to provide it with the necessary technologies and devices as well as leadership in the field. In particular, Bell Laboratories – the research arm of the company – was the place which attracted many of the brightest mathematicians and scientists of the day. These researchers discovered and formulated principles not only associated with telecommunications but also many other fields as diverse as astronomy and quantum physics. In time Bell Laboratories became a world leading research institute and home to seven Nobel Prize laureates as well many other prestigious award winners. By any measure BTC’s technological endeavor was a great success. BTC’s business dynamics were characterized by the high infrastructure roll-out cost, and network effects. It was soon realized that no market could afford to have more than one operator as it was inefficient to duplicate wiring, and difficult to connect circuits between two operators. This led to the establishment of monopoly operators in different geographic regions, who were then acquired one after another by BTC, resulting in a near-monopoly operation in North America. Indeed, a theory was developed by AT&T president Theodore Vail in 1907, that the telephone, ‘by nature of its technology, would operate most efficiently as a monopoly providing universal service’ [10]. This monopoly control of the market was in conflict with anti-trust laws of the United States, and therefore BTC had to negotiate with the US government to allow it to run a monopoly business despite existing strong anti-trust laws. Over the years several anti-trust suits were launched but BTC continued to operate successfully for over 100 years. Despite all its advantages, BTC–AT&T fell into decline in the mid-1980s and was finally acquired by competitors, a fall which can be attributed to all three technological, business and policy factors. First, on the policy side, monopoly operation and lack of competition may have had a role in AT&T’s reputation for inadequate customer service. In 1974 another anti-trust suit was launched by the US government which resulted in a settlement which broke the monopoly operation that BTC had enjoyed. The company was divided into seven regional telephone operators known as Baby Bells. An eighth company connected these regional companies as a long-distance operator under the name AT&T. While BTC–AT&T had remained successful from the technological and business viewpoints, it had failed to stay with the policy shift and adjust accordingly. AT&T continued to operate profitably as a long-distance operator, carrying calls between regional Baby Bell telephone companies, and later as a mobile telephone operator. However, technological developments in whose development AT&T had played a prominent role led to its own demise. Bell Laboratories had been one of the major contributors to the development of optical fibre systems. These cables have very large capacities and can carry a very large number of simultaneous telephone calls. With the deployment of optical fibre cables in place of copper cables, and the deregulation of operator business, the cost of long-distance telephony dropped, and AT&T's business as a long-distance operator suffered. Mobile telephony was the other technological development which Bell Laboratories had pioneered. The growth of mobile operators and the competitive pressures on AT&T mobile division, in addition to its dubious strategic moves into content provision, finally led to high debt burdens and eventual fall. In effect, the technological break-throughs pioneered by AT&T had been used by its competitors in a more effective way. The ‘AT&T’ brand however was still very valuable and the acquiring companies adopted the name. The policy–business–technology developments of the last decades in the 20th century transformed the industry landscape and led to emergence of new companies. It also signaled the end of arguably the most iconic telecommunications company. Many telephone operators went through the same experience as AT&T. The majority were government-owned, and many have stayed afloat after deregulation. The emergence of mobile and broadband telecommunications has created new revenue streams as the case of Australian operator Telstra demonstrated. Nevertheless, the dynamics of technology, business and policy have been in play in every market, and have been instrumental in the success or failure of operator companies.
Case Study Questions: How did AT&T manage the technology–business–policy framework?
Case Study Question: Why was AT&T broken up?
In: Computer Science