473,326 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

subclass confusion

I need to make a subclass for the following code. I was planning on using the extends keyword but the instructor says to use =new keyword. I do not understand the = new keyword. Can someone please explain the difference and possibly provide an example based on the following code.
Expand|Select|Wrap|Line Numbers
  1.  import java.util.Scanner;
  2.  
  3. public class inventorysupplys2 { // start of class
  4.  
  5.  
  6.     public static void main(String[] args) { // start of program
  7.  
  8.         Scanner input = new Scanner( System.in );
  9.          int c;
  10.         System.out.printf( "\n\nHow many new movies do you want to enter? ");
  11.         c = input.nextInt();
  12.         input.nextLine(); 
  13.         inventorysupplystock2[] supply = new inventorysupplystock2[c];
  14.  
  15.  
  16.         String name;              // for the name
  17.         double number;            // for the item number
  18.         double quantity;          // number of units in stock
  19.         double price;             // price per item
  20.         double value = 0;         // value of that item
  21.         double totalValue = 0;    // value of whole inventory
  22.  
  23.         int a = 0;
  24.         while (a < c){ // start of the loop getting the info for how ever many you are putting in
  25.  
  26.             supply[a] = new inventorysupplystock2();
  27.  
  28.             System.out.printf( "What is the name of the movie being entered: ");
  29.             name = input.nextLine();
  30.             supply[a].setName(name);
  31.  
  32.             System.out.printf( "What will be this movie's item number: ");
  33.             number = input.nextDouble();
  34.             input.nextLine(); 
  35.             supply[a].setNumber(number);
  36.  
  37.             System.out.printf( "How many are you entering into stock: ");
  38.             quantity = input.nextDouble();
  39.             input.nextLine(); 
  40.             supply[a].setquantity(quantity);
  41.  
  42.             System.out.printf( "How much did this movie cost: ");
  43.             price = input.nextDouble();
  44.             input.nextLine(); 
  45.             supply[a].setPrice(price);
  46.  
  47.             value = supply[a].getquantity() * supply[a].getPrice();
  48.  
  49.             supply[a].setValue(value);
  50.  
  51.             supply[a].setCount(a);
  52.  
  53.             a++;
  54.  
  55.         } // end of loop getting info
  56.  
  57.         java.util.Arrays.sort(supply); //this sorts the stuff
  58.         System.out.printf( "Item number  Name   Quantity  Price  Value \n");
  59.  
  60.         a = 0;
  61.         while (a < c){ // total value of inventory
  62.         supply[a].displayItems();
  63.  
  64.         totalValue += supply[a].getValue();
  65.  
  66.         a++;
  67.         } 
  68.  
  69.  
  70.  
  71.         // total value
  72.         System.out.printf( "The total value of the inventory is: %.2f", totalValue );
  73.     } // end of program
  74.  
  75. } // end of class
  76.  
  77.  
  78. ************************************************************
  79.  
  80. public class inventorysupplystock2 implements Comparable{ 
  81.          protected  int count;
  82.          protected  int quantity;
  83.          protected  String productName;
  84.          protected  double itemNumber;
  85.          protected  double quantityNumber;
  86.          protected  double unitPrice;
  87.          protected  double unitValue;
  88.  
  89.  
  90.         public inventorysupplystock2() {
  91.  
  92.     }
  93.  
  94.     public int compareTo(Object o) {
  95.     return productName.compareTo(((inventorysupplystock2) o).getName());
  96.     }
  97.  
  98.     public void displayItems(){
  99.         System.out.printf( "%-2s           %-2s       %-2s      %.2f     %.2f\n",
  100.                 itemNumber, productName,
  101.                 quantityNumber, unitPrice, unitValue);
  102.     }
  103.     // total value per movie
  104.     public void setValue(double value){
  105.         unitValue = value;
  106.  
  107.     }
  108.  
  109.     public double getValue(){
  110.  
  111.           return unitValue;
  112.     }
  113.  
  114.     public void setCount( int a ){
  115.         count = a;
  116.     }
  117.  
  118.  
  119.     // movie name
  120.     public void setName( String name ) {
  121.  
  122.         productName = name;
  123.     }
  124.     public String getName() {
  125.  
  126.         return productName;
  127.     }
  128.     // item number
  129.     public void setNumber( double number ) {
  130.  
  131.         itemNumber = number;
  132.     }
  133.     public double getNumber() {
  134.  
  135.         return itemNumber;
  136.     }
  137.     // quantity of that movie
  138.     public void setquantity( double quantity ) {
  139.  
  140.         quantityNumber = quantity;
  141.     }
  142.     public double getquantity() {
  143.  
  144.         return quantityNumber;
  145.     }
  146.     // price for that movie
  147.     public void setPrice( double price ) {
  148.  
  149.         unitPrice = price;
  150.     }
  151.     public double getPrice(){
  152.  
  153.         return unitPrice;
  154.     }
  155. }
  156.  
  157.  
  158.  
Nov 3 '06 #1
10 3266
sicarie
4,677 Expert Mod 4TB
I need to make a subclass for the following code. I was planning on using the extends keyword but the instructor says to use =new keyword. I do not understand the = new keyword. Can someone please explain the difference and possibly provide an example based on the following code.
Expand|Select|Wrap|Line Numbers
  1.  import java.util.Scanner;
  2.  
  3. public class inventorysupplys2 { // start of class
  4.  
  5.  
  6.     public static void main(String[] args) { // start of program
  7.  
  8.         Scanner input = new Scanner( System.in );
  9.          int c;
  10.         System.out.printf( "\n\nHow many new movies do you want to enter? ");
  11.         c = input.nextInt();
  12.         input.nextLine(); 
  13.         inventorysupplystock2[] supply = new inventorysupplystock2[c];
  14.  
  15.  
  16.         String name;              // for the name
  17.         double number;            // for the item number
  18.         double quantity;          // number of units in stock
  19.         double price;             // price per item
  20.         double value = 0;         // value of that item
  21.         double totalValue = 0;    // value of whole inventory
  22.  
  23.         int a = 0;
  24.         while (a < c){ // start of the loop getting the info for how ever many you are putting in
  25.  
  26.             supply[a] = new inventorysupplystock2();
  27.  
  28.             System.out.printf( "What is the name of the movie being entered: ");
  29.             name = input.nextLine();
  30.             supply[a].setName(name);
  31.  
  32.             System.out.printf( "What will be this movie's item number: ");
  33.             number = input.nextDouble();
  34.             input.nextLine(); 
  35.             supply[a].setNumber(number);
  36.  
  37.             System.out.printf( "How many are you entering into stock: ");
  38.             quantity = input.nextDouble();
  39.             input.nextLine(); 
  40.             supply[a].setquantity(quantity);
  41.  
  42.             System.out.printf( "How much did this movie cost: ");
  43.             price = input.nextDouble();
  44.             input.nextLine(); 
  45.             supply[a].setPrice(price);
  46.  
  47.             value = supply[a].getquantity() * supply[a].getPrice();
  48.  
  49.             supply[a].setValue(value);
  50.  
  51.             supply[a].setCount(a);
  52.  
  53.             a++;
  54.  
  55.         } // end of loop getting info
  56.  
  57.         java.util.Arrays.sort(supply); //this sorts the stuff
  58.         System.out.printf( "Item number  Name   Quantity  Price  Value \n");
  59.  
  60.         a = 0;
  61.         while (a < c){ // total value of inventory
  62.         supply[a].displayItems();
  63.  
  64.         totalValue += supply[a].getValue();
  65.  
  66.         a++;
  67.         } 
  68.  
  69.  
  70.  
  71.         // total value
  72.         System.out.printf( "The total value of the inventory is: %.2f", totalValue );
  73.     } // end of program
  74.  
  75. } // end of class
  76.  
  77.  
  78. ************************************************************
  79.  
  80. public class inventorysupplystock2 implements Comparable{ 
  81.          protected  int count;
  82.          protected  int quantity;
  83.          protected  String productName;
  84.          protected  double itemNumber;
  85.          protected  double quantityNumber;
  86.          protected  double unitPrice;
  87.          protected  double unitValue;
  88.  
  89.  
  90.         public inventorysupplystock2() {
  91.  
  92.     }
  93.  
  94.     public int compareTo(Object o) {
  95.     return productName.compareTo(((inventorysupplystock2) o).getName());
  96.     }
  97.  
  98.     public void displayItems(){
  99.         System.out.printf( "%-2s           %-2s       %-2s      %.2f     %.2f\n",
  100.                 itemNumber, productName,
  101.                 quantityNumber, unitPrice, unitValue);
  102.     }
  103.     // total value per movie
  104.     public void setValue(double value){
  105.         unitValue = value;
  106.  
  107.     }
  108.  
  109.     public double getValue(){
  110.  
  111.           return unitValue;
  112.     }
  113.  
  114.     public void setCount( int a ){
  115.         count = a;
  116.     }
  117.  
  118.  
  119.     // movie name
  120.     public void setName( String name ) {
  121.  
  122.         productName = name;
  123.     }
  124.     public String getName() {
  125.  
  126.         return productName;
  127.     }
  128.     // item number
  129.     public void setNumber( double number ) {
  130.  
  131.         itemNumber = number;
  132.     }
  133.     public double getNumber() {
  134.  
  135.         return itemNumber;
  136.     }
  137.     // quantity of that movie
  138.     public void setquantity( double quantity ) {
  139.  
  140.         quantityNumber = quantity;
  141.     }
  142.     public double getquantity() {
  143.  
  144.         return quantityNumber;
  145.     }
  146.     // price for that movie
  147.     public void setPrice( double price ) {
  148.  
  149.         unitPrice = price;
  150.     }
  151.     public double getPrice(){
  152.  
  153.         return unitPrice;
  154.     }
  155. }
  156.  
  157.  
  158.  
