Home
Blogs
Questions

Home

About Us

Blogs

Questions

Monetize

Post Job

banner

Questions about representation

Read more about representation

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - representation

How to represent two different types of data being returned by a class method in a UML diagram?

I have the following method: def getInvoiceById(self, id): for invoice in self.invoices: if invoice.id == id: return invoice return False inside a cl...
test-img

ExtrovetedProgrammer

python

uml

class-diagram

return-type

representation

Votes: 0

Answers: 1

Latest Answer

Besides the fact that this is a really bad implementation (you rather should return None than False) you would have the return type of what ever ìnvoice would be (probably Invoice). So assuming that i...
test-img

qwerty_so

Posts

Questions

Blogs

Where knowledge meets opportunity!

About

  • Company
  • Monetize your knowledge
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved