Microsoft Visual Basic

BearsMod1

New member
Joined:
Aug 30, 2012
Posts:
1,809
Liked Posts:
176
So what goes into calculating a restaurant bill?

- Items making up the order
- The amount of money associated with each item
- The tax rate for your particular geography
- Enforced tip rate? Based on the number of the party?
- Coupons / deals to deduct from the total?
- Anything else?
only quantity, menu item, price (per item), and total bill

i got the code ( i can email it to you) just need to know how to do it
 

nvanprooyen

Moderator
Staff member
Donator
CCS Hall of Fame '19
Joined:
Apr 4, 2011
Posts:
18,757
Liked Posts:
27,292
Location:
Volusia County, FL
My favorite teams
  1. Chicago Bears
I haven't touched VB in well over a decade, but if you send it over I can probably help you out. From what I remember the syntax is very straight forward.
 

Crystallas

Three if by air
Staff member
Donator
Joined:
Jun 25, 2010
Posts:
20,016
Liked Posts:
9,558
Location:
Next to the beef gristle mill
My favorite teams
  1. Chicago Bulls
It's been a while for me too.


IIRC

It's something like this.

Create a new form.
The title should be:
Class bill_calc -or something like that

Then VB is design first, so you need to create the input boxes, buttons, ect for each function.

Then you assign each function to each object, and tie them together.
End class

Then compile.
 

BearsMod1

New member
Joined:
Aug 30, 2012
Posts:
1,809
Liked Posts:
176
It's been a while for me too.


IIRC

It's something like this.

Create a new form.
The title should be:
Class bill_calc -or something like that

Then VB is design first, so you need to create the input boxes, buttons, ect for each function.

Then you assign each function to each object, and tie them together.

End class

Then compile.
this is the part i have trouble with. i just don't know how to do it.

i got the code, but know how to create buttons or any of that
 

nvanprooyen

Moderator
Staff member
Donator
CCS Hall of Fame '19
Joined:
Apr 4, 2011
Posts:
18,757
Liked Posts:
27,292
Location:
Volusia County, FL
My favorite teams
  1. Chicago Bears
Is this for a class? Shouldn't they be teaching you that?
 

BearsMod1

New member
Joined:
Aug 30, 2012
Posts:
1,809
Liked Posts:
176
my professor has a Chinese accent, and i cant understand a word he says

come on guys help a brother out.

i only need quantity, menu item, price (per item), and total bill
 

nvanprooyen

Moderator
Staff member
Donator
CCS Hall of Fame '19
Joined:
Apr 4, 2011
Posts:
18,757
Liked Posts:
27,292
Location:
Volusia County, FL
My favorite teams
  1. Chicago Bears
Even if I wanted to, I don't have Visual Studio or anything like that to build the form with. I can probably find some tutorials though, that don't involve heavy Chinese accents.
 

nvanprooyen

Moderator
Staff member
Donator
CCS Hall of Fame '19
Joined:
Apr 4, 2011
Posts:
18,757
Liked Posts:
27,292
Location:
Volusia County, FL
My favorite teams
  1. Chicago Bears

Iwritecode

Well-known member
Joined:
Jun 2, 2011
Posts:
2,002
Liked Posts:
1,094
If you are serious about doing development work, my advice would be to get away from things that make you think procedurally and understand object oriented methodology / design patterns out of the gate. Then it is simply a matter of syntax to write good code in any language. It's not about writing code, it is about solving problems (and ultimately doing that in a well thought out, scalable and maintainable way). Sorry for the rant...

Is this still VB? B/c I am about to go on a whole new rant objects, methods and properties and how they interrelate to help you think through this. Writing code is the easy part. Getting your head to the place conceptually necessary is the hard part. For most new devs I've seen anyways.

I'm taking a free online class learning Python programming and we are just starting to learn OOP. I've tried to learn it before but my default is always to fall back to procedural programming because that's what I've been doing for almost 15 years now. I'm struggling a bit to change my way of thinking. Probably because I have to think the way I do for my job everyday while I only work on my programs for class a couple of nights a week. It's harder to switch back and forth.

The latest project is to build a blackjack program and it's due Saturday night. I haven't started it yet. :nervous:
 

BearsMod1

New member
Joined:
Aug 30, 2012
Posts:
1,809
Liked Posts:
176
I'm taking a free online class learning Python programming and we are just starting to learn OOP. I've tried to learn it before but my default is always to fall back to procedural programming because that's what I've been doing for almost 15 years now. I'm struggling a bit to change my way of thinking. Probably because I have to think the way I do for my job everyday while I only work on my programs for class a couple of nights a week. It's harder to switch back and forth.

The latest project is to build a blackjack program and it's due Saturday night. I haven't started it yet. :nervous:
so, can you do the project for me?
 

nvanprooyen

Moderator
Staff member
Donator
CCS Hall of Fame '19
Joined:
Apr 4, 2011
Posts:
18,757
Liked Posts:
27,292
Location:
Volusia County, FL
My favorite teams
  1. Chicago Bears
Dude, not to be a dick...but stop trying to get other people to do your shit for you.

Either you want to learn or you don't. Getting someone else to do this for you is going to get you nowhere. Part of doing development work (if that is the direction you are headed in) takes LOADS of self education to be any good. Things are constantly evolving, so it is pretty much a prerequisite. It's lots of banging your head against the wall and appreciating the occasional "aha moment" when something clicks and you take a step towards getting better. Take Iwritecode's post above as an example. He is a full time developer, who is taking his time to learn Python and OOP methodology in his offtime, so he can increase his skill set.

I gave you some links above that pretty clearly lay out almost exactly what you need to do. Figure it out. Or don't. If this isn't something you want to do, then just stop wasting your time in that class.
 

nvanprooyen

Moderator
Staff member
Donator
CCS Hall of Fame '19
Joined:
Apr 4, 2011
Posts:
18,757
Liked Posts:
27,292
Location:
Volusia County, FL
My favorite teams
  1. Chicago Bears
I'm struggling a bit to change my way of thinking. Probably because I have to think the way I do for my job everyday while I only work on my programs for class a couple of nights a week. It's harder to switch back and forth.

Ya, that would be tough. It is a definite shift in the way you have to think about things, so I definitely get what you are saying (especially since you've been thinking about things procedurally for so long).
 

BearsMod1

New member
Joined:
Aug 30, 2012
Posts:
1,809
Liked Posts:
176
Dude, not to be a dick...but stop trying to get other people to do your shit for you.

Either you want to learn or you don't. Getting someone else to do this for you is going to get you nowhere. Part of doing development work (if that is the direction you are headed in) takes LOADS of self education to be any good. Things are constantly evolving, so it is pretty much a prerequisite. It's lots of banging your head against the wall and appreciating the occasional "aha moment" when something clicks and you take a step towards getting better. Take Iwritecode's post above as an example. He is a full time developer, who is taking his time to learn Python and OOP methodology in his offtime, so he can increase his skill set.

I gave you some links above that pretty clearly lay out almost exactly what you need to do. Figure it out. Or don't. If this isn't something you want to do, then just stop wasting your time in that class.
i dont want to do that crap. you must be out of your mind to do it.

but unfrouintley its a required class so i gotta do it
 

nvanprooyen

Moderator
Staff member
Donator
CCS Hall of Fame '19
Joined:
Apr 4, 2011
Posts:
18,757
Liked Posts:
27,292
Location:
Volusia County, FL
My favorite teams
  1. Chicago Bears
Required class for what major?

And development is actually a really small percentage of what I do these days. Career started there quite awhile ago, now it is more out of necessity than anything (when shit needs to get done basically). It certainly isn't for everyone.
 

BearsMod1

New member
Joined:
Aug 30, 2012
Posts:
1,809
Liked Posts:
176
business mangament.

im finna run the bears buy the bears off that old ***** virgina.

and once i do i will make sure you never step a feet around solider field. ***** ass didnt help me. and being a fuckan asshole
 

nvanprooyen

Moderator
Staff member
Donator
CCS Hall of Fame '19
Joined:
Apr 4, 2011
Posts:
18,757
Liked Posts:
27,292
Location:
Volusia County, FL
My favorite teams
  1. Chicago Bears
Lol. Ok. Like I said earlier, even if I wanted to help you out...I couldn't do it b/c I don't have Visual Studio (or anything to build the forms with). I work in the open source world primarily. If you go to the first link I sent you above and scroll down the bottom, it is pretty much exactly what you need. Seriously not complicated. You just need to build the formula inside that function a little different to multiply quantities and price to get the total.
 
Last edited:

Crystallas

Three if by air
Staff member
Donator
Joined:
Jun 25, 2010
Posts:
20,016
Liked Posts:
9,558
Location:
Next to the beef gristle mill
My favorite teams
  1. Chicago Bulls
a4ce0760-db12-4fdf-83dd-428c4d317d7e.jpg
 

Top