Prasanna Raman

Ranch Hand
+ Follow
since Sep 05, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
5
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prasanna Raman

Thank you. More than conventions, I'd like to understand how I can organise this into packages. Please suggest
2 weeks ago
Also, I have about 8 classes. I know leaving them all in the default package isn't good but is there a convention to naming packages for these types of apps?

I have an Application class, 3 enums and 4 other classes (Joblet, PrintConfig, PrintJob and PrintConfigManager).
3 weeks ago
Because I am not reading cost from file today, I have an overloaded constructor in PrintConfig to let my main method create PrintConfig without cost. Is this ok or is there a better way?
3 weeks ago
Ok, thank you very much!
3 weeks ago
Thank you. I think I'm understanding this a little better now So, who would call the loadDefaultCosts method then?

Would it be the Application class that reads from file?
3 weeks ago
I have the following. I think I'm confused about how PrintConfig should calculate cost. I have a circular dependency between cost methods of PrintConfig and PrintConfigs now

PrintConfig:



PrintConfigs:

3 weeks ago
Meanwhile, I am working on getting some code done. Will post soon.
3 weeks ago
Sorry, are you talking about PrintConfig (singular) or PrintConfigs(plural)?

PrintConfig doesn't know anything about the Joblet class. The Joblet class has-a PrintConfig instance and a numberOfPages. --

If it's singular, how does PrintConnfigs (plural) do loadDefaultCosts now?
3 weeks ago
Don't know what you want to do with totalPages? Does blackAndWhitePages = totalPages - colourPages? -- yes.
3 weeks ago
Oh, and would you tell me how the PrintConfigs class look like now, with the addition of the Joblet class?
3 weeks ago
Thank you. So this is my understanding:

Have a main class (an Application? class) that reads from file these variables:
totalPages
colourPages
2sided?

That application will create Joblet objects first and pass that as argument to constructor of PrintJob.

PrintJob will keep a list of Joblets, and adding cost of those joblets will give us the cost of the print job.

The hard coded cost will go in the PrintConfigs file.

To calculate overall cost, Application class can have a list of all PrintJobs and add the cost of each?

Please let me know if I'm missing something.
3 weeks ago
Thank you. So PrintJob wouldn't have cost or ink anymore in its constructor?
3 weeks ago
For now, I'm only targeting colour vs b/w being variable. So, I can do 3 colour one sided, and 5 b/w one sided.

So, my 3 variables I'm reading from file are:

Totalpages.
Totalcolourpages
Is2Sided?  - boolean

But I also want to design so I can maybe allow the combinations you asked about in the future.
3 weeks ago
yes, a single job can have 10 b/w pages and 10 colour pages.
3 weeks ago
Thank you. How do I handle total pages, colour pages etc. I am currently reading from file these things:

total pages
colour pages and
isTwoSided

I know the costs for each, and I have the paper type as default now.
3 weeks ago