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 8923475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:07:51+00:00 2026-06-15T07:07:51+00:00

How do you pass an objects reference to another method in another class? The

  • 0

How do you pass an objects reference to another method in another class?

The goal of my program is to calculate the students GPA from a file containing their transcript. There are 3 classes involved for the part I am struggling with.

There is the GPACalculator, which contains main. There is the transcript and course classes. the transcript class reads the file and builds a course out of it.

So far I have the transcript class with a method to read current line of the transcript file and construct a course object out of this information.

I now need to be able to send the course object to the main method of the gpa calculator so i can print it to the terminal window. This is where I am stuck.

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-15T07:07:53+00:00Added an answer on June 15, 2026 at 7:07 am

    GPA calculator probably needs to make a new course object:

    CourseObject courseobject = new CourseObject(args);
    

    Then you need to do something like: courseobject.getData();

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

Sidebar

Related Questions

I would like to pass a reference of a method into another method and
I want to pass heap-allocated objects from a dll. Obviously, memory must be managed
I want to pass an array of objects from my QtScript to C++ but
In C#, How do you pass the Session[] and Request[] objects to a method?
I'm trying to change a listbox in my main form from another file (nodes.cs)
I have a very simple method: Class Team(models.Model): def sides(self): return SideNames.objects.filter(team=self) SideNames is
I have a class that holds a strong reference to an open file. If
Is it possible to hold a reference to an Assembly from another appdomain without
Is there anyway to pass the property of an Object by reference? I know
I'm trying to return a reference to an object, not pass it by value.

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.