Beginner's At Object Oriented Programming?

Sep 25, 2011

I'm trying to pick up some simple object-oriented programming skills so I am trying my hand at beginner's problem - and I am totally stuck...I'm trying to write a program that will print to a label, the area and perimeter of your shape of choice, dependent on the Length and Width (for Rectangles and Triangles) or Radius (For Circles) you input and the shape you select.

I know how to do this easily with simple event-driven programming, but I'm trying to do this by using classes and inheritance.The idea I have is that you enter in length/Radius and/or width into text boxes (txtLen, txtWid) and then you can click a button to display the Length, Width and Perimeter or Radius and Circumference, and Area.

I'd create a Super-Class: Shapes to define my overarching parameters - all shapes have area and perimeter. Then I would create sub-classes for each shape inheriting the overarching "Shapes" class - dim'ing all of their respective extra pieces. Then the buttons would display the appropriate info when clicked.I understand this seems like a lot - but really I just need help getting my feet on the ground for this.

View 4 Replies


ADVERTISEMENT

Object-oriented Programming In .NET And C#?

Apr 16, 2011

good tutorials where i can read about the actual object oriented concepts which we use in real time scenarios. Not the "class is a container. fruit is a parent class and apple is a child class" kind of stuff.Recently i was developing a multithreaded GUI application in vb.net and found out many obstacles like using one form's element in another form, changing form property in other class, when to create objects to access elements and many other stuff stumped me.

View 4 Replies

Is VB An Object Oriented Programming Language

Jun 18, 2009

Is Visual Basic an Object Oriented Programming Language ?Working as a software engineer

View 2 Replies

Object Oriented Programming Using .net 2008?

Aug 4, 2010

I need to write an program with two players rolling a pair of dice and the highest tally wins with an Game class having with two member variables of the type PairOfDice. I can not get it to work.

[Code]...

View 8 Replies

The Power Of Object Oriented Programming?

Oct 28, 2009

Say I want to create a functionTry 5 timesThe function takes a function pointer to another function

function dosomething() as boolean
end function
function tryfivetime (thefunction as what?)

[code].....

View 5 Replies

VB Language And Object Oriented Programming?

Apr 20, 2009

i am new to asp and am currently trying to get my head around the visual basic language and Object Oriented Programming.From what i have read you need to have a good understanding of these to create good ASP.NET webpages, but from reading about these in books and joining the website [URL]..i am getting fairly confused with the language and the OOP. Does anyone out there have any tips for me when it comes to learning about these. Is there a good way to learn about these as i just seem to be getting really confused from the start.

View 5 Replies

Object Oriented Programming, Subroutines, Functions And Inheritance

Jun 29, 2010

I have been learning vb.net for about 6 months now and I red few books about basic visual programming as most to them have information about the basic concepts like what is Object oriented programming, subroutines, functions ,inheritance etc and bit about ADO connectivity to database. Having said all that I think I have good concepts about all these things but now I want to proceed further but can't find appropriate text books or online tutorials.

View 2 Replies

Beginner Programming With If Then Else Statements?

Oct 8, 2011

I am trying to create a program that calculates the prices of different payment methods of a buffet.The program requirements are simple. The buffet start in 1/7/2011 and ends 31/8/2011. Payments methods are online, cash and coupon. coupon is only valid from 1/8/2011 to 31/8/ 2011. 1 child is free for every 2 adult that pay. There are different prices for weekends (sat and sun) and different prices for weekdays. [code]

View 3 Replies

Best Publications For The Beginner In Excel Programming?

Apr 13, 2010

I am working on Excel programming . Can you suggest the best publications for the beginner in Excel Programming.

Tasks Ahead:

To create a comboBox dynamically in Excel Worksheet Write events for comboBox_ change/click Dynamically changing the items in the combo Box

View 2 Replies

VB 2008 Console Beginner Programming?

Jun 12, 2011

I have been working on this all weekend and can't figure out what I am doing wrong. The objective is to collect 3 numbers from the user then display to them the numbers they entered, the lowest number entered, the highest number entered, the total, and the average. Can someone review this and tell me what I am not getting?

[Code]

View 3 Replies

C# - Start With Aspect Oriented Programming?

Mar 27, 2009

So having read some of the PostSharp documentation presented as an answer to my previous question regarding passive logging ([URL]), I am led to my next question: Where is a good place to start learning about Aspect Oriented Programming - I've done some searches on Google and I've read some articles - including the article regarding the topic on Wikipedia, but a lot of the material seems to assume you have a basic understanding of some of the terms which I seem to be missing, and that which doesn't just dives straight into integration leaving me not understanding what exactly it is I'm integrating.

Does anyone have any decent material targeted at someone who's never heard of Aspect Oriented Programming before today learn about the core concepts, terms/keywords etc? Even a birds-eye - i.e. These are the core concepts, keywords to look out for, what they stand for and how they fit together. After that, I can probably make some decent headway on my own. I'm most interested in AOP in relation to .NET development,

