Questions
IN C++ Create a single function. and pass in a integer which is the the planet...

IN C++
Create a single function. and pass in a integer which is the the planet number. 1 will be Mercury and 9 will be Pluto, etc. Return via reference the planet name, planet weight ( or mass ) in kg, and the distance from the sun in km. Please create a nice looking table with headings and show the 9 planets.

Here is an example of the first 4 planets in the table. You will need to add in the next 5.

Planet Planet Planet
Name Mass (kg) Distance
  to the
   Sun (km)

Mercury 3.3e+23 57910
Venus 4.87e+24 108200
Earth 5.98e+24 149600
Mars 6.42e+23 227940

In: Computer Science

Write a C Program to finish the following requirements: Convert a double number to its hexadecimal...

Write a C Program to finish the following requirements: Convert a double number to its hexadecimal form

1. The double number x is located between 0 and 1000(0<=x<=1000),e.g.678.345

2.The double number with the hexadecimal form contains 6 significant digits. e.g." 5D.32FA45".

3.The double number with the hexadecimal form is represented by a string(or a character array), e.g."5D.32FA45".

Please write as simple as possible because I am a freshman in C!

Thanks!

In: Computer Science

8. Suppose you saw a ciphertext stream that you know was encrypted with DES-CBC, and you...

8. Suppose you saw a ciphertext stream that you know was encrypted with DES-CBC, and you observed that C3 = C6 (i.e., the third and sixth output ciphertext blocks were the same). What information does this tell you about the plaintext input?

In: Computer Science

Write a java program to convert a positive integer value to a roman number. Your program...

Write a java program to convert a positive integer value to a roman number. Your program should print a description, prompt them for how many numbers they need to convert and then loop that many times. Each time the program needs to prompt for a number and output the equivalent roman numeral. If the user enters a number less than 1 then output an error message. See sample output below:

****************************************************

* Welcome to the Roman Numeral Converter!          *

* You can use this tool to convert any decimal     *

* value into a Roman Numeral. To get started       *

* please enter the how many decimal numbers you    *

* need to convert.                                 *

****************************************************

How many numbers do you have to convert? 5

Please enter the number that you would like to convert: 58

58 as a Roman Numeral is LVIII

Please enter the number that you would like to convert: 2019

2019 as a Roman Numeral is MMXIX

Please enter the number that you would like to convert: -85

Sorry, but -85 is not a positive number and cannot be converted

Please enter the number that you would like to convert: 7

7 as a Roman Numeral is VII

Please enter the number that you would like to convert: 23

23 as a Roman Numeral is XXIII

Requirements

You must have a helper class RomanHelper with the following methods. It will be up to you to determine the return type and parameters required for each:

  • description: Print the program description to the screen
  • getRoman: Converts an integer to a Roman Numeral. No output to the screen should happen here.

Also, you will need to have a driver class RomanDriver with the following methods:

  • main: Construct a Scanner object and call the runProgram method.
  • runProgram: Prompt the user how many times they would like to run the program and loop that many times calling the getNextNumber method.
  • getNextNumber: Prompt for a number to convert and output the result or an error message if the number isn’t positive.

You may add however many additional methods that you would like.

In: Computer Science

The base station height is 40 m, the carrier wave frequency is 900 MHz, the mobile...

The base station height is 40 m, the carrier wave frequency is 900 MHz, the mobile station height is 2 m, and the communication distance is 15 km.
1.Calculate the path loss in a big city by the Hata model.
2.If the frequency become 1800 MHz, calculate the path loss in the downtown of a big city by the Hata extension model.

In: Computer Science

In a language of your own choosing, write a computer program that implements the Restoring Twos...

In a language of your own choosing, write a computer program that implements the Restoring Twos Complement Division process. In addition to program source code, provide a screenshot showing the tasks below. Use 8 bits for all registers.

  1. Provide an output that shows your input decimal values.
  1. Provide an output that shows the initial values in registers A, Q, and M.
  1. Demonstrate that your program works in the following cases by showing the output in registers A and Q after the final cycle and the final value in 2s complement for negative numbers:
    1. divide two positive numbers with no remainder
    1. divide two positive numbers with a remainder
      1. divide two negative numbers with no remainder
      1. divide two negative numbers with a remainder
      1. divide a positive number by a negative number with a remainder
      1. divide a positive number by a negative number without a remainder
      1. divide a negative number by a positive number with a remainder
      1. divide a negative number by a positive number without a remainder
  1. Show the output of your result in decimal format yRx where y is the integer value and x is the remainder value. e.g. 4R0 would be 4 with a remainder of 0, -4R-2 would be -4 with a remainder of -2.

In: Computer Science

15 .Virtual web hosting can be seen as an early form of the ________ approach to...

15 .Virtual web hosting can be seen as an early form of the ________ approach to cloud computing.

Storage as a Service

Software as a Service

Platform as a Service

Infrastructure as a Service

16. A system virtual machine supports the execution of ________. an

operating system

a single program

(a) Azure provides 6 types of cloud storage.Provide a list of 4 of these storage types?

(b) Briefly describe 2 types of Azure cloud storage?

In: Computer Science

Problem: You will write a program to compute some statistics based on monthly average temperatures for...

Problem:

You will write a program to compute some statistics based on monthly average temperatures for a given month in each of the years 1901 to 2016. The data for the average August temperatures in the US has been downloaded from the Climate Change Knowledge Portal, and placed in a file named “tempAugData.txt”, available on the class website. The file contains a sequence of 116 values. The temperatures are in order, so that the first one is for 1901, the second is for 1902, and so on through 2016.

The statistics you should compute in your program are:

• The average of the monthly average temperatures for the entire time period.

• The number of years that the monthly average reached at least X degrees where X is a value input from the user. These years should also be displayed to the screen.

• The maximum monthly average temperature for the time period and in what year it occurred.

• The minimum monthly average temperature for the time period and in what year it occurred.

Input: Your program should ask the user for the name of the file, and then open that file for input. It should then ask the user for a boundary temperature (the X in the second bullet above) that is used to calculate some of the statistics. Processing: Compute the statistics requested above.

Output: Display the statistics, labeled, and with the temperatures formatted to 1 decimal place. Also output the count of the years above X before outputting the list of the years.

Sample output:

Please enter the name of the temperature data file: tempAugData.txt Please enter the boundary temperature: 68.0

Climate Data statistics: Average temperature: 66.2

Years that averaged at least 68.0 degrees: 7 1936 1995 2003 2007 2010 2011 2016

Maximum average temperature: 68.9 occurred in 2007

Minimum average temperature: 63.9 occurred in 1927

Additional Requirements:

• Your program must compile and run, otherwise you will receive a 0.

• Your program should test for file open errors.

• I recommend temporarily echoing the input from the file to the screen (using cout) to be sure you are reading the input correctly into your array.

• You should have many separate loops in your program. Do not try to compute everything in one single loop.

• For partial credit, implement some subset of the features completely. This will probably lead to a better score than implementing every feature poorly

USING ARRAYS.

In: Computer Science

Password Checking Software to reset passwords often requires the user to enter the password twice, checking...

Password Checking
Software to reset passwords often requires the user to enter the password twice, checking to make sure it was entered the same way both times. Write a program in Python that contains functions/methods in it that can verify that the two passwords entered are correct. Your project should contain a method that asks the user to enter a password twice, then either tell the user that the two entries were not the same and then start the process over again. Or, if they are the same, tell the user that the new password was accepted.

Additionally, the user is required to enter a password that meets specific security requirements. Proper Passwords are required to follow these rules:

  • The password must be at least 12 characters long.
  • The password must contain at least:
    - one alpha character [a-zA-Z];
         - one numeric character [0-9];
         - one character that is not alpha or numeric, such as
                  “! @ $ % ^ & * ( ) - _ = + [ ] ; : ' " , < . > / ?” this is an example, all non-alpha or numeric characters should be included.
  • The password must not:
    - Contain spaces;
        - Or, begin with a non-alpha-numeric character;
  • Finally, the password cannot contain repeating character strings of 2 or more identical characters, such as “11” or “aa”.

Your task is to create a project to verify whether or not a prospective proper password meets these requirements and that the user has entered the correct password in twice. Hint, a modular solution to this assignment will be the most efficient approach to meeting the requirements of this project

The project should identify to the user the types of rule violations that are contained in an improperly entered password

The project should use a modular solution using user-defined functions

In: Computer Science

Q1: Server Design Models: (explain clearly) a. For a multi-threaded server, describe the advantages of adopting...

Q1: Server Design Models: (explain clearly) a. For a multi-threaded server, describe the advantages of adopting the many-to-one threading model. b. For a multi-threaded server, describe the advantages of adopting the one-to-one threading model.

In: Computer Science

Write a C++ code that keeps reading integer numbers (x) until a negative number is entered....

Write a C++ code that keeps reading integer numbers (x) until a negative number is entered. Every time x is entered, the program does the following: calculates and prints the product of odd numbers. calculates and prints the count of numbers that ends with 19. Example, 19, 3219, 50619,....etc calculates and prints the percentage of the numbers that contain 3 digits exactly, such as, 301, 500, 206,...etc.

In: Computer Science

6.2_What is the meaning of the term busy waiting? What other kinds of waiting are there...

6.2_What is the meaning of the term busy waiting? What other kinds of waiting are there in an operating system? Can busy waiting be avoided altogether? Explain your answer.

7.4_Describe how deadlock is possible with the dining-philosophers problem.

Why is it necessary to have an atomic instruction for providing access to a critical section?

In: Computer Science

Describe a scenario in which an access point impersonation attack could be used to steal personal...

Describe a scenario in which an access point impersonation attack could be used to steal personal financial information.

In: Computer Science

Describe in detail the intrusion detection and prevention measures that you will deploy in your organization....

Describe in detail the intrusion detection and prevention measures that you will deploy in your organization. Your discussion should also include the following:

Describe in detail the intrusion detection and prevention measures that you will deploy in your organization. Your discussion should also include the following:

[T3.1] IDS type and why you will need it

[T3.2] IPS type and why you will need it

[T3.3] The proposal of the appropriate positions for IDS/IPS in a network topology in order to increase the security of the environment,

along with providing supportive justifications of the proposed positions.

In: Computer Science

1. Write a queue client, "LineNum," that takes an integer command line argument “n” and prints...

1. Write a queue client, "LineNum," that takes an integer command line argument “n” and prints the nth string from the first string found on standard input. [MO6.2]

Please note that you would need to use a queue to implement it for full credit. You should add the strings inputted by the user to a queue using the enqueue method. Then you should remove and return "n" strings from the queue using the dequeue method. The nth string that is returned by the dequeue method should then be printed out.

  • Sample runs would be as follows.

    >java LineNum 2
    apple
    save
    that
    is
    too
    me
    <CTRL-D>
    2 from the first is save

    >java LineNum 3
    this
    is
    not
    a
    shorter
    version
    <CTRL-D>
    3 from the first is not

This is the code I have, but i keep getting errors.

public class LineNum { // public class LineNum
public static void main(String[] args) { // main method
int n = Integer.parseInt(args[0]); // variable n parses integers from args
Queue<String> queue = new Queue<String>(); // new String queue
//LinkedList<java.lang.String> Dequeue = new LinkedList();
while (!StdIn.isEmpty()) { // while standard input is empty
String item = StdIn.readString();
// String item read string from standard input
if (!item.equals("-")) // if item equal - then ebqueue item
queue.enqueue(item);
else if (!queue.isEmpty()) // otherwise if queue is empty
StdOut.println(queue.dequeue() + " "); // print dequeue + a space
}
  
StdOut.println(queue);
for (int i = 1; i < n; i++) // for loop i=1, <n, increments i
queue.dequeue(); // dequeues element on each loop until i = n
// StdOut.print(queue.size() + " left on queue)");
// StdOut.println("The dequeue contains: " +queue.dequeue() + " ");
StdOut.println(n+ " from the first is " +queue.dequeue());
// Prints number from first and current element in dequeue
  
}
}
these are the errors i'm getting:

\introcs> javac LineNum.java
LineNum.java:5: error: cannot find symbol
queue<String> elements = new LinkedList<>(); // new String queue
^
symbol: class queue
location: class LineNum
LineNum.java:5: error: cannot find symbol
queue<String> elements = new LinkedList<>(); // new String queue
^
symbol: class LinkedList
location: class LineNum
LineNum.java:11: error: cannot find symbol
queue.enqueue(item);
^
symbol: variable queue
location: class LineNum
LineNum.java:12: error: cannot find symbol
else if (!queue.isEmpty()) // otherwise if queue is empty
^
symbol: variable queue
location: class LineNum
LineNum.java:13: error: cannot find symbol
StdOut.println(queue.dequeue() + " "); // print dequeue + a space
^
symbol: variable queue
location: class LineNum
LineNum.java:16: error: cannot find symbol
StdOut.println(queue);
^
symbol: variable queue
location: class LineNum
LineNum.java:18: error: cannot find symbol
queue.dequeue(); // dequeues element on each loop until i = n
^
symbol: variable queue
location: class LineNum
LineNum.java:21: error: cannot find symbol
StdOut.println(n+ " from the first is " +Queue.dequeue());
^
symbol: variable Queue
location: class LineNum
8 errors

In: Computer Science