Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

is oop ok in a non-oop project?

 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been working on Java-4a and 4b (Say). I have gotten both to work, but the code is neither simple nor clear.

My question: Would it be ok to use OOP constructs in these non-oop projects (especially Java-4b)? I think encapsulation would help make the code more understandable.

Thanks in advance!

Pete
 
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think we are supposed to arrive at a solution that does not need OOP. That said, if you have working code that uses OOP and can't figure out where to go with it, submit what you have and the nitpicks will guide you in the right direction.

Most likely you will end up removing the OOP for 4b, though (I think).

Okay, somebody else say something now before I ramble on indefinitely!

[edited for spelling]
[ March 11, 2007: Message edited by: Katrina Owen ]
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ramble on Katrina, your advice is right on and most welcome!

Pete, as Katrina said, you aren't really expected to get into "real" OO stuff until you reach the next section of the Cattle Drive. For the first assignments it's kind of overkill.

Have fun with Say!
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pauline McNamara:
Have fun with Say!



That almost sounds sarcastic? Nah.

Anyway, thanks for the advice. I will continue on.

/Pete
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic