1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
shepuryov [24]
3 years ago
5

Suppose you have a class Ship, which was written by another programmer who used to work for your employer. Ship is used in sever

al different applications. Ship contains a public method called getBearing() that consults gyroscopes and a compass to determine the direction in which the ship is moving and returns a Location object. You need to refactor the code to use a GPS receiver instead. You should
Computers and Technology
1 answer:
liq [111]3 years ago
7 0

Answer:

Research of the GPS features and the modules and packages needed by the programming language to implement and receive data from a GPS tracker.

Explanation:

The Ship class is a blueprint that holds a data structure of a ship's location in coordinates. The location variable can be changed using the getBearing method and an instance of the ship class can be made several times for different ships in the harbor. This class depicts the power of object-oriented programming.

Refactoring is a concept in software engineering where source codes are modified to achieve code efficiency and speed. All programming language source code should be refactored where needed with the right packages or modules.

You might be interested in
Consider the formula: G=D+(A+C^2)*E/(D+B)^3 Show the order that a processor would follow to calculate G. To do so, break down th
motikmotik

Answer:

1. G=D+(A+C^2)*E/(D+B)^3

cobegin:

p1: (D+B)

p2: p1^3

p3: C^2

p4: A+ p3

p5: E/p2

p6: p4 * p5

p7: D + p6

   :G

coend

2. Now The value A=2, B=4, C=5, D=6, and E=8

p1: 6+4 =10

p2: p1 ^3= 10^3= 1000

p3: c^2= 5^2 =25

p4: A + p3= 2 +25 =27

p5: 8/1000

p6: 27 *8/1000

p7: D+ P6= 6+ 216/1000

      = 6216/1000

      =6.216

Explanation:

The above, first bracket with power is processed, and then power inside and outside bracket. And rest is according to BODMAS, and one process is solved at a time.

4 0
3 years ago
In general, what is the leftmost point of a circle with radius r centered at (x,y)?
Semmy [17]

The answer is (x-r, y).

5 0
3 years ago
What command is used to generate an RSA key pair?
Leokris [45]

Answer:

D) crypto key generate rsa

Explanation:

In cryptography, the RSA refers to Rivest–Shamir–Adleman. This is an algorithm used for encrypting and decrypting messages in computers thereby ensuring secured transmission of data. In order to generate an RSA key pair, you will use the command crypto key generate rsa while in the global configuration mode. This command has the following syntax:

crypto key generate rsa [general-keys| usage-keys| signature| encryption] [<em>labelkey-label</em>] [exportable] [modulus <em>modulus-size</em>] [storage <em>name of device</em>:][redundancy][on <em>name of device</em>:],

with each parameter having its description

5 0
3 years ago
BRAINLIEST FOR CORRECT ANSWERS PLS HELP
koban [17]
Either A or B. I would go with A but It can actually be B
5 0
3 years ago
Read 2 more answers
Program 7 - Circle You write ALL the code, then run it - Produce the correct output. Turn in code and screen print of successful
fgiga [73]

Answer:

Here is the Circle class:

public class Circle {   // class definition

private int radius;    // private data member of type int of class Circle named radius that stores the value of radius

public Circle(int r) {   // parameterized constructor of class Circle that takes radius as argument

 radius = r;  }    // sets value of radius as r

public int getRadius() {   // accessor method to get the value of radius

 return radius;  }   // returns the current value of radius

public int Diameter() {   // method to compute diameter of a circle

 return radius * 2;  }   // multiply radius value by 2 to compute diameter of Circle

 

public double Area() {   // method to compute area of a circle

 return Math.PI  * Math.pow(radius, 2);   }   //the formula of area is

π x radius² where value of π is get using Math.PI

 

 public double Circumference() {   // // method to compute circumference of a circle

 return 2* Math.PI * radius;   }   }  //the formula of circumference is

2 x π x radius where value of π is get using Math.PI

Explanation:

Here is the Main class:

import java.util.Scanner;  //to accept input from user

public class Main {  //definition of Main class

public static void main(String[] args) {  //start of main method

   

    Scanner scanner = new Scanner (System.in);  //creates Scanner object to take input from user

    System.out.println("Enter radius: ");  //prompts user to enter radius

    int r = scanner.nextInt();  //reads the value of radius from user

 Circle c = new Circle(r);  // calls Constructor of Circle passing r as argument to it using the object c of class Circle

 

    if(c.getRadius()<=0){  //calls getRadius method to get current value of radius using objec and checks if this value (input value of r ) is less than or equal to 0

        System.out.println("Error!");   }  //when above if condition evaluates to true then print this Error! message

    else {  //if the value of radius is greater than 0

System.out.println("the radius of this Circle is: " +c.getRadius());  //calls getRadius method to return current value of r (input value by user)

System.out.println("the diameter of this Circle  is: " + c.Diameter());  //calls Diameter method to compute the diameter of Circle and display the result on output screen

System.out.printf("the circumference of this Circle  is: %.2f", c.Circumference());  //calls Circumference method to compute the Circumference of Circle and display the result on output screen

System.out.println();  //prints a line

System.out.printf("the Area of this Circle  is: %.2f", c.Area()); } }  }

//calls Area method to compute the Area of Circle and display the result on output screen

The program and its output is attached.

7 0
3 years ago
Other questions:
  • Amazon Web Services (AWS): Group of answer choices a) forms a majority percentage of Amazon's overall revenue. b) was introduced
    15·1 answer
  • Routers: operate at the application layer operate only at the physical layer cannot connect two or more networks that use the sa
    5·1 answer
  • Write a Python program to do the following:
    12·1 answer
  • According to Fourman, Informatics is _______________ with a very _____________ scope.
    5·2 answers
  • PLEASE  HELPPPP!!!!!
    14·1 answer
  • Assume that passwords are selected from four-character combinations of 26 alphabeticcharacters. Assume that an adversary is able
    11·1 answer
  • Match the following.
    8·1 answer
  • Identify the following​
    9·1 answer
  • In the context of computer and network security, _____ means that a system must not allow the disclosing of information by anyon
    10·1 answer
  • Compare and discuss between electromechanical and electronic era of computer​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!