Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8018829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:13:22+00:00 2026-06-04T21:13:22+00:00

Details: My program is a grade book with 5 classes that are all aggregated.

  • 0

Details:

My program is a grade book with 5 classes that are all aggregated. GradeBook has courses, Course has Categories, Category has Grades (all ArrayLists). My program also has a StateManager whose sole purpose is to return references to Objects because of the deep aggregation. In my Driver I do not create an instance of a GradeBook but a statemanager which has a static instance of a GradeBook with methods to return references.

My goal is to save all of this data to be reopened when the program is rerun.

Questions:

When I write the file all I need to do is write the StateManager object, correct? I think I’ve even accomplished this. I have the program create a “gradebook.data” file. Is there a way to open the .data file in a text program and see if it is writing correctly?

Where do I open the object again with inputstream? In the static main method or in the beginning of my method that initializes all of the graphics?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:13:23+00:00Added an answer on June 4, 2026 at 9:13 pm

    Serializing StateManager won’t do anything because you have a static reference to the GradeBook. This is in itself a code smell, but here it has the physical repercussion of not getting serialized — only instance fields get serialized. So remove the static qualifier. You can make the StateManager itself a singleton and have a static reference to it.

    However, I am still in doubt as to why you don’t serialize the GradeBook instance. That would be a far more logical approach. We don’t usually serialize service objects, but data objects, and you already have that separation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an address book program. I have each person's details stored in
My program has a list of tabs that each contain a list of people.
i want to develop a program that will process images and show all esxisting
I have a simple program that looks up details of an IP you give
I have to make a program that has a zoo with three types of
I was created a program in java for getting nsf file Details. I have
I want to show details of an exception that occurred in my application, like
As per the below Code, I am getting every single details of the program
I'm writing a program that needs a generic temp folder. I'm trying to find
We have a small .Net program that we sell with individual licenses. The individual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.