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
Harman [31]
3 years ago
8

Write a method that takes a RegularPolygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclus

ive, and sets its side length to a random decimal number greater than or equal to 5 and less than 12. Use Math.Random() to generate random numbers.
Computers and Technology
1 answer:
Sergio [31]3 years ago
5 0

Answer:

import java.lang.Object

import java.lang.Math

public class RegularPolygon  extends java.lang.Object{

  public void randomize(RegularPolygon c){

       int min = 10, max1 = 20;

       double  min1 = 5, max1 = 12;

       double range = (max - min) + 1;

       double range1 = (max1 -min1) + 1

       int side = (Math.random() * range) + min;

       double len = (Math.random() * range1) + min1;

       c.setNumSides(side);

       c.setSideLength( len);

 }

 public static void main(String[] args) {

    RegularPolygon r = new RegularPloygon();

    randomize(r);

 }

}

Explanation:

The randomize method accepts a regular polygon class as its only parameter and assigns a random number of sides and the length of these sides with the 'Math.random' function.

You might be interested in
Which qualifications are typical for someone working in Marketing Information Management and Research?
Harman [31]

Answer:

• good teamwork skills and knowledge of search engines and social media.

• math skills for calculating prices, good teamwork, and physical stamina.

• a pleasant attitude, critical-thinking skills for designing surveys, and social awareness.

• creativity, persuasiveness, and good social skills when dealing with news media contacts.

Explanation:

Marketing Information Management and Research is a system in an organization whereby skills such as Marketing Information and Research are made use of by marketers to ensure that they come to know who their consumers are , what exactly the consumers want and how they can satisfy the needs and wants of the consumers using a very fast , precise and correct methods.

A person who works in Marketing Information Management and Research must have the following skills:

• good teamwork skills and knowledge of search engines and social media : Accurate knowledge of search engines such as google e.t.c. helps a person working in Marketing Information Management and Research to have access to the latest trends that consumers follow. These trends provides adequate information about the needs of consumers that is required in research.

Good teamwork skills is very important as it makes working in Marketing Information Management and Research very orderly, there is absence of chaos, when working with one another, creative ideas are obtained.

• math skills for calculating prices, good teamwork, and physical stamina : These skills above are very essential because such a person need to have adequate knowledge of the prices of goods and services that they produce. Physical stamina is also and essential skill.

• a pleasant attitude, critical-thinking skills for designing surveys, and social awareness : These qualifications are important because critical thinking helps a such a person to be able to come up with or create a solution using information from the surveys to accurately meet the needs of the consumers.

Having skills in social awareness gives the person working in Marketing Information Management and Research up to date information about what a consumer wants at this particular time or moment.

• creativity, persuasiveness, and good social skills when dealing with news media contacts: These skills are essential because consumers need to see creativity in products and services that they want as it makes them more attractive.

Having good social skills when dealing with news media contacts is also very important.

6 0
3 years ago
Taking into account recent technological developments, what technical advances do you think are possible in the next twenty year
stiv31 [10]

Nuclear Fusion reactors may reach the prototype commercial stage , The causes and possible treatment of Alzheimers Disease  and Partial cloning of human organs for transplant therapy

Explanation:

Fusion may be an energy technology that seems to be perpetually coming over the horizon, but projects around the world such as SPARC are getting increasingly close to reactors that, although smaller in capacity, can produce net positive power in just a few years. To help accelerate discovery of permanent cure for Alzheimers, an alliance of pharmaceutical companies, nonprofit foundations and government advisers, has developed a partnership to share data from Alzheimer's clinical trials. This would definitely pave way for the permanent cure for Alzheimer. The most common method of therapeutic and reproductive cloning is somatic cell nuclear transfer (SCNT). SCNT involves separating the nucleus from a donor egg, and replacing it with the DNA from the organism meant to be cloned. Scientists could potentially clone organs with SCNT by cloning embryos, extracting the stem cells from the blastocyst, and stimulating the stem cells to differentiate into the desired organ. these three scientific and technological advancements are possible.

8 0
3 years ago
What is a generic phone
Zina [86]

Explanation:

Generic Android Device means the Android devices which does not any specific brand name or they can not be related to any specific class or brand. For ex: Samsung developed Epic 4g Touch Android device but they later removed lot of fancy features and stuffs from it launched with Galaxy S.

3 0
3 years ago
Read 2 more answers
Which of the following is not a goal pursued in the game of economics?
Zanzabum

Answer:

I think B.Inflation

Explanation:

7 0
3 years ago
You can use ___________ to add dynamic features to a webpage such as search box that completes your search text automatically.
jonny [76]

Answer:

JavaScript

Explanation:

JavaScript is one of the simplest programming languages which makes the page dynamic and user interactive. It is a command based programming language that is a part of DHTML (Dynamic hypertext markup language ). The dynamic web page can be modified and its values can be changed.

JavaScript allows users to enter the value and provide the result at the same time and very fast.

JavaScript can be used online or offline too.

JavaScript provided much functionality such as when a customer searches anything, it completes the search automatically.

5 0
3 years ago
Other questions:
  • Why people needs soft skills in the era of high technology.
    13·1 answer
  • Modern car odometers can record up to a million miles driven. What happens to the odometer reading when a car drives beyond its
    8·1 answer
  • What are the benefits of using a multiview sketch to communicate a design?
    11·1 answer
  • Software that gives network administrators the ability to provide computer assistance from a central location by allowing them t
    15·1 answer
  • What target audience does your product serve?
    13·1 answer
  • Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total. For example, if the user en
    6·1 answer
  • Which area of study involves microeconomWhich area of study involves microeconomics? A. a nation's ability to meet consumer dema
    10·1 answer
  • (Please hurry will give brainliest and anything else please Due in 5 min)
    9·2 answers
  • Is a ROUTER required for Internet Connectivity ?<br> Yes<br> No
    11·1 answer
  • Weaknesses about ICT Technician
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!