• Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in help

    OK, you have some pseudo-code outlining the basic direction of the program, but you haven't told us what you are having trouble with yet. It isn't clear if the pseudo-code …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching search fundamental data structure book in c++

    help me
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in search fundamental data structure book in c++

    What exactly are you looking for help with? Are you trying to find an algorithms book with examples in C++? A [qucik search on Amazon](http://www.amazon.com/s?ie=UTF8&field-keywords=C%2B%2B%20algorithms&index=blended&link_code=qs&sourceid=Mozilla-search&tag=mozilla-20) turns up several, and while …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching what i do about this error

    #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include "GCoptimization.h" #include "opencv/cv.h" #include "opencv/highgui.h" #include "opencv/ml.h" using namespace cv; #include <vector> #include <iostream> #include <limits> using namespace std; …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in what i do about this error

    Most of these error messages seem to stem from the lack of a declaration for the `CvEM` class, either directly or indirectly. Are you certain you have all of the …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching I am having a lot of trouble with assembly

    I have this code snippet: for (i=0; i<=100; i++) { a[i] = b[i] + C ; } I am trying to figure out what this would look like in MIPS …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in I am having a lot of trouble with assembly

    This looks an awful lot like an exam question, which makes me wonder if I should bother, but here goes. Regarding the loop itself, do you know how to a) …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching string reverse

    hi guyz, currently i am using cortex m4, and i have to make a string reverse function that print the strings back ward. this is what i have done so …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in string reverse

    I don't know ARM assembly from prior experience, but I would start by looking up the [Cortex M4 documentation](http://infocenter.arm.com/help/topic/com.arm.doc.dui0553a/index.html), if you haven't already done so, and get familiarized with the …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Ned help Java Program

    I would like to create a class for finding the voltages of 1, 2 or even 4 batteries. The Class can be called BatteryVoltage with a default voltage value of …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Ned help Java Program

    Well, then, that's quite a problem. What have you tried so far? Did the instructor provide all of the necessary information for you to compute the voltages? Have you discussed …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching beginning

    please am now a biginner in learning c++ programming. I want to know when do we use include <cmath> apart from the normal include <iostream>
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in beginning

    `<iostream>` and `<cmath>` are the headers for two different parts of the standard C++ library. The `<iostream>` library contains the basic input and output classes and objects, including `cin` and …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching ArrayList

    I know how made an arraylist but i dont know how make an arraylist inside an arraylist? let says: Alex age is 31 alex and age is gonna be in …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in ArrayList

    Well, to answer the question, the usual solution to having a multidimensional `ArrayList` is to declare an `ArrayList` of `ArrayList` of the type being stored: ArrayList<ArrayList<String> > data = new …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching How to force the text to save in UTF-8

    Hi all, my question is as follows: If I use the code as below: text = '中文' #Text is in Chinese, whereby text = 'chinese' with open('file.txt','w', encoding = 'UTF-8') …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in How to force the text to save in UTF-8

    I think you will find that the problem lies less with your program than it does with the way Notepad renders the codepoints. I don't know all of the details …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Inventory Program part 1

    Hello everyone. I am having a lot of trouble in a class, and I am wondering if I can get some input/advice with my part one inventory program. I have …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program part 1

    A few questions and suggestions: * Why did you include a null constructor? You generally only want a default c'tor if there is a reasonable default to provide, which in …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching String recursion in MIPS

    I am trying to reverse a string input by the user and reverse the string whenever * is hit. For example, if i put abc and hit * i should …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in String recursion in MIPS

    OK, I see a few things you didn't mention, such as a) the particular emulator you are using, and b) whether you are running in realistic mode, with load and …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching What is the best replacement IDE for Visual Studio for linux/wine

    if this is in the wrong area, I'm sorry. :) I'm looking for a good alternative for python on linux/wine that's capable of this: http://lh3.ggpht.com/-cuRe_8IrRCw/VEYPPy8J-3I/AAAAAAAAH10/DnjCVyfCEEg/s1282/VS2010.png ^ the popup under my …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in What is the best replacement IDE for Visual Studio for linux/wine

    > (most IDE's refer to "intellisense" as "Code Completion", especially for linux) That's because the term 'Intellisense' is a trademark of Microsoft. Other developers can't use that name. In any …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Changing all tabs to spaces line by line

    Hey, I'm trying to figure out how to get this kind of program to work, it's supposed to be a UNIX style program in the sense that everything is command …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Changing all tabs to spaces line by line

    First off, you'll want to use the tab escape sequence, `"\t"`, rather than the tab character itself in your string replace. Second, your are returning the function at the end …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    Change `restockfee` to `double`.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    It looks like you should be setting the restocking fee when you instantiate the object, so change the c'tor for `CarsImpl` thusly: CarsImpl(long productID, String productName, long unitsInStock, double unitPrice, …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching learn

    hi,i want study data structure by c++
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in learn

    No, please, don't. That book is a terrible introduction to C++, and does not really cover data structures to any real degree in any case. Fardous: what do you already …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    I'm not sure I'm following you. Are you saying that the reason it returns a `float` is because of the restocking fee?
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    That is because the `getTotalValue()` in `Cars` is a) not `public`, and b) type `int`, not `float`. An overriding method has to be of an access category as restrictive as …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    This was my fault; I copied the c'tor from `CarList`, rather than `Cars`. The c'tor should be: public Cars() { this.prodNumber = 0; this.prodName = "Ford Probe"; this.unitsTotal = 1; …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in priority queue with double priority

    It's very hard to say why it didn't crash, but I'd say mostly you were lucky. What I think may have happened was that you were deleting the elements but …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    You wouldn't replace it, no; you would have both. Java allows you to have two methods with the same name (called *overloading* a method), including a c'tor, so long as …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    Write a constructor for `Cars` that doesn't take any arguments, and just put in some generic values as the default. Something like this: public Cars() { this.item = 0; this.name …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    Simple: write a c'tor that takes no arguments and puts in default values to the instance variables.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    Ah, this is what I explained earlier about default constructors. If you want a default c'tor for `CarsImpl` that calls a default c'tor for `Cars`, you need to add a …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    And what errors is it giving now?
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    The first problem is because you are attempting to call a default constructor, but you didn't define one for the `Cars` class. Normally, if you don't define a c'tor, Java …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    OK, looking at the `Cars` class again, I can see you have the first two parameters reversed (and the last two as well); public Cars (int number, String name, int …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    You are using different variable names in the `super()` call than you used in the parameter list for `CarsImpl`. Try the following: super(productName, productID, unitPrice, unitsInStock);
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    Could you post the error messages, please?
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    OK, then. There's no harm in it, I just was wondering. At this point, you should have changed the class declaration for `CarsInventoryRestock` as I recommended, right? What was the …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    What is `CarList` for? It is basically just a copy of `Cars` with less documentation. Why is it included here?
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    Actually the real problem is that you're getting the parent-child relationship backwards: you want `CarsInventoryRestock` to be a sub-class of `Cars`, but right now you have it the other way …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    Since that's the class you're sub-classing, yes. You would have this class in one file, and your sub-class in another; both need to be declared as `public` classes.
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching Inventory Program Part 3

    Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in Inventory Program Part 3

    In order to create a sub-class of an existing class, you need to use the `extends` keyword and the name of the class being extended in the declaration of the …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Began Watching priority queue with double priority

    I am using a priority queue with a double as the priority. I am guessing this is cause so issues. I used these numbers first with no issues. 34.365681 34.481879 …
  • Member Avatar for Schol-R-LEA
    Schol-R-LEA

    Replied To a Post in priority queue with double priority

    The problem is not in the numbers used, but in the size of the memnory being allocated. The type `N` is a pointer type, which means that it is likely …

The End.