473,883 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with Class Project!

15 New Member
OK, so I'm very new to Java programming and I've been able to squeek by so far, but I'm completely stuck on this assignment. Here is the assignment that is due this week -
• Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory.

• Create a method to calculate the value of the entire inventory.

• Create another method to sort the array items by the name of the product. DON'T use array.sort.

Compile and run the Java program.

And here is my code from last week -

Expand|Select|Wrap|Line Numbers
  1. //Inventory Program Part 1
  2.  
  3.  
  4. class Inventory
  5.  
  6. {
  7.     private String Name; //stores DVD name
  8.     private long itemNumber; //stores item number
  9.     private long stockQuantity; //stores quanity in stock
  10.     private double dvdPrice; //stores DVD price
  11.     public Inventory ()
  12.  
  13.     {
  14.         Name = "";
  15.         itemNumber = 0L;
  16.         stockQuantity = 0L;
  17.         dvdPrice = 0.0;
  18.         }
  19.            public Inventory (String Name, long itemNumber, long stockQuantity, double dvdPrice)
  20.               {
  21.                  this.Name = Name;
  22.                  this.itemNumber = itemNumber;
  23.                  this.stockQuantity = stockQuantity;
  24.                  this.dvdPrice = dvdPrice;
  25.            }
  26.  
  27.  
  28.           public void setItemName(String Name)  //Method to set and get the item name
  29.            {
  30.               this.Name = Name;
  31.            }
  32.            public String getItemName()
  33.            {
  34.               return Name;
  35.            }
  36.  
  37.  
  38.            public void setItemNumber(long itemNumber)  //Method to set and get the item number
  39.            {
  40.               itemNumber = itemNumber;
  41.            }
  42.            public long getItemNumber()
  43.            {
  44.               return itemNumber;
  45.            }
  46.  
  47.  
  48.            public void setStockQuantity(long quantity)  //Method to set and get the quantity in stock
  49.            {
  50.               stockQuantity = stockQuantity;
  51.            }
  52.            public long getStockQuantity()
  53.            {
  54.               return stockQuantity;
  55.            }
  56.  
  57.  
  58.            public void setItemPrice(double dvdPrice)  //Method to set and get the item price
  59.            {
  60.               this.dvdPrice = dvdPrice;
  61.            }
  62.            public double getItemPrice()
  63.            {
  64.               return dvdPrice;
  65.            }
  66.  
  67.  
  68.            public double calculateInventoryValue()  //Method to calculate the value of the in stock inventory
  69.            {
  70.               return dvdPrice * stockQuantity;
  71.            }
  72.  
  73.         }//end class Inventory
  74.  
  75.  
  76.         public class Inventory1
  77.  
  78.  
  79.         {
  80.  
  81.            public static void main( String args[])
  82.            {
  83.  
  84.             Inventory p = new Inventory("24: Season 4", 1, 10, 24.99); //Lists 1st DVD inventory information
  85.             System.out.println();
  86.             System.out.print( "Inventory of DVD Movies: " ); //display title
  87.             System.out.printf("\n\nDVD Title:         %s\n",p.getItemName()); //display DVD title
  88.             System.out.printf("Item Number:       %s\n",p.getItemNumber()); //display item number
  89.             System.out.printf("Quantity in Stock: %s\n",p.getStockQuantity()); //display quantity in stock
  90.             System.out.printf("Item Price:        $%.2f\n",p.getItemPrice()); //display DVD price
  91.             System.out.printf("Inventory Value:   $%.2f\n",p.calculateInventoryValue()); //display total value of inventory for item
  92.             System.out.println();
  93.             System.out.println();
  94.  
  95.            }
  96. }//end class Inventory1
Can somebody please help me get to the next step!! Many thanks in advance!! :)
Jan 24 '07 #1
38 4251
r035198x
13,262 MVP
OK, so I'm very new to Java programming and I've been able to squeek by so far, but I'm completely stuck on this assignment. Here is the assignment that is due this week -
• Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory.

• Create a method to calculate the value of the entire inventory.

