subject

This class has one instance variable, a double called miles. the class has methods that convert the miles into different units. it should have the following methods: public distance(double startmiles) - the constructor; initializes milespublic double tokilometers() - converts the miles to kilometers. to convert to kilometers, divide miles by 0.62137public double toyards() - converts miles to yards. to convert to yards, multiply miles by 1760.public double tofeet() - converts miles to feet. to convert to feet, multiply miles by 5280.public double getmiles() - returns the value of milesmain methodto test your class, create three distance objects in main. one represents the distance between karel and school, karel and the park, and karel and his best friend. karel lives 5 miles from school. karel lives 10 miles from the park. karel lives 12 miles from his best friend. your program should use the methods from distance to print the number of: 1. yards karel lives from school2. kilometers karel lives from the park3. feet karel lives from his best friend

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. andre was recently hired by an organization to check for system vulnerabilities. he is supposed to exploit these vulnerabilities and create a report on the extent of damage to which the system was susceptible. what position does andre hold in this organization? a. information security analyst b. information assurance manager c. penetration tester d. network security engineer e. chief information security officer
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
What did i do wrong with this const discord = require('discord.js'); var bot = new discord.client(); const token = 'ntm3mjcxmtu1mjg3ote2ntq2.dyogew.dpfiwfpuifzuzvifop-csuxasnm' const prefix = "! " bot.registry.registergroup('simple', 'simple'); bot.registry.registerdefaults(); bot.registry. + '/commands'); bot.on('message', message => { if(message.content == 'hi! ') { message.channel.send ('@everyone sup, how is @everyone day going'); } if(message.content == 'h3lp') { message.channel.send ('dose not have any commands yet'); } bot.on('ready', function() { console.log("ready") }); bot.login(token);
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Fast answer i need for apex ! smartphones should be banned from the classroom in public schools so that students cannot cheat on test so easily? which is an example of a counter argument to the thesis above? a.the classroom is a place for learning not for making phone calls b. smartphones are useful learning tools in the modern classroom c.banning smartphones will not students pay attention to teachers any better d. banning smartphones would decreased incidents of theft
Answers: 2
question
Computers and Technology, 24.06.2019 20:30
Drums installed, you would apply clicks of the parking brake to obtain a slight drag on both rear wheels
Answers: 1
You know the right answer?
This class has one instance variable, a double called miles. the class has methods that convert the...
Questions
question
Chemistry, 09.11.2020 22:40
question
Mathematics, 09.11.2020 22:40
question
History, 09.11.2020 22:40
question
Mathematics, 09.11.2020 22:40
question
Mathematics, 09.11.2020 22:40
question
Social Studies, 09.11.2020 22:40
question
French, 09.11.2020 22:40
question
Physics, 09.11.2020 22:40
Questions on the website: 13722363