-
How to create a data structure that represent a Customer??
PLz any help in this question i need code of "How to create a data structure that represent a Customer??" that structure will hold variables First Name, Last Name, Order number, Products that are bought, Date and Time.
PLZZZ help
-
When you use the term "data structure", what are you referring to?
Array, vector, list, other "Collection"
or
Struct or Class or other Abstract Data Type?
-
I mean a Collection that can hold those all variables that i mentioned.......... plz help.......... if u can
-
I believe he means a Class. Read chapter 1 of any Java book or ask your teacher.
Code:
public class ClassName
{
//everything inside these curly brackets is the body of the class
//the body is where you create methods (functions) and define variables
//example of declaring a variable
dataType variablename;
String name;
}
-
 Originally Posted by Phaelax
I believe he means a Class. Read chapter 1 of any Java book or ask your teacher.
Code:
public class ClassName
{
//everything inside these curly brackets is the body of the class
//the body is where you create methods (functions) and define variables
//example of declaring a variable
dataType variablename;
String name;
}
Thnx for help but i dont mean a class.......... i want to create a table........ Named Customer......... that have various coloumns named First name, last name, etc............ i want code for that.......... so plz if u can help
-
Two dimensional array would do very well, if you are keeping data on a number of Customers - store all values as Strings
-
PLz provide me code for that................ plzzzzzzzz
-
Your 2-D array will have the "row" array - in effect, the first column of the array, from 0 to however many customers you have; the second array will have six elements
Here is a suggestion about how to declare and prime the array, for 20 customers:
Code:
String [][] customers = new String[20][6];
customers[0] = {"First Name", "Last Name", "Order Number",
"Product Purchased", "Date", "Time"};
Similar Threads
-
By helme_syahiemie in forum VB Classic
Replies: 1
Last Post: 01-03-2007, 11:49 AM
-
By kenn_rosie in forum .NET
Replies: 0
Last Post: 03-02-2006, 03:29 PM
-
Replies: 0
Last Post: 12-27-2005, 05:43 AM
-
Replies: 1
Last Post: 10-06-2005, 09:08 PM
-
By sb in forum VB Classic
Replies: 0
Last Post: 07-21-2000, 04:29 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks