Interior Design Program Guidance

  • (2 Pages)
  • +
  • 1
  • 2

24 Replies - 972 Views - Last Post: 31 January 2014 - 03:31 PM Rate Topic: *---- 1 Votes

#16 junied32167  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 17-January 14

Re: Interior Design Program Guidance

Posted 31 January 2014 - 01:59 PM

I have almost finished making the program but I am stuck with making the bill.
My program allows the user to select from a paintype by making a choice from 1-3. 1 for luxury which is£1.75 another for standard which is £1.00 and the third choice economy which is 0.40p but for the bill I have to times the price of the paint by the area of the room.
I have tried doing this
Dim paintprice As Double
        paintprice = paintType * areaofroom
        Console.WriteLine(paintType * areaofroom)
        Console.WriteLine(" You are a winner")
        Console.ReadLine()


Was This Post Helpful? 0
  • +
  • -

#17 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10438
  • View blog
  • Posts: 38,657
  • Joined: 27-December 08

Re: Interior Design Program Guidance

Posted 31 January 2014 - 02:14 PM

Quote

My program allows the user to select from a paintype by making a choice from 1-3.

You haven't gotten user input.

Quote

I have tried doing this

And...?

By the way- I love how you pretend to be your teacher to get your code removed, then curse in the thread, then come asking for help more than a week later.
Was This Post Helpful? 0
  • +
  • -

#18 junied32167  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 17-January 14

Re: Interior Design Program Guidance

Posted 31 January 2014 - 02:44 PM

I am sorry for posing as a teacher and especially for swearing.
The error message i get after inputting that coding is luxury to type double is not valid
Was This Post Helpful? 0
  • +
  • -

#19 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10438
  • View blog
  • Posts: 38,657
  • Joined: 27-December 08

Re: Interior Design Program Guidance

Posted 31 January 2014 - 02:55 PM

There is nothing named luxury in the snippet you posted.
Was This Post Helpful? 0
  • +
  • -

#20 junied32167  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 17-January 14

Re: Interior Design Program Guidance

Posted 31 January 2014 - 02:59 PM

Luxury is a painttype
Was This Post Helpful? 0
  • +
  • -

#21 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10438
  • View blog
  • Posts: 38,657
  • Joined: 27-December 08

Re: Interior Design Program Guidance

Posted 31 January 2014 - 03:02 PM

So is paintType a class? Because your code indicates that paintType is a variable:
Dim paintprice As Double
        paintprice = paintType * areaofroom
        Console.WriteLine(paintType * areaofroom)
        Console.WriteLine(" You are a winner")
        Console.ReadLine()



Thus, luxury doesn't appear here at all. Even if luxury is a paintType, is that really a valid double? Obviously not. Strings and objects are not numbers.
Was This Post Helpful? 0
  • +
  • -

#22 junied32167  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 17-January 14

Re: Interior Design Program Guidance

Posted 31 January 2014 - 03:07 PM

painttype is a variable.
If not double then what because when the price of the paint is multiplied by the room area it will be a decimal number
Was This Post Helpful? 0
  • +
  • -

#23 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10438
  • View blog
  • Posts: 38,657
  • Joined: 27-December 08

Re: Interior Design Program Guidance

Posted 31 January 2014 - 03:19 PM

Let me be blunt:
-Your error message says: luxury to type double is not valid .
-There is no variable named luxury in the code you posted.
-Therefore, we cannot diagnose your problem and help you.
Was This Post Helpful? 0
  • +
  • -

#24 junied32167  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 17-January 14

Re: Interior Design Program Guidance

Posted 31 January 2014 - 03:28 PM

Console.WriteLine("Select a type of paint.")
        Console.WriteLine("1 -Luxery = £1.75")
        Console.WriteLine("2 - Standard = £1.00")
        Console.WriteLine("3 - Economy = 0.40")
        Console.Write("Make a selection (1-3): ")
        Dim paintType As String
        Dim doItAgain As Boolean = False
        Do


This is the coding i used as well as select case to allow users to choose a painttype

This post has been edited by junied32167: 31 January 2014 - 03:28 PM

Was This Post Helpful? 0
  • +
  • -

#25 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10438
  • View blog
  • Posts: 38,657
  • Joined: 27-December 08

Re: Interior Design Program Guidance

Posted 31 January 2014 - 03:31 PM

This is getting ridiculous. There is no variable named luxury.

By the way- Dim paintType As String. You cannot multiply a double and a String.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2