![]() If no input specified the assignment tells you what values to put. Based on the input calculate the fahrenheitTemp, celsiusTemp like I did in the setDegree. Use the instructions of the assignment to create the 4 constructors. Meaning that your set methods should have arguments and will pass that argument to the class variable. When you set the degree (by Constructor or be a set Method), use the scale to see if it is Celsius or Fahrenheit and use the appropriate formula: public void setDegrees(float degree) The free version is limited but it does have a widget with both for free (don't know if this is limited time as I just installed it). So don't put any calculations in your get Methods. So you will use the scale to determine that and calculate the results accordingly. When you have a degree as a parameter you don't know if it is in Celsius or in Fahrenheit. IF ANYONE WULD BE ABLE TO HELP ME WITH MY ERRORS IN MY CONSTRUTOR METHOD OR AS LEAST LET ME KNOW WHAT I DID WRONG THAT WOULD GREATLY BE APPRECIATED. Be sure to invoke each of the constructors, to include at least one case where the 2 temperatures are the same and one where they are different. Write a driver program that tests all the methods. One toString to print out one line that describes the temperature.One comparison method to test whether 2 temperatures are the same.Three set methods: one to set the number of degrees, one to set the scale, and one to set both.I've read things which say you can view both Fahrenheit and Celsius simultaneously on Carrot Weather, but the units settings (iPhone) only give options for Fahrenheit or Celsius. Two accessor methods: one to return the temperature in degrees Celsius, the other to return it in degrees Fahrenheit. Both Fahrenheit + Celsius Question I'm going absolutely mad.For each of these constructors, assume zero degrees if no value is specified and Celsius if no scale is given. Four constructors: one for the number of degrees, one for the scale, one for both degrees and the scale, and one default constructor.Use a floating-point number for the temperature and a character for the scale: either ‘C’ for Celsius or ‘F’ for Fahrenheit. Write a Temperature class that respresents temperatures in degrees in both Celsius and Fahrenheit. ("The Celsius Temperature is " + celsiusTemp) Īnd here is a full discription of the assignment ("The Fahrenheit Temperature is " + fahrenheitTemp) Now here is what my driver class looks like: public class TempConverterįahrenheitTemp = degree1.fahrenheitTemp() Return "Celsius Temperature: " + celsiusTemp Return "Fahrenheit Temperature: " + fahrenheitTemp Here is what my constructor method looks like public class Degree i did it b4 put only as one file, i started the driver class but when i compile i get a couple errors the errors i get are:ĭegree.java:30: illegal start of expressionĭegree.java:24: Degree(float) is already defined in Degree If you need to translate, Google can help.I have to create a temperature conversion project using a method and driver class. While we have users from all over the world, reddit as a site is in English. If you are caught distributing someone else’s creation w/o permission, you WILL be banned.Ĩ) All posts must be in English. This must be flaired as ħ) No content theft. Breaking this rule will result in an immediate ban, no exceptions.Ħ) Participating community members are allowed one post dedicated to a paid KLWP/KWGT/KLCK every Friday (begins 00:00 PDT/Pacific Daylight Time). Step 2: On the weather card/tile, click on the three horizontal dots (located top-right) and then click the Edit location option. There’s a person on the other side of that post. Step 1: Click or hover on the weather information button on the taskbar to open the News & Interests flyout. If you work globally it would make sense. The dev works hard on Kustom, if you want Pro, pay for Pro.Ĥ) No name calling/attacking other users. Outlook show weather on the calendar should allow to show both Celsius and Fahrenheit and not one or the other. If having a problem, include make & model of phone, OS version, app versionĢ) No piracy! Please don’t ask for or share ways to get Kustom Apps for free. This allows AutoMod to flair your posts and helps users filter out content they don’t want to see. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |