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
ozzi
3 years ago
5

Write a program that will prompt a user to input coordinates for all the corners for drawing a quadrilateral. The program should

draw the quadrilateral on AutoCAD screen and print out all the coordinates with x and y coordinates only. Use GETPOINT, CAR, and CADR for writing the following program. Make sure this program will work with any coordinates that a user may input. None of the numerical coordinates should be in the programming code; in another words, do not HARD CODE the coordinates.
Computers and Technology
1 answer:
aev [14]3 years ago
5 0

Answer:

See explaination

Explanation:

public class Drawquadrilatral

{

public void paintComponent(Graphics g)

{

super.paintComponent(g);

Polygon p = new Polygon();

for (int k = 0; k < 7; k++)

p.addPoint((int) (200 + 60 * Math.cos(k * 2 * Math.PI / 9)),

(int) (200 + 60 * Math.sin(k * 8 * Math.PI / 5)));

g.drawPolygon(p);

Polygon s = new Polygon();

for (int k = 0; k < 360; k++)

{

double m = k / 360.0;

s.addPoint((int) (150 + 50 * m * Math.cos(8 * m * Math.PI)),

(int) (150 + 50 * m * Math.sin(8 * m * Math.PI)));

}

g.drawPolygon(s);

}

public static void main(String[] args)

{

JFrame frame = new JFrame();

frame.setTitle("DrawPoly");

frame.setSize(350, 250);

frame.addWindowListener(new WindowAdapter()

{

public void windowClosing(WindowEvent e)

{

System.exit(0);

}

});

Container contentPane = frame.getContentPane();

contentPane.add(new DrawPolyPanel());

frame.show();

}

}

You might be interested in
Select the correct line of missing code to create an output of "hello."
s2008m [1.1K]

Answer:

B

Explanation:

This feels like an error on the question issuer's part.

3 0
3 years ago
How does Shakespeare immediately introduce Tybalt as a menacing character?
Scilla [17]

The correct answer to this open question is the following.

Although there are no options attached we can say the following.

William Shakespeare immediately introduces Tybalt as a menacing character in the first moments of the play "Romeo and Juliet" because Tybalt is an aggressive man who does not support the idea of peace or get peaceful agreements to solve problems. Tybalt does not like the Montague people.

“The tragedy of Romeo and Juliet” was written by the English writer William Shakespeare approximately in 1590 and is considered to be a play in a poetic form. It refers to the story of two lovers that belonged to opposite families in dispute. Their love is forbidden. Eventually, both lovers die and that is the reason for their families to reconcile.

5 0
3 years ago
______ is used to ensure that data is organized most efficiently in a database. A) Consistency checking. B) Validation C) Normal
Leya [2.2K]

Answer:

C) Normalization

Explanation:

Normalization is an approach that is to be done in a systematic manner in order to remove the data duplicity and there are non-desirable attributes such as insert, update, delete, etc. In this the process should be followed in multi step that contains the data in a tabular form so that it could eliminate the repetition of data to maintain the efficiency of the data

Therefore according to the given situation, the option C is correct

6 0
3 years ago
12.2 Sort an array in ascending order Write a program that gets a list of integers from input, and outputs the integers in ascen
notsponge [240]

Answer:

Explanation:

The following code is written in Java, it asks the user for the number of inputs that will be made and then the inputs. These inputs are placed into an array. Then the array is sorted and printed out to the terminal.

public static void sortArrayList() {

           ArrayList<Integer> sortedList = new ArrayList();

           Scanner input = new Scanner(System.in);

           System.out.println("Enter number of digits in Array");

           int numberOfInputs = input.nextInt();

           for (int i = 0; i < numberOfInputs; i++) {

                   System.out.println("Enter a number");

                   sortedList.add(input.nextInt());

           }

           int n = sortedList.size();

           for (int i = 0; i < n; i++)

               for (int j = 0; j < n-i-1; j++)

                   if (sortedList.get(j) > sortedList.get(j + 1))

                   {

                       // swap arr[j+1] and arr[j]

                       int temp = sortedList.get(j);

                       sortedList.set(j, sortedList.get(j + 1));

                       sortedList.set(j + 1, temp);

                   }

           for (int x : sortedList) {

               System.out.println(x);

           }

       }

7 0
3 years ago
Your motherboard supports dual channeling and you currently have two slots populated with DIMMs; each module holds 2 GB. You wan
Olenka [21]
One 4-GB DIMM. Dont really have a explanation for it just comes from previous experience
6 0
4 years ago
Read 2 more answers
Other questions:
  • In the lab, you used the filter box in Wireshark to remove traffic from port 3389. What is that port used for? What filter synta
    12·1 answer
  • Using a subject directory, you locate a particular topic by clicking links through different levels. a. True b. False
    10·1 answer
  • Briefly explain the benefits and consequences of technology. //PLEASE ANSWER//
    9·1 answer
  • What is the use of html in websites
    15·2 answers
  • What is the name of the formal procedure scientists use to study the world around them?
    14·2 answers
  • The fastest way to get help is to type a word or two in the search box.
    7·1 answer
  • Meaning of sperm count
    5·2 answers
  • Which unit of the computer works as the input​
    14·1 answer
  • What report provides data on how specific sections of a website performed?
    6·1 answer
  • So has anyone opened the link/file those people are giving out as answers? Like what are they, viruses, answers, nothing??? Some
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!