View 1 Replies

Object Oriented Design In Asp.net With VB

Apr 3, 2009

I try to convert vb.net code to an object-oriented design. This help page talks about doing it: [URL] I plan this:

[Code]...

View 1 Replies

Object Oriented Design Vs Procedural

Feb 27, 2009

Our company currently uses an APL model to illustrate our life products. We are in the process of converting this to Excel/VBA because the APL system is extremely difficult to maintain.APL is difficult to maintain because the code has become over the years (~15yrs) spaghetti and only a select people (who have worked here 5+years) really understand this to make updates when new products come out. APL is also not well known and difficult to understand. I just would like help on designing the system, my main career is not a programmer, and the design I was envisioning was a "Procedural" approach. (the APL is procedural rather then object oriented. I have not used object oriented code before)Basically the program illustrates a life insurance product. That just means it projects a fund out from the time the policy is issued to age 120. The illustration is given to the policyholder as a way of predicting what the value of their fund will be given some assumptions.The program does the following1.) Populate Variables2.) Calculate Premiums Types3.) Monthly processing4.) Output values to spreadsheetThe system has to illustrate different types of Products and we are adding new products to the system. Most of the main structure of the program (in VBA) is already written. It seems that (#3) monthly processing will vary by product, and I would like help with maintaining that part of the code. The other 3 parts of the program are not a problem maintaining.We will be continually adding products. We will start with about 5 products and maybe add about 5 per year.Here is the Monthly Processing code:... Call MonthlyProcessing(120, PremPayMode0, Assump0, True, DumpLumpSum0)

View 4 Replies

Some Good Object Oriented Books?

May 21, 2009

I'm looking for some good quality OO books, if any exist for VB .Net

View 10 Replies

How To Do A Seemingly Simple Object-oriented In .NET 2010

Jun 17, 2010

how to do a seemingly simple object-oriented problem in VB.NET 2010. Basically, I want to be able to write code such that I could do the following:

Dim myObject as Object
myObject.Group1.Command1()
myObject.Group2.Command2()

[code]....

Very similar to how VBA handles objects, such as in Excel, I can use

Dim myBook as Workbook
Set myBook = ActiveWorkbook
myBook.Sheets(1).Range("A1").Value()

to get the value of the cell "A1" on the first sheet. This structure has been eluding me for some time now, and it would be great if anyone could suggest how to do it. I'm currently using a class and declaring all methods as Shared Friend inside subclasses, which throws warnings when I use it as I want to in other code.

View 4 Replies

Looping Through A Dataset - Object-oriented Approach

Feb 25, 2012

The problem is as follows, a group of users (~50k) must be filtered from a DB, four fields for each user must be saved into a variable, then a second process will take each user and proceed to enable some licences into another system/platform. Both processes will be developed into the same application.

My first attempt was basically a query looping through the users but I wonder if thinking in objects is a better approach.

I was thinking in a structure inside an object to hold the 4 parameters, then pass each user object to the other object however considering the amount of data I'm not sure if this is fine.

View 1 Replies

Object Oriented Analysis, Design & Implementation?

Apr 28, 2009

With this assignment, you are provided with an incomplete object-oriented implementation of the GAME MANIA software system based on Visual Basic 2008. The specification and the subsequent modelling are explained in a case study titled Game Mania: GAME AND GAME CONSOLE RENTAL STORE.

An implementation of the following classes are made available as the basis of your development work:

1.Member
2.Stock
3.Stock Item
4.Optic Reader
5.Card Writer
6.Membership Card

[Code]...

Note that the user interface provided is very basic. You need to change it, as you feel appropriate so that it will reflect the required functionality. For example, in the present implementation version, no provisions were made in the user interface for querying and handling fines associated with late returns.Providing this aspect in the user interface might be necessary as part of handling renting of games and game consoles.

View 6 Replies

Object Oriented Design For Manufacturing Programs?

Sep 13, 2011

This is a continuation on a different thread of mine because it got off topic. I have a program that i use select case statements, quite a few of them and did a lot of copy and pasting of code and had 5000 lines of code and was still building on it, it was suggested to use OOD so i am making a new thread related to that.

View 1 Replies

Object Oriented Programing, Where To Draw The Line?

Jul 10, 2011

I created a project in Excel-VBA (wich I'm also new at) that connect to a SQL. It retrieves data, puts it in arrays, calculates, writes it up nicely and mails it to a mailing list before it closes itself down. This works when Excel is stable on the server, which it is not. Therefore I'm set on rewriting it to VB.NET (just have to learn it first).Project:To build this project in VB.NET I wanted to try and make it Object Oriented (OO). I have read that OO is when I create a Sub or Module for different tasks. Are there any advantages in learning/doing this from the start? I plan on creating Subs for almost everything, and then call it from a Main sub.

Too much OO?:
These are the modules I plan to create (and call)
Connect to SQL moduleSet up a query and put data in arrays moduleCalculation moduleOutput

[code]....

View 1 Replies

Visual Studio - Object-Oriented Black Jack

Feb 24, 2010

Alright, so I want to improve my programming and object orientation skills. I want to program a fully object oriented blackjack game in VB.net under Visual Studio 2008. The first thing I did was learn all the rules of BlackJack.

[Code]...

View 1 Replies

C# - Design Reference And Object Oriented Design Of A CRM

May 25, 2011

I searched codeplex and google. I have found so many such as tustena but unfortunately they are not domain driven based and in these solutions I could not find a good modelling documents or references. i am a newbie in CRM but I am sensetive to design it with solid object-oriented fundamentals. Any reference or open source solution especifically for CRM design and implementaion in .NET? Cheers

View 1 Replies

Programming Paradigm Called OOP - To Be An Object Or Not To Be An Object ?

Feb 25, 2012

I am in the process of learning this new programming paradigm called OOP (I am a very seasoned structured programmer). In that context I am receiving what I call contradictions in vb.net regarding the instantiation of an object. Given the two lines of code below:

Dim SQLcmd As New SqlCommand
Dim SQLdr As SqlDataReader

The first line is quite simple - SQLcmd is an object - period. It is the second line that is creating the ambiguity. One reference I have read says in order for a class to instantiate an object the key word "new" must be used. But I have also seen examples where SQLdr is also called an object? To add to the ambiguity I have seen class examples where the class was constructed without a new subroutine (a constructor) and called with the key word "new" which I have been informed by vb.net on more than one occasion in doing such that "there are no constructors" in the class. So would someone please tell me - Is SQLdr an object and if so is it by inheritance (the other escape path) or what; and lastly am I correct in my understanding that in order to use the key word "new" there must be a "new" subroutine/function/constructor in the class.

View 3 Replies

Game Programming :: Make An Object Move?

Aug 13, 2009

something like this

pctObject.horizontalPosition += 5

I just dont know the right syntax

View 2 Replies

Game Programming :: Move An Object Around A Picturebox?!

Jan 2, 2011

how to make a collision between the player object and the wall which is a picturebox

i can move the player object (which is also a picture box) with the arrow keys and i've made it move inside the form border, but the porblem is how to make it stop when it touches the wall (picture box) if im moving left and the left border of the player touched the right border of the wall then it should stop and only the up, down and right keys will be working!!!

View 12 Replies

Game Programming :: Object Detect By Cursor

Oct 13, 2008

(Visual Studio 2008 - Visual Basic 2008 - 3.5 .Net Framework) I have few objects on my form and i would to like scan objects' names by my cursor. I wish to get name of object, which is under my cursor. (only one object is under cursor, and form)..

View 2 Replies

Game Programming :: Object Detect By Cursor?

Jun 7, 2011

I have few objects on my form and i would to like scan objects' names by my cursor. Bad english, so again: I wish to get name of object, which is under my cursor. (only one object is under cursor, and form)

View 1 Replies

Game Programming :: Make A Button Spawn An Object?

Dec 20, 2009

I have a button named cmd_Grunt and a picture box named pb1_Grunt. I want to click the button and have a picture box created.

"Public Class Form1
Dim grunt = (50)
Private Sub cmdGrunt_Click(ByVal sender As System.Object, ByVal e As

[Code].....

This is the code I have so far. I get an error message, "Expression expected." It wants the expression between "CreateObject" and "('pb1Grunt', grunt))".

ie cmdGrunt_Click(CreateObject HERE ('pb1Grunt', grunt))

View 19 Replies

Get Me From Beginner To Intermediate?

Jul 22, 2010

I want to learn visual basic, what book or books are the best to take me from beginner to intermediate?Would it be more advantageous to go through VB 2008 or VB2010 tutorials first or should i start with a book before going through VB2008 or VB2010 tutorials?I am comfortable with Sequel (SQL) language, learned on the job and am at the advanced level of Excel/Access writing formulas functions,etc. the next logical step is to learn VB.

View 6 Replies

Articles To Refer At Beginner Level?

Mar 15, 2011

I am beginner in VB.net and want to learn socket programming suggest me some good articles to refer at beginner level

View 4 Replies

VB Express Beginner Error Handling

Aug 20, 2010

I just need a good nights sleep, but Im simply reading through a file (2010 data) and for selected teams, accessing the corresponding data for the previous year (2009 data), which is held on a separate file. (I painstakingly input all the 2009 data manually)

ds1.Clear()
cmd1.CommandText = "SELECT * FROM Teams WHERE Team = ?"
cmd1.Parameters.Add(NewSqlCeParameter("Team", (ds.Tables(0).Rows(x) ("Team"))))
cmd1.Prepare()
cmd1.ExecuteNonQuery()

[Code]...

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved