462 Topics
| |
Reflect on your experience with object-oriented programming (OOP) in Java. Discuss how concepts like inheritance, polymorphism, and abstraction have helped you in your projects. Share examples and personal insights. | |
I have a web page that loads images with a modal, and at the same time is meant to inhibit image piracy by delivering a transparent overlay when a user attempts to make a screen copy of the image. I have two php lines of image scripts which work OK … | |
I've read tutorial on tutorial and I try to work with Object Oriented PHP but the thing is that I find it rather complex. When I create a class I must include it in the current working document. It doesn't work as in Java when the compiler finds the script … | |
I have a program that i need to convert from java to c++... i just need help doing it... heres the java: [code] /* Name: Joseph Coleman Class:CSCI 1302 Assignment: Employee + ProductionWorker Academic Honesty: The integrity of students and their written and oral work is a critical component of … | |
vbScript - Create a Log File Using vbScript Classes Before I retired I was responsible for most of the corporate data plumbing at our control centre. All of the plumbing was written in vbScript. As any maintenance programmer knows, log files are a vital key in identifying and fixing problems. … | |
Hi All, i am curious to know how to set the value (value=10) through B's constructor in below programme. below is example of multiple inheritance. As construction always happens from right to left so it always call the 'C' class's constructor and set the value 20 but as per my … | |
Firstly, I would like to apologize for the massive number of nooby crap questions that come out of my account. I'm an emerging programmer that doesn't always know what he's doing, so I'm sorry. Secondly, the problem. I'm writing this code: class Object(): def __init_(self, vertices, color, name): self.color = … | |
inheritance error is::Error 1 Inconsistent accessibility: base class 'person' is less accessible than class 'employee' using System; using System.Collections.Generic; using System.Linq; using System.Text; //person class public class person { public string name; public double CNIC_no; public void Information() { Console.WriteLine("Enter your name"); name = Console.ReadLine(); Console.WriteLine("Enter your id"); CNIC_no =double.Parse( … | |
just curious. <img src="filepath.jpeg" id="idhere?" /> or <img id="idhere?" src="filepath.jpeg" /> which is valid? are they both vaild? and differences? | |
Hello. We're going into Constructora and super, using extends, subclasses etc. I have this code: class Student { private String name; private String matric_no; public Student(String n, String m) { name = n; matric_no = m; } } class UndergradStudent extends Student { private String programme; public UndergradStudent(String n, String … | |
[CODE]# -*- coding: utf-8 -*- from PyQt4 import QtGui from PyQt4.QtCore import * import sys import os class VideosToMp3(QtGui.QWidget): def __init__(self, parent = None): super(VideosToMp3, self).__init__(parent) ''' Labels and GUI ''' extension = QtGui.QWidget() download_label = QtGui.QLabel("Enter YouTube video URL:") self.download_line_edit = QtGui.QLineEdit() file_label = QtGui.QLabel("Enter file name (optional):") self.file_line_edit … | |
Hi,all I need a java parser for parsing any java file in any package,not only existing file ...Can i do this ? how? | |
Hi, in this code how can I calculate coupling between objects CBO in java after parsing java file using registerCoupling method and retrieve any coupling between classes through argument, class name,type and so on ..... | |
If I implement an abstract class that contains this method: private void MyMethod(string awesomeParameter, int aBigNumber) { // something cool happens here! throw new NotImplementedException(); } can I change it to this without breaking the implementation? private void MyMethod(string myParam, int myInt) { // something cool happens here! throw new … | |
Using an initialization list for a class array variable, what do you use to setup a slot with a 3parameter Ctor? | |
Is there a way to require a subclass to call super explicitly in it's constructor? | |
Hello guys i have a really dumb problem i have two classes the first class is where the input value needs to be applied/readed and the second is where is inputed i do not know how to do that please someone help me This is where it is inputed the … | |
Inheritance with generic types can sometimes be tricky. If you would inherit from a Stack<double>, no problem, but what if you want to keep it as generic as possible? Maybe it's a bad idea, but I wrote something like `class Stacker<T> : Stack<T>` and in Stacker I implemented some arithmetic … | |
Hi, As we know constructor doesn't have any return value so it is not good idea to perform exceptional handling inside constructor.SO i would like to know if i am opening a file inside constructor and due to some reason (file not exist) failure happened inside constructor then how to … | |
Hey guys! I have a quick question that I think is a simple mess up. I am trying to make a console word game in c#, and I have different classes, and a main class that calls those classes. I first have the Player class, and the CreateCharacter class. My … | |
I have a Task class (superclass) which inherited PracticeTest class(childclass). I'd faced question regarding my pass year question. In fact, we are allowed to declared like this Task aTask = new PracticeTest(); But i wonder why we are doing this way? Thanks for advance explanation. | |
Is it possible to let an overridden method from a base class to return the type of the derived class? What I mean is: namespace test //with some "pseudo" code { class Base<T> { //fields ... //properties ... // ... public virtual Base<T> BaseMethod() { //return new Base<T>; } // … | |
Hi guys, I would like to discuss my design with one query. below is the code snippet. It is clear from below code snippet that class pd is privately derived from AbstractClass as both are different classes and there is no relation between them.Now in my class pd i need … | |
Hey everyone, Got 2 questions here that i'm hoping will be answered. Say i have 2 variables int iValue; int iValueArray[300]; and later on init. them in the constructor Banana::Banana(): ival(0), ivalArray() {} 1. What would the ivalArray() indicate? Would it be the same as initializing every element to null/empty? … | |
Greetings, I'm working on a class project for fractions and I'm stuck and cannot figure out where to go from here. We have a mandatory driver file we aren't supposed to change. See below for example output and the output I am actually getting. **Sample Output** Enter numerator; then denominator. … | |
Here is my code: ` #include <iostream> #include <iomanip> #include <string> using namespace std; class Register { //Private members private: //Creating an array for all the Prices static double Price[]; //Declaring RegNUM and RecNUM int RegNUM, RecNUM; //Print out Item name in a loop static string items[]; //Creates a Receipt … | |
The tools Hal’s sells are: Hammers: $10.99 Wrenches: $10.99 Levels: $19.99 Tape Measures: $4.99 Screwdrivers: $8.99 In order to make things easier in the long run you have decided to make a c++ program that takes in all the orders for each register and tallies them at the end of … | |
Hi all, I'm trying to access a list in a class made in another class and display it in a listbox but its not working. I most probably have to make a small change to be able to get it to work. So please check in the code if you … | |
Hi fellow members, I have wrote two abstract classes, with the second inheriting from the first. However, I receive this error when I try to compile: "error C2143: syntax error : missing ',' before '<'." Will somebody help me out? Thanks! template <class DataType> class AbstactArrayClass { friend ostream& operator … | |
//Hi all just switching from c++ to c#.Can anyone help,with the question i have: //this is a peace of code from c++ banking aplication int ShowMenu(void); void AddAccount(vector<CAccount*>& list); void DisplayAccount (vector<CAccount*>& list); void Lodgement (vector<CAccount*>& list); void Withdroawal (vector<CAccount*>& list); void InterestRate (vector<CAccount*>& list); CAccount* findAccount (vector<CAccount*>string ); bool … |
The End.