UML diagram collection of objects

I need to design a UML class diagram but I have the following problem. The application I am designing consists of a set of objects, let's say cars. What I want to do, is keep a record of all the cars, the days they've been used, etc.. So, I have a ca...
more »

2017-01-11 19:01 (1) Answers

Why is this javaclass getting this exception?

I got this code off of a website to adapt to use for something else, but when I tried it on Netbeans, it kept giving me issues. I looked through it and it looks solid but, I apparently not... The exceptions are: "'{' Expected" and "class, interf...
more »

2017-01-11 18:01 (2) Answers

Can't find an object in ArrayList

I'm trying to find an object in an array list that's in another class by using the name of the object. private void listParticipant() { System.out.print("Put in name of participant to see if currently registered: "); String name = readString...
more »

2017-01-11 13:01 (1) Answers

How add ID element to the specific class line?

I would like to add an ID to a line that contains a class with the specified name. eg. If the website will block "div" or "li" that contains a class with names such as "name-1 name-2 name-3" This function detects a class called "name-1" and insert e...
more »

2017-01-11 11:01 (3) Answers

Reading UML diagrams (POODR)

I'm reading POODR and trying to wrap my head around Sandi's examples. I'm especially interested in trying to understand how her UML diagrams work. For example Figure 4.8 on page 75: Looking at the image some questions come to mind: moe Customer...
more »

2017-01-11 07:01 (1) Answers

Accessing constructor properties in class

I don't understand JavaScript scope when it comes to object variables. I have the following class defined: class DataHandler { constructor(boardIDA, boardIDB, accessToken, eventA, eventB) { this.times = []; this.eventA = eventA; this.e...
more »

2017-01-09 23:01 (1) Answers

How to write conditionnal class in html?

I know this question has been asked many times on the website and someone will certainly tag it duplicate but I can find the good answer, so could you please help me first :) I would like to have no id when comment is nil. This is the actual code (d...
more »

2017-01-09 19:01 (1) Answers

Creating a class object inside a loop

I think my question is pretty simple but I'm not flash on the fundamentals. I have a class and I want to store data in it from a loop and access those class objects outside of the loop. For example, I want code like below class Numbers attr_acc...
more »

2017-01-09 07:01 (3) Answers

Class variables reseting in python

Right now I am having a problem where a class' values are being reset I am not sure where. can anyone help? Here is the code while True: #some code# Hub().paint(gameDisplay) The Hub/paint function is shown below def paint(self, screen): ...
more »

2017-01-09 03:01 (1) Answers

Passing data into constructor class

I am create a console application that can create a Character, modify a character, as well as equip a weapon and display user enter character data. My first question is. How do I go about capturing my users entries and passing those values to my cons...
more »

2017-01-08 23:01 (1) Answers

C++ Builder Pattern Based on Configuration

I found this useful gist that introduced me into Builder Pattern Design. How would one implement this code to build a "Car" object with required and optional parameters based on configurations without writing dedicated builders? Scenario 1 Build a...
more »

2017-01-08 20:01 (1) Answers

Prevent duplicated objects affection each other C#

this might seem silly, so please excuse my naivety. If I had an integer, say int counter = 2; then I could create integer int anotherCounter = counter; and if I were to print the value of anotherCounter, it would obviously return 2. Now, if I then ...
more »

2017-01-08 18:01 (2) Answers