• Create another method to sort the array items by the name of the product. DON'T use array.sort.

Compile and run the Java program.

And here is my code from last week -

//Inventory Program Part 1


class Inventory

{
private String Name; //stores DVD name
private long itemNumber; //stores item number
private long stockQuantity; //stores quanity in stock
private double dvdPrice; //stores DVD price
public Inventory ()

{
Name = "";
itemNumber = 0L;
stockQuantity = 0L;
dvdPrice = 0.0;
}
public Inventory (String Name, long itemNumber, long stockQuantity, double dvdPrice)
{
this.Name = Name;
this.itemNumber = itemNumber;
this.stockQuant ity = stockQuantity;
this.dvdPrice = dvdPrice;
}


public void setItemName(Str ing Name) //Method to set and get the item name
{
this.Name = Name;
}
public String getItemName()
{
return Name;
}


public void setItemNumber(l ong itemNumber) //Method to set and get the item number
{
itemNumber = itemNumber;
}
public long getItemNumber()
{
return itemNumber;
}


public void setStockQuantit y(long quantity) //Method to set and get the quantity in stock
{
stockQuantity = stockQuantity;
}
public long getStockQuantit y()
{
return stockQuantity;
}


public void setItemPrice(do uble dvdPrice) //Method to set and get the item price
{
this.dvdPrice = dvdPrice;
}
public double getItemPrice()
{
return dvdPrice;
}


public double calculateInvent oryValue() //Method to calculate the value of the in stock inventory
{
return dvdPrice * stockQuantity;
}

}//end class Inventory


public class Inventory1


{

public static void main( String args[])
{

Inventory p = new Inventory("24: Season 4", 1, 10, 24.99); //Lists 1st DVD inventory information
System.out.prin tln();
System.out.prin t( "Inventory of DVD Movies: " ); //display title
System.out.prin tf("\n\nDVD Title: %s\n",p.getItem Name()); //display DVD title
System.out.prin tf("Item Number: %s\n",p.getItem Number()); //display item number
System.out.prin tf("Quantity in Stock: %s\n",p.getStoc kQuantity()); //display quantity in stock
System.out.prin tf("Item Price: $%.2f\n",p.getI temPrice()); //display DVD price
System.out.prin tf("Inventory Value: $%.2f\n",p.calc ulateInventoryV alue()); //display total value of inventory for item
System.out.prin tln();
System.out.prin tln();

}
}//end class Inventory1


Can somebody please help me get to the next step!! Many thanks in advance!! :)
Hi next time you post code please remember to use code tags. Now for your problem please read this and post if you still need any help.
Jan 24 '07 #2
JenniferT
15 New Member
Hi next time you post code please remember to use code tags. Now for your problem please read this and post if you still need any help.

Yes, I read through that whole post and it did not help much as it's somewhat jumbled. That is the same project I'm working on though. Their part3 is close to what I need, but not quite there.

Can you please explain code tags?
Jan 24 '07 #3
r035198x
13,262 MVP
Yes, I read through that whole post and it did not help much as it's somewhat jumbled. That is the same project I'm working on though. Their part3 is close to what I need, but not quite there.

Can you please explain code tags?
I've just added them to your post there. Every time you make a post and want to include code then just make sure to wrap the code around code tags
Jan 24 '07 #4
JenniferT
15 New Member
I've just added them to your post there. Every time you make a post and want to include code then just make sure to wrap the code around code tags
Thanks, I just read the code tags rule to the right! Shows you how observant I am!
Jan 24 '07 #5
JenniferT
15 New Member
Thanks, I just read the code tags rule to the right! Shows you how observant I am!
OK, I've been playing around with some of the code and I'm making progress. Here's what I have now. I would like to display the total amount at the bottom instead of the top and display the list as is then display as sorted. I also can't use the array.sort so I need to sort another way.

I would also like to display the DVD's in a uniform line rather than 1 space after the field:. For example:
DVD Name:___DVD1
Item:________1
Cost:________10 .99
And is there a way to change the field names on the printout? I was able to more easily do this in part1.

Any ideas?


Expand|Select|Wrap|Line Numbers
  1.  
  2. //Inventory2.java
  3.  
  4.  
  5. import java.util.*;
  6. class Product implements Comparable
  7.  
  8. {
  9.    private String name;     // class variable that stores the item name
  10.    private long number;      // class variable that stores the item number
  11.    private long stockQuantity;   // class variable that stores the quantity in stock
  12.    private double price;      // class variable that stores the item price
  13.  
  14.    public Product() // Constructor for the Product class
  15.    {
  16.       name = "";
  17.       number = 0L;
  18.       stockQuantity = 0L;
  19.       price = 0.0;
  20.    }
  21.    public Product(String name, long number, long stockQuantity, double price) // Constructor for the Supplies class
  22.       {
  23.       this.name = name;
  24.       this.number = number;
  25.       this.stockQuantity = stockQuantity;
  26.       this.price = price;
  27.          }
  28.  
  29.    public void setItemName(String name)  // Method to set the item name
  30.    {
  31.       this.name = name;
  32.    }
  33.    public String getItemName()  // Method to get the item name
  34.    {
  35.       return name;
  36.    }
  37.  
  38.  
  39.    public void setItemNumber(long number)  // Method to set the item number
  40.    {
  41.       this.number = number;
  42.    }
  43.    public long getItemNumber()  // Method to get the item number
  44.    {
  45.       return number;
  46.    }
  47.  
  48.  
  49.    public void setStockQuantity(long quantity)  // Method to set the quantity in stock
  50.    {
  51.       stockQuantity = quantity;
  52.    }
  53.    public long getStockQuantity()  // Method to get the quantity in stock
  54.    {
  55.       return stockQuantity;
  56.    }
  57.  
  58.  
  59.    public void setItemPrice(double price)  // Method to set the item price
  60.    {
  61.       this.price = price;
  62.    }
  63.    public double getItemPrice()  // Method to get the item price
  64.    {
  65.       return price;
  66.    }
  67.  
  68.  
  69.    public double calculateInventoryValue()  // Method to calculate the value of the inventory
  70.    {
  71.       return price * stockQuantity;
  72.    }
  73.    public int compareTo (Object o)
  74.    {
  75.  
  76.  
  77.    Product p = (Product)o;
  78.       return name.compareTo(p.getItemName());
  79.    }
  80.  
  81.    public String toString()
  82.    {
  83.       return "DVD Title: "+name + "\nNumber: "+number+"\nPrice: $"+price+"\nQuantity: "+stockQuantity + "\nValue: $"+calculateInventoryValue();
  84.    }
  85.  
  86. }//end class Product
  87.  
  88. public class Inventory2
  89. {
  90.    // main methods begins execution of java application
  91.    public static void main( String args[])
  92.    {
  93.  
  94.    Product[] supplies = new Product[3];
  95.  
  96.    Product p1 = new Product("DVD1", 1, 11, 10.99);
  97.    Product p2 = new Product("DVD2", 2, 22, 20.99);
  98.    Product p3 = new Product("DVD3", 3, 33, 30.99);
  99.  
  100.    supplies[0] = p1;
  101.    supplies[1] = p2;
  102.    supplies[2] = p3;
  103.  
  104.    double total = 0.0;
  105.  
  106.    for(int i= 0; i < 3;i++)
  107.    {
  108.    total = total + supplies[i].calculateInventoryValue();
  109.    }
  110.  
  111.   System.out.println("Total Value is: $"+total);
  112.  
  113.   Arrays.sort(supplies);
  114.  
  115.     for(Product p: supplies)
  116.     {
  117.     System.out.println(p);
  118.     System.out.println();
  119.     }
  120.  
  121.    } // end main method
  122. }//end class Inventory2
  123.  
  124.  
Jan 24 '07 #6
JenniferT
15 New Member
OK, I'm making some progress. I still need to sort without using array.sort. I tried a bubble sort which I kept in there, but it wouldn't work for me. And I would still like to know how to allign the names better.
Here is what I just came up with:

Expand|Select|Wrap|Line Numbers
  1.  
  2. //Inventory2.java
  3.  
  4.  
  5. import java.util.*;
  6. class Product implements Comparable
  7.  
  8. {
  9.    private String name;     // class variable that stores the item name
  10.    private long number;      // class variable that stores the item number
  11.    private long stockQuantity;   // class variable that stores the quantity in stock
  12.    private double price;      // class variable that stores the item price
  13.  
  14.    public Product() // Constructor for the Product class
  15.    {
  16.       name = "";
  17.       number = 0L;
  18.       stockQuantity = 0L;
  19.       price = 0.0;
  20.    }
  21.    public Product(String name, long number, long stockQuantity, double price) // Constructor for the Supplies class
  22.       {
  23.       this.name = name;
  24.       this.number = number;
  25.       this.stockQuantity = stockQuantity;
  26.       this.price = price;
  27.          }
  28.  
  29.    public void setItemName(String name)  // Method to set the item name
  30.    {
  31.       this.name = name;
  32.    }
  33.    public String getItemName()  // Method to get the item name
  34.    {
  35.       return name;
  36.    }
  37.  
  38.  
  39.    public void setItemNumber(long number)  // Method to set the item number
  40.    {
  41.       this.number = number;
  42.    }
  43.    public long getItemNumber()  // Method to get the item number
  44.    {
  45.       return number;
  46.    }
  47.  
  48.  
  49.    public void setStockQuantity(long quantity)  // Method to set the quantity in stock
  50.    {
  51.       stockQuantity = quantity;
  52.    }
  53.    public long getStockQuantity()  // Method to get the quantity in stock
  54.    {
  55.       return stockQuantity;
  56.    }
  57.  
  58.  
  59.    public void setItemPrice(double price)  // Method to set the item price
  60.    {
  61.       this.price = price;
  62.    }
  63.    public double getItemPrice()  // Method to get the item price
  64.    {
  65.       return price;
  66.    }
  67.  
  68.  
  69.    public double calculateInventoryValue()  // Method to calculate the value of the inventory
  70.    {
  71.       return price * stockQuantity;
  72.    }
  73.    public int compareTo (Object o)
  74.    {
  75.  
  76.  
  77.    Product p = (Product)o;
  78.       return name.compareTo(p.getItemName());
  79.    }
  80.  
  81.    public String toString()
  82.    {
  83.       return "DVD Title: "+name + "\nNumber: "+number+"\nPrice: $"+price+"\nQuantity: "+stockQuantity + "\nValue: $"+calculateInventoryValue();
  84.    }
  85.  
  86. }//end class Product
  87.  
  88. public class Inventory2
  89. {
  90.    // main methods begins execution of java application
  91.    public static void main( String args[])
  92.    {
  93.  
  94.    Product[] supplies = new Product[3];
  95.  
  96.    Product p1 = new Product("cDVD3", 1, 11, 10.99);
  97.    Product p2 = new Product("aDVD2", 2, 22, 20.99);
  98.    Product p3 = new Product("bDVD1", 3, 33, 30.99);
  99.  
  100.    supplies[0] = p1;
  101.    supplies[1] = p2;
  102.    supplies[2] = p3;
  103.  
  104.  //  product temp[] supplies = new product[1];
  105.  
  106.    double total = 0.0;
  107.  
  108.    for(int i= 0; i < 3;i++)
  109.    {
  110.    total = total + supplies[i].calculateInventoryValue();
  111.    }
  112.  
  113.  
  114.  
  115.       for(Product p: supplies)
  116.       {
  117.       System.out.println(p);
  118.       System.out.println();
  119.     }
  120.  
  121.  Arrays.sort(supplies);
  122. //        sorting the array using Bubble Sort
  123.     //    for(int j = 0; j < supplies.length - 1; j++)
  124.     //    {
  125. //
  126.     //        for(int k = 0; k < supplies.length - 1; k++)
  127.     //        {
  128. //
  129.     //            if(supplies[k].getItemName().compareToIgnoreCase(supplies[k+1].getItemName()) > 0)
  130.     //            {
  131. //
  132.     //                temp[0] = supplies[k];
  133.     //                supplies[k] = supplies[k+1];
  134.     //                supplies[k+1] = temp[0];
  135. //
  136.     //            }//end if
  137. //
  138.     //        }//end for loop
  139. //
  140.     //    }//end for loop
  141.  
  142.  
  143.  
  144.  
  145.  
  146.     for(Product p: supplies)
  147.     {
  148.     System.out.println(p);
  149.     System.out.println();
  150.     }
  151.  
  152.  
  153.    System.out.println("Total Value is: $"+total);
  154.  
  155.  
  156.    } // end main method
  157. }//end class Inventory2
  158.  
  159.  
Jan 24 '07 #7
DeMan
1,806 Top Contributor
Are you posting this because the sort doesn't work?
Does it alter the order at all?

Not sure why you have 2 loops around the sort....
Jan 24 '07 #8
DeMan
1,806 Top Contributor
You will need two loops (my mistake) but in your code one of them does nothing.
Try Something like this (which I think is cliose to yours, so you were on the right track):

Expand|Select|Wrap|Line Numbers
  1. swapped = false;
  2. do
  3. {
  4.     swapped = false;
  5.     for(int i=0; i<supplies.length; i++)
  6.     {
  7.       if(supplies[i].getItemName().compareToIgnoreCase( supplies[i+1].getItemName()) >0)
  8.       {
  9.         temp[0] = supplies[k];
  10.         supplies[k] = supplies[k+1];
  11.         supplies[k+1] = temp[0];
  12.         swapped = true;
  13.       }//end if
  14.     }//end for loop
  15. } while(swapped == false);
  16.  
  17.  
Jan 24 '07 #9
JenniferT
15 New Member
Yes, the array.sort does work fine, but for some reason we are not allowed to use that method to sort.

I get a bunch of errors when I insert your code. Here's what I get:
C:\Inventory2.j ava:142: cannot find symbol
symbol : variable swapped
location: class Inventory2
swapped = false;
^
C:\Inventory2.j ava:145: cannot find symbol
symbol : variable swapped
location: class Inventory2
swapped = false;
^
C:\Inventory2.j ava:150: cannot find symbol
symbol : variable temp
location: class Inventory2
temp[0] = supplies[k];
^
C:\Inventory2.j ava:150: cannot find symbol
symbol : variable k
location: class Inventory2
temp[0] = supplies[k];
^
C:\Inventory2.j ava:151: cannot find symbol
symbol : variable k
location: class Inventory2
supplies[k] = supplies[k+1];
^
C:\Inventory2.j ava:151: cannot find symbol
symbol : variable k
location: class Inventory2
supplies[k] = supplies[k+1];
^
C:\Inventory2.j ava:151: incompatible types
found : <nulltype>
required: int
supplies[k] = supplies[k+1];
^
C:\Inventory2.j ava:152: cannot find symbol
symbol : variable k
location: class Inventory2
supplies[k+1] = temp[0];
^
C:\Inventory2.j ava:152: incompatible types
found : <nulltype>
required: int
supplies[k+1] = temp[0];
^
C:\Inventory2.j ava:152: cannot find symbol
symbol : variable temp
location: class Inventory2
supplies[k+1] = temp[0];
^
C:\Inventory2.j ava:153: cannot find symbol
symbol : variable swapped
location: class Inventory2
swapped = true;
^
C:\Inventory2.j ava:156: cannot find symbol
symbol : variable swapped
location: class Inventory2
} while(swapped == false);
^
12 errors

Tool completed with exit code 1

And here's the code I was using if you want to compile it yourself:

Expand|Select|Wrap|Line Numbers
  1. //Inventory2.java
  2.  
  3.  
  4. import java.util.*;
  5. class Product implements Comparable
  6.  
  7. {
  8.    private String name;     // class variable that stores the item name
  9.    private long number;      // class variable that stores the item number
  10.    private long stockQuantity;   // class variable that stores the quantity in stock
  11.    private double price;      // class variable that stores the item price
  12.  
  13.    public Product() // Constructor for the Product class
  14.    {
  15.       name = "";
  16.       number = 0L;
  17.       stockQuantity = 0L;
  18.       price = 0.0;
  19.    }
  20.    public Product(String name, long number, long stockQuantity, double price) // Constructor for the Supplies class
  21.       {
  22.       this.name = name;
  23.       this.number = number;
  24.       this.stockQuantity = stockQuantity;
  25.       this.price = price;
  26.          }
  27.  
  28.    public void setItemName(String name)  // Method to set the item name
  29.    {
  30.       this.name = name;
  31.    }
  32.    public String getItemName()  // Method to get the item name
  33.    {
  34.       return name;
  35.    }
  36.  
  37.  
  38.    public void setItemNumber(long number)  // Method to set the item number
  39.    {
  40.       this.number = number;
  41.    }
  42.    public long getItemNumber()  // Method to get the item number
  43.    {
  44.       return number;
  45.    }
  46.  
  47.  
  48.    public void setStockQuantity(long quantity)  // Method to set the quantity in stock
  49.    {
  50.       stockQuantity = quantity;
  51.    }
  52.    public long getStockQuantity()  // Method to get the quantity in stock
  53.    {
  54.       return stockQuantity;
  55.    }
  56.  
  57.  
  58.    public void setItemPrice(double price)  // Method to set the item price
  59.    {
  60.       this.price = price;
  61.    }
  62.    public double getItemPrice()  // Method to get the item price
  63.    {
  64.       return price;
  65.    }
  66.  
  67.  
  68.    public double calculateInventoryValue()  // Method to calculate the value of the inventory
  69.    {
  70.       return price * stockQuantity;
  71.    }
  72.    public int compareTo (Object o)
  73.    {
  74.  
  75.  
  76.    Product p = (Product)o;
  77.       return name.compareTo(p.getItemName());
  78.    }
  79.  
  80.    public String toString()
  81.    {
  82.       return "DVD Title: "+name + "\nNumber: "+number+"\nPrice: $"+price+"\nQuantity: "+stockQuantity + "\nValue: $"+calculateInventoryValue();
  83.    }
  84.  
  85. }//end class Product
  86.  
  87. public class Inventory2
  88. {
  89.    // main methods begins execution of java application
  90.    public static void main( String args[])
  91.    {
  92.  
  93.    Product[] supplies = new Product[3];
  94.  
  95.    Product p1 = new Product("cDVD3", 1, 11, 10.99);
  96.    Product p2 = new Product("aDVD2", 2, 22, 20.99);
  97.    Product p3 = new Product("bDVD1", 3, 33, 30.99);
  98.  
  99.    supplies[0] = p1;
  100.    supplies[1] = p2;
  101.    supplies[2] = p3;
  102.  
  103.  //  product temp[] supplies = new product[1];
  104.  
  105.    double total = 0.0;
  106.  
  107.    for(int i= 0; i < 3;i++)
  108.    {
  109.    total = total + supplies[i].calculateInventoryValue();
  110.    }
  111.  
  112.  
  113.  
  114.       for(Product p: supplies)
  115.       {
  116.       System.out.println(p);
  117.       System.out.println();
  118.     }
  119. //OLD CODE-------------------------------------
  120.  //Arrays.sort(supplies);
  121. //        sorting the array using Bubble Sort
  122.     //    for(int j = 0; j < supplies.length - 1; j++)
  123.     //    {
  124. //
  125.     //        for(int k = 0; k < supplies.length - 1; k++)
  126.     //        {
  127. //
  128.     //            if(supplies[k].getItemName().compareToIgnoreCase(supplies[k+1].getItemName()) > 0)
  129.     //            {
  130. //
  131.     //                temp[0] = supplies[k];
  132.     //                supplies[k] = supplies[k+1];
  133.     //                supplies[k+1] = temp[0];
  134. //
  135.     //            }//end if
  136. //
  137.     //        }//end for loop
  138. //
  139.     //    }//end for loop
  140. //END OLD CODE------------------------------------
  141.  
  142.     swapped = false;
  143.     do
  144.     {
  145.         swapped = false;
  146.         for(int i=0; i<supplies.length; i++)
  147.         {
  148.           if(supplies[i].getItemName().compareToIgnoreCase( supplies[i+1].getItemName()) >0)
  149.           {
  150.             temp[0] = supplies[k];
  151.             supplies[k] = supplies[k+1];
  152.             supplies[k+1] = temp[0];
  153.             swapped = true;
  154.           }//end if
  155.         }//end for loop
  156. } while(swapped == false);
  157.  
  158.  
  159.  
  160.  
  161.  
  162.     for(Product p: supplies)
  163.     {
  164.     System.out.println(p);
  165.     System.out.println();
  166.     }
  167.  
  168.  
  169.    System.out.println("Total Value is: $"+total);
  170.  
  171.  
  172.    } // end main method
  173. }//end class Inventory2
  174.  
  175.  
Jan 24 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

48
3263
by: Chad Z. Hower aka Kudzu | last post by:
A few of you may recognize me from the recent posts I have made about Indy <http://www.indyproject.org/indy.html> Those of you coming to .net from the Delphi world know truly how unique and "huge" Indy is both as a project, in support, development, and use. But Indy is new to the .net world. Indy is a HUGE library implementing over 120 internet protocols and standards and comes with complete source. Its an open source project, but not...
5
3490
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices by adding a WebReference, since it does not allow me to keep state (cookiecontainer) or to specify functions on the classes (like if i want to override the ToString() function on a class from my webservice). So the only way i can see how i can get...
5
2400
by: MFC | last post by:
Ok, after three C# books, (C# How to Program, Programming in the Key of C#, and C# Weekend Crash Course) and three weeks, I believe I have tried everything to make a certain form function correctly. I am trying to learn C# after playing around for a bit with procedural programming with PHP, not OOP, and believe I have learned quite a bit in three weeks, just not enough to accomplish this one task. If anyone has a bit of free time and...
2
1611
by: Charles | last post by:
I need to find a way to share information between two classes, one is an employee class and the other is a custom error class that inherits from ApplicationException. These two classes are part of a ClassLibrary project. The other project has all the web page classes. My project allows employees to log in using Forms Auth, I do some checking on the person that is logging in and then after that is good I create an employee object and...
7
1455
by: moondaddy | last post by:
I want to create a public enum that can be used throughout a project. I created an enum like this in a module: Public Enum ParentType Project = 0 Stage = 1 VIP = 2 Func = 3 Equipment = 4 Idea = 5
12
5351
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded the custom employee class and have built it as a separate library (employee.dll). This employee.dll is being referenced by both the web service and the windows application. I face the following problem when I send this class to the webservice.
3
4420
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing version numbers on anything. The errors come and go with no apparent rhyme or reason. We do not...
17
2552
by: Student | last post by:
Hi All, I have an assignment for my Programming language project to create a compiler that takes a C++ file as input and translate it into the C file. Here I have to take care of inheritance and operator overloading and virtual functions. I mean it should not hamper the C++ meaning. In frank and simple terms i need to implement a small C++ compiler in C++, and i want the intermediate representation to be C. Please help me in this....
8
3496
by: Brett Romero | last post by:
I have this situation: myEXE <needs< DerivedClass <which needs< BaseClass Meaning, myEXE is using a type defined in DerivedClass, which inherits from BaseClass. I include a reference to DerivedClass in myEXE, which gives this error: The type 'BaseAssembly.SomeClass' is defined in an assembly that is not referenced. You must add a reference to assembly 'BaseAssembly,
1
1200
by: lxxslay3rxxl | last post by:
Let's say I haf 3 project that I wan to list, each project should have 1 value assign to it, but if i remove 1 of the value for 1 of the project, and i tried to list all 3 projects, I get this error: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. This is my code: <% call OpenDB() set rs = Server.CreateObject("ADODB.recordset") sql="SELECT * FROM project ORDER BY id"...
0
9948
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9798
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10864
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9588
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7980
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7137
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
4230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.