Trying to do a rating for five hotels, using asterisks and input box

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

54 Replies - 2491 Views - Last Post: 14 July 2012 - 05:31 PM Rate Topic: -----

#1 sosoover09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 13-July 12

Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 02:54 PM

Need help with the whole coding.
Is This A Good Question/Topic? 0
  • +

Replies To: Trying to do a rating for five hotels, using asterisks and input box

#2 m_wylie85  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 96
  • View blog
  • Posts: 899
  • Joined: 15-October 10

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 03:01 PM

Get a book!

No one on this site is going to do your homework for you as it will teach you nothing.

Try! something then we will help you with your problems

This post has been edited by m_wylie85: 13 July 2012 - 03:03 PM

Was This Post Helpful? 0
  • +
  • -

#3 sosoover09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 13-July 12

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 03:13 PM

View Postm_wylie85, on 13 July 2012 - 03:01 PM, said:

Get a book!

No one on this site is going to do your homework for you as it will teach you nothing.

Try! something then we will help you with your problems


i do have a book and i still confused, its not the whole thing just need that to get started
Was This Post Helpful? 0
  • +
  • -

#4 m_wylie85  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 96
  • View blog
  • Posts: 899
  • Joined: 15-October 10

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 03:28 PM

ok break you project into small chunks from your title you need to research how to use a input box lesson one Google it. then you will need a way of recording what hotels you are rating (how you do this will depend on how you are get the data). To be honest it is hard for me or anyone to help you with very limited information about your project. Make no mistake we like helping people but you need to help us help you by giving us the require information.
Was This Post Helpful? 0
  • +
  • -

#5 sosoover09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 13-July 12

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 03:36 PM

View Postm_wylie85, on 13 July 2012 - 03:28 PM, said:

ok break you project into small chunks from your title you need to research how to use a input box lesson one Google it. then you will need a way of recording what hotels you are rating (how you do this will depend on how you are get the data). To be honest it is hard for me or anyone to help you with very limited information about your project. Make no mistake we like helping people but you need to help us help you by giving us the require information.


would you prefer it if i posted the problem with the program i am trying to do
Was This Post Helpful? 0
  • +
  • -

#6 m_wylie85  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 96
  • View blog
  • Posts: 899
  • Joined: 15-October 10

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 03:37 PM

yes that would be helpful
Was This Post Helpful? 0
  • +
  • -

#7 sosoover09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 13-July 12

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 03:53 PM

View Postm_wylie85, on 13 July 2012 - 03:37 PM, said:

yes that would be helpful


You code an application that displays a bar chart. The bar chart depicts the ratings for five hotels. The Create Bar Chart button click event procedure should allow the user to enter the hotel rating for each of five hotels. The rating can be through 1 to 6 only. Use the inputbox function to get each rating. If the user enters an invalid rating, the procedure should display an appropriate message in a message box and then ask the user for the hotel's rating again. (In other words, the procedure should not accept an invalid rating) Use each hotel's rating to display the appropiate number of asterisks in the bar chart.
Was This Post Helpful? 0
  • +
  • -

#8 m_wylie85  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 96
  • View blog
  • Posts: 899
  • Joined: 15-October 10

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 04:27 PM

first of hit your teacher a slap for me Pleassss, why does he want a bar chart with asterisks makes no sense. i think you need to clear up with him want he means by bar chart.

