Ask Computer Engineering Expert

Write a Python application that allows the user to convert between temperatures in fahrenheit and temperatures in celsius. Below are the formulas for both, where Tc is temperature in celsius and Tf is temperature in fahrenheit:

Tc = (5/9)*(Tf-32)

Tf = ((9/5)*Tc)+32

Before you worry about that, though, design your GUI on paper. It is not obvious what buttons and fields are required. Look on the web to see how others have done this, sketch each screen and how it looks in different states. The font, use of white space and placement of controls is not important; focus on Which controls and what textfields will be present and what each will be used for. Be sure it is obvious to the user what she should do next and what the numbers on the screen mean.

Note that the user has to be able to type in either celsius or fahrenheit temperatures, and to perform repeated conversions in either direction. Try not to limit the user at all.

I recommend that you use tkinter, which comes standard with Python 3.x. However, if you would like to use a different GUI library you can do that.

It is important that you respect the separation between the View and the Model. This means that the classes that put the Frame, Buttons, etc up on the screen cannot contain any of the calculations. Also, the class (or module) that performs the calculations cannot do any of the user interaction. There will be a Controller between the Model and the View that takes care of the communication between the two of them.

As always, you must submit proof that your program runs. It is a little harder to record the run for a GUI like this. Here's how:

Windows: When the window that contains your output is up, press: to get the screen shot. Do not simply use because you will end up with a screenshot of your entire desktop. Windows places the screen shot of just your Python application onto the clipboard. Now start Word or Notepad and paste the clipboard into your document. Please submit this document, containing a screen shot of the opening screen and a screen shot of the result of a calculation, together with your source code.

Mac: When the window that contains your output is up, press: <4> all at the same time. Mac OS makes your mouse into a marquee that you can drag from top left to bottom right of the screenshot. When you let go, Mac OS puts a file on your desktop called "Screen shot xxxx.png". Please submit a screen shot of the opening screen and a screen shot of the result of a calculation, together with your source code.

HINTS:

  • Make sure that you follow all the program guidelines!
  • It might help to start with the three files attached to the end of the section in the Module for "Week 10: Graphical User Interface"
  • In any case, you should have at least four files in your final submission, the Model, the View, the Controller and the file(s) containing the screen shots.
  • It will take you much longer to put all your code into one class at first, and split up the Model from the View from the Controller later. It is much faster to start with a simpler application spread across three files (M,V and C) and add functionality later to fulfill all the requirements. For example, you can start by implementing an app that only converts from Fahrenheit to Celsius. Just make sure you are clear what your user interface will look like (in a general way) before you start to code!
  • Notice that the Model consists entirely of only two methods. There is no reason for the Model to store any data at all, it will just be called upon to perform one calculation after another, returning the result of the calculation each time. This can be implemented as two standalone functions in their own module, as the built-in math functions are. Or it can be implemented as two static methods inside of a class. For more info about static methods, see the Module "An Object is an Instance of a Class", in the section "A Method that Belongs to the Whole Class".

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92524905
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As