Are you sure that your professor was referring to the code of the subclass when you were told to use 'new'? Generally the 'new' keyword is used when declaring an object, such as in your code above:

Expand|Select|Wrap|Line Numbers
  1.         Scanner input = new Scanner( System.in );
  2.  
This code will create a Scanner on the heap. However, if you are writing a subclass, your inclination was correct (though I would suggest this article ' http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html' if you are considering 'extends' and instead suggest 'implements' as inventorysupply2 does to Comparable.)

Expand|Select|Wrap|Line Numbers
  1. public class ExampleClass extends inventorysupply2 /*or Comparable, if that's what you want here */{
  2.  
  3. // methods, variables, and other things in here
  4.  
  5. }
  6.  
  7.  
Was your professor possibly telling you to use 'new' when instantiating your subclass in your final program?
Nov 4 '06 #2
Are you sure that your professor was referring to the code of the subclass when you were told to use 'new'? Generally the 'new' keyword is used when declaring an object, such as in your code above:

Expand|Select|Wrap|Line Numbers
  1.         Scanner input = new Scanner( System.in );
  2.  
This code will create a Scanner on the heap. However, if you are writing a subclass, your inclination was correct (though I would suggest this article ' http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html' if you are considering 'extends' and instead suggest 'implements' as inventorysupply2 does to Comparable.)

Expand|Select|Wrap|Line Numbers
  1. public class ExampleClass extends inventorysupply2 /*or Comparable, if that's what you want here */{
  2.  
  3. // methods, variables, and other things in here
  4.  
  5. }
  6.  
  7.  
Was your professor possibly telling you to use 'new' when instantiating your subclass in your final program?
all i know u he said "You do not need to use the extends keyword. The file with the static void main will call the otherfile.java into existence via the =New keyword." so i am very ocnfused now about how to add this subclass
Nov 4 '06 #3
r035198x
13,262 8TB
all i know u he said "You do not need to use the extends keyword. The file with the static void main will call the otherfile.java into existence via the =New keyword." so i am very ocnfused now about how to add this subclass
1) You do not make a subclass of code but of a class
2)You cannot make a subclass without using extends
3)Perhaps you are supposed to come up with a different type of inventorysupplystock2 class and replace the current one with the new one in the main method. (All which have nothing to do with subclassing)
Nov 4 '06 #4
1) You do not make a subclass of code but of a class
2)You cannot make a subclass without using extends
3)Perhaps you are supposed to come up with a different type of inventorysupplystock2 class and replace the current one with the new one in the main method. (All which have nothing to do with subclassing)
This is what I have to do modify the inventory program by creating a subclass of product class that uses one additional unique feature of the product you choose (for the DVDs subclass you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a %5 restocking fee to the value of the inventory of that product. This is what I have so far can I get some help with a few errors?
Expand|Select|Wrap|Line Numbers
  1. public class inventorysubclass extends inventorysupplys2{ 
  2.  
  3.      protected String Title;
  4.      protected string Genre;
  5.      protected double value;
  6.      protected double restockingfee;
  7.  
  8.      // four-argument contructor
  9.      public Title (String Title, String Genre, String Genre, double value, double restockingfee)
  10.      {
  11.     //implicit call to DVD contructor occurs here
  12.     Title = Title;
  13.     Genre = Genre
  14.     setValue(value); //validate value of DVD
  15.     setRestockingFee(rate); //validate and store restocking fee
  16.      } // end four-argument MoviteTitle contructor
  17.  
  18.      // set title
  19.      public void setTitle(String first)
  20.      {
  21.     Title=Title;
  22.      } //end method setTitle
  23.  
  24.      // return title
  25.      public String getTitle()
  26.      {
  27.     return Title;
  28.      } //end method getTitle
  29.  
  30.      // set Genre
  31.      public void getGenre (String Genre)
  32.      {
  33.     Genre=Genre;
  34.      }
  35.     return Genre;
  36.      } // end method getGenre
  37.  
  38.      //set value of Dvd
  39.      public void setValue (double value)
  40.      {
  41.     return Value;
  42.      } // end method getValue
  43.  
  44.      // set restocking fee
  45.      public void setRestockingFee(double restockingfee)
  46.      {
  47.     resstockingFee = (value * 5%)
  48.      } // end method setRestockingFee
  49.  
  50.      // return restocking fee
  51.      public double getRestockingFee()
  52.      {
  53.     return restockingFee;
  54.      } // end method getRestockingFee
  55.  
  56.      // caluculate value + restocking fee
  57.      public double total()
  58.      {
  59.     return restockingFee * Value;
  60.      } // end method total
  61.  
Nov 4 '06 #5
r035198x
13,262 8TB
This is what I have to do modify the inventory program by creating a subclass of product class that uses one additional unique feature of the product you choose (for the DVDs subclass you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a %5 restocking fee to the value of the inventory of that product. This is what I have so far can I get some help with a few errors?
Expand|Select|Wrap|Line Numbers
  1. public class inventorysubclass extends inventorysupplys2{ 
  2.  
  3. protected String Title;
  4. protected string Genre;
  5. protected double value;
  6. protected double restockingfee;
  7.  
  8. // four-argument contructor
  9. public Title (String Title, String Genre, String Genre, double value, double restockingfee)
  10. {
  11.     //implicit call to DVD contructor occurs here
  12.     Title = Title;
  13.     Genre = Genre
  14.     setValue(value); //validate value of DVD
  15.     setRestockingFee(rate); //validate and store restocking fee
  16. } // end four-argument MoviteTitle contructor
  17.  
  18. // set title
  19. public void setTitle(String first)
  20. {
  21.     Title=Title;
  22. } //end method setTitle
  23.  
  24. // return title
  25. public String getTitle()
  26. {
  27.     return Title;
  28. } //end method getTitle
  29.  
  30. // set Genre
  31. public void getGenre (String Genre)
  32. {
  33.     Genre=Genre;
  34. }
  35.     return Genre;
  36. } // end method getGenre
  37.  
  38. //set value of Dvd
  39. public void setValue (double value)
  40. {
  41.     return Value;
  42. } // end method getValue
  43.  
  44. // set restocking fee
  45. public void setRestockingFee(double restockingfee)
  46. {
  47.     resstockingFee = (value * 5%)
  48. } // end method setRestockingFee
  49.  
  50. // return restocking fee
  51. public double getRestockingFee()
  52. {
  53.     return restockingFee;
  54. } // end method getRestockingFee
  55.  
  56. // caluculate value + restocking fee
  57. public double total()
  58. {
  59.     return restockingFee * Value;
  60. } // end method total
  61.  
Yes you can get help about the errors if you tell us what the errors are.
Nov 6 '06 #6
Yes you can get help about the errors if you tell us what the errors are.
I got the errors worked out but I still can not get the restocking fee working.
Nov 7 '06 #7
r035198x
13,262 8TB
I got the errors worked out but I still can not get the restocking fee working.
Now that you realise that a void method should not return anything, explain then what you mean by can not get the restocking fee working.
Nov 7 '06 #8
Now that you realise that a void method should not return anything, explain then what you mean by can not get the restocking fee working.
I need to add a restocking fee of 5% to this inventory program. I can not seem to get the coding for it right.
Nov 7 '06 #9
r035198x
13,262 8TB
I need to add a restocking fee of 5% to this inventory program. I can not seem to get the coding for it right.
Where are you not getting it right?
If you have the complete program you are testing with, post the code, tell us what you are getting as output and what you want to have as output, then you will get your solution quicker.
Nov 7 '06 #10
Where are you not getting it right?
If you have the complete program you are testing with, post the code, tell us what you are getting as output and what you want to have as output, then you will get your solution quicker.
this is what i have and i can not seem to get the re-stocking fee to work. can i please get some help fixing this. thanks
Expand|Select|Wrap|Line Numbers
  1. public class inventorysupplystock2 implements Comparable{
  2.          protected  int count;
  3.          protected  int quantity;
  4.          protected  String productName;
  5.          protected  String productGenre;
  6.          protected  double itemNumber;
  7.          protected  double quantityNumber;
  8.          protected  double unitPrice;
  9.          protected  double unitValue;
  10.          protected  double restockingFee;
  11.  
  12.         public inventorysupplystock2() {
  13.  
  14.     }
  15.  
  16.     public int compareTo(Object o) {
  17.     return productName.compareTo(((inventorysupplystock2) o).getName());
  18.     }
  19.  
  20.     public void displayItems(){
  21.         System.out.printf( "%-2s           %-2s          %-2s         %-2s        %.2f        %.2f       %.2f\n",
  22.                 itemNumber, productGenre, productName,
  23.                 quantityNumber, unitPrice, unitValue, restockingFee);
  24.     }
  25.     // total value per movie
  26.     public void setValue(double value){
  27.         unitValue = value;
  28.  
  29.     }
  30.  
  31.     public double getValue(){
  32.  
  33.           return unitValue;
  34.     }
  35.  
  36.  public void setRestockingFee(double restockingfee)
  37.      {
  38.     restockingFee = (restockingfee * 1.05);
  39.      } // end method setRestockingFee
  40.  
  41.      // return restocking fee
  42.      public double getRestockingFee()
  43.      {
  44.     return restockingFee;
  45.      } // end method getRestockingFee
  46.  
  47.      // caluculate value + restocking fee
  48.      public double total()
  49.      {
  50.     return restockingFee * 1.05;
  51.      } // end method total
  52.  
  53.     public void setCount( int a ){
  54.         count = a;
  55.     }
  56.  
  57.  
  58.     // movie name
  59.     public void setName( String name ) {
  60.  
  61.         productName = name;
  62.     }
  63.     public String getName() {
  64.  
  65.         return productName;
  66.        }
  67.         // movie genre
  68.     public void setGenre( String genre ) {
  69.  
  70.         productGenre = genre;
  71.     }
  72.     public String getGenre() {
  73.  
  74.         return productGenre;
  75.        }
  76.  
  77.     // item number
  78.     public void setNumber( double number ) {
  79.  
  80.         itemNumber = number;
  81.     }
  82.     public double getNumber() {
  83.  
  84.         return itemNumber;
  85.     }
  86.     // quantity of that movie
  87.     public void setquantity( double quantity ) {
  88.  
  89.         quantityNumber = quantity;
  90.     }
  91.     public double getquantity() {
  92.  
  93.         return quantityNumber;
  94.     }
  95.     // price for that movie
  96.     public void setPrice( double price ) {
  97.  
  98.         unitPrice = price;
  99.     }
  100.     public double getPrice(){
  101.  
  102.         return unitPrice;
  103.     }
  104. }
  105. ***************************************
  106. import java.util.Scanner;
  107.  
  108. public class inventorysupplys2 { // start of class
  109.  
  110.  
  111.     public static void main(String[] args) { // start of program
  112.  
  113.         Scanner input = new Scanner( System.in );
  114.         int c;
  115.         System.out.printf( "\n\nHow many new movies do you want to enter? ");
  116.         c = input.nextInt();
  117.         input.nextLine();
  118.         inventorysupplystock2[] supply = new inventorysupplystock2[c];
  119.  
  120.  
  121.         String name;              // for the name
  122.         String genre;             // this should be the subclass genre
  123.         double number;            // for the item number
  124.         double quantity;          // number of units in stock
  125.         double fee;
  126.         double price;             // price per item
  127.         double value = 0;         // value of that item
  128.         double totalValue = 0;    // value of whole inventory
  129.         double restockingFee = 0; // this should be fo rthe restocking fee
  130.         int a = 0;
  131.         int b = 0;
  132.         while (a < c){ // start of the loop getting the info for how ever many you are putting in
  133.  
  134.             supply[a] = new inventorysupplystock2();
  135.             supply[b] = new inventorysupplystock2();
  136.  
  137.             System.out.printf( "What is the name of the movie being entered: ");
  138.             name = input.nextLine();
  139.             supply[a].setName(name);
  140.  
  141.             System.out.printf( "What is the genre of the movie being entered: ");
  142.             genre = input.nextLine();
  143.             supply[b].setGenre(genre);
  144.  
  145.             System.out.printf( "What will be this movie's item number: ");
  146.             number = input.nextDouble();
  147.             input.nextLine();
  148.             supply[a].setNumber(number);
  149.  
  150.             System.out.printf( "How many are you entering into stock: ");
  151.             quantity = input.nextDouble();
  152.             input.nextLine();
  153.             supply[a].setquantity(quantity);
  154.  
  155.             System.out.printf( "How much did this movie cost: ");
  156.             price = input.nextDouble();
  157.             input.nextLine();
  158.             supply[a].setPrice(price);
  159.  
  160.             System.out.printf( "How much is the restocking fee: ");
  161.             fee = input.nextDouble();
  162.             input.nextLine();
  163.  
  164.  
  165.             value = supply[a].getquantity() * supply[a].getPrice();
  166.  
  167.             supply[a].setValue(value);
  168.  
  169.             supply[a].setCount(a);
  170.             // i could not get the restocking fee to work but i do know its
  171.             // resstockingFee = (value * 1.05) i just didnt know how to work it in here
  172.             a++;
  173.  
  174.         } // end of loop getting info
  175.  
  176.         java.util.Arrays.sort(supply); //this sorts the stuff
  177.         System.out.printf( "Item number  Genre   Name   Quantity  Price  Value restockingFee\n");
  178.  
  179.         a = 0;
  180.         while (a < c){ // total value of inventory
  181.         supply[a].displayItems();
  182.  
  183.         totalValue += supply[a].getValue();
  184.  
  185.         a++;
  186.         }
  187.  
  188.  
  189.  
  190.         // total value
  191.         System.out.printf( "The total value of the inventory is: %.2f", totalValue );
  192.     } // end of program
  193.  
  194. } // end of class
Nov 7 '06 #11

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

Similar topics

6
by: Frank Millman | last post by:
Hi all I have a question regarding inheritance. I have come up with a solution, but it is not very elegant - I am sure there is a more pythonic approach. Assume the following class definitions....
1
by: Gerry Sutton | last post by:
Hi All! I have noticed a strange behavior when using a constant identifier to initialize an instance list variable in a base class and then trying to modifying the list in subclasses by using...
8
by: Larry Lard | last post by:
Today I discovered that a syntax that I thought was forbidden in C# but allowed in VB.NET (and I _don't like_ that it's allowed in VB.NET) is actually allowed in C#. Which confused me. The syntax...
8
by: Lou Pecora | last post by:
I've been scanning Python in a Nutshell, but this seems to be either undoable or so subtle that I don't know how to do it. I want to subclass a base class that is returned from a Standard Library...
1
by: s.lipnevich | last post by:
Hi All, Is anything wrong with the following code? class Superclass(object): def __new__(cls): # Questioning the statement below return super(Superclass, cls).__new__(Subclass) class...
31
by: damacy | last post by:
hi, there. i have a problem writing a program which can obtain ip addresses of machines running in the same local network. say, there are 4 machines present in the network; , , and and if i...
6
by: Me | last post by:
I need to be able to acces non-virtual members of sublcasses via a base class pointer...and without the need for an explicit type cast. I thought a pure virtual getPtr() that acts as a type cast...
4
by: Kurt Smith | last post by:
Hi List: Class inheritance noob here. For context, I have the following base class and subclass: class Base(object): def __init__(self, val): self.val = val
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.