Ok so you need to look up how to use the bar chart control(as for asterisks that's just stupid):

this should get started.
http://www.dreaminco...draw-bar-chart/

Then you need to look up button click events:

then you need to look up if else statments to check for int values between 0 and 6.

for example (sudo code) :

If i as int < 7 Then
'do something
else
messgaebox.show("sorry you need to enter a value between 0 and 6")
end if


try what i have said then get back to me but check with you teacher about the asterisks part i don't get why he wants asterisks
Was This Post Helpful? 0
  • +
  • -

#9 sosoover09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 13-July 12

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 04:30 PM

View Postm_wylie85, on 13 July 2012 - 04:27 PM, said:

first of hit your teacher a slap for me Pleassss, why does he want a bar chart with asterisks makes no sense. i think you need to clear up with him want he means by bar chart.

Ok so you need to look up how to use the bar chart control(as for asterisks that's just stupid):

this should get started.
http://www.dreaminco...draw-bar-chart/

Then you need to look up button click events:

then you need to look up if else statments to check for int values between 0 and 6.

for example (sudo code) :

If i as int < 7 Then
'do something
else
messgaebox.show("sorry you need to enter a value between 0 and 6")
end if


try what i have said then get back to me but check with you teacher about the asterisks part i don't get why he wants asterisks


i am going to try this and its a she lol just giving us a problem from the book
Was This Post Helpful? 0
  • +
  • -

#10 m_wylie85  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 96
  • View blog
  • Posts: 899
  • Joined: 15-October 10

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 04:39 PM

but i just don't understand the asterisks part, why, lol get the book she use the way to do this will be in the book.
Was This Post Helpful? 0
  • +
  • -

#11 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,505
  • Joined: 16-March 11

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 04:46 PM

I just want to say wylie thank you for having the patience enough to respond to this. The whole bar chart idea just demotivates me greatly, and knowing how teachers can be I doubt it's going to change lol. Back on track, projects like this are like objects. Take for example a car, it's made of many different pieces or objects if you will. So break your car down into objects, and figure out how to make those objects first. When you're done then you can put your car together. Good luck hope you figure it out
Was This Post Helpful? 0
  • +
  • -

#12 sosoover09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 13-July 12

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 04:51 PM

View Postm_wylie85, on 13 July 2012 - 04:39 PM, said:

but i just don't understand the asterisks part, why, lol get the book she use the way to do this will be in the book.


View Postm_wylie85, on 13 July 2012 - 04:39 PM, said:

but i just don't understand the asterisks part, why, lol get the book she use the way to do this will be in the book.


i tried to attach a pic of what she want it to look like but it wont let me
Was This Post Helpful? 0
  • +
  • -

#13 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2264
  • View blog
  • Posts: 9,470
  • Joined: 29-May 08

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 05:23 PM

Tip: Start with a Console application. Get the basic of problem sorted out first.
  • Get several user ratings of 5 hotels (A rating being within the range 1 - 5 inclusive).
  • Generate an average rating for each other.


Apply some problem analysis skills to each part.
  • I'm going need some form loop structure pattern.
    - Over the users
    - Over the user rating each hotel.
  • I'm going need get user input.
  • I need to verify that input is valid. Valid being a number within range 1 - 6
  • I need to devise so way keeping a record of the ratings.

part 2
  • I need to find out how calculate an average.
  • I need to find out how to generate an out of stars.

etc etc

Now it time to start coding.
Was This Post Helpful? 0
  • +
  • -

#14 sosoover09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 13-July 12

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 07:04 PM

View Postm_wylie85, on 13 July 2012 - 04:39 PM, said:

but i just don't understand the asterisks part, why, lol get the book she use the way to do this will be in the book.


i have actually done some coding still not coming out right

Dim strRating As String
        strRating = InputBox("Hotel Rating", "Enter Here")

        For intCounter As Integer = 1 To 6
            lblStars.Text = lblStars.Text &
                "*"

        Next intCounter


        If IsDate(strRating) Then
            MsgBox("The student was born on " & CDate(strRating).ToString("D"), _
                   MsgBoxStyle.OkOnly Or MsgBoxStyle.Information, _
                   "Hotel Rating")
        Else
            If strRating <= 7 Then

                MsgBox("Enter Hotel Rating again", _
                       MsgBoxStyle.OkOnly Or MsgBoxStyle.Information, _
                       "Hotel Rating")
            End If
        End If
    End Sub



End Class


*** Edit ***
Please use code tags when posting code.
Posted Image

This post has been edited by GunnerInc: 13 July 2012 - 07:14 PM
Reason for edit:: Added Code tags

Was This Post Helpful? 0
  • +
  • -

#15 sosoover09  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 13-July 12

Re: Trying to do a rating for five hotels, using asterisks and input box

Posted 13 July 2012 - 07:35 PM

Dim strRating As String
        strRating = InputBox("Hotel Rating", "Enter Here")

        For intCounter As Integer = 1 To 6
            lblStars.Text = lblStars.Text &
                "*"

        Next intCounter


        
        If strRating >= 7 Then

            MsgBox("Enter Hotel Rating again", _
                   MsgBoxStyle.OkOnly Or MsgBoxStyle.Information, _
                   "Hotel Rating")
        End If

    End Sub



End Class

This post has been edited by AdamSpeight2008: 13 July 2012 - 07:54 PM

Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »