473,657 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Student needs a push!

Ok,
I don't want to much help but I need a push. I am supposed to write a
program with 3 classes:
1. Controlling class
2. Student class
3. Grades class
Controlling class instantiates a student ( I need 5 of these) object and
gives it a name and studentID. Then I need to create a Grades object that
goes with the student that holds 5 grades.
So far I have the Controller creating the student and then in the student
constructor I create the grades object. How do I talk to the grades object
from the Controller?
Any help would be greatly appreciated.
Jul 17 '05 #1
1 1871
Joe
In article <gxLbb.548353$H o3.95323@sccrns c03>, so*****@microso ft.com
says...
Ok,
I don't want to much help but I need a push. I am supposed to write a
program with 3 classes:
1. Controlling class
2. Student class
3. Grades class
Controlling class instantiates a student ( I need 5 of these) object and
gives it a name and studentID. Then I need to create a Grades object that
goes with the student that holds 5 grades.
So far I have the Controller creating the student and then in the student
constructor I create the grades object. How do I talk to the grades object
from the Controller?
Any help would be greatly appreciated.


if the Grades object in Student is a private instance variable, just
return it in a public method called getGrades().
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
2612
by: Kirk Bevins | last post by:
Hello, new to posting, got a dilema in c++. I cant seem to create new instances of my student class. The idea is to make a database where the user inputs surnames and library card numbers etc. The piece of code I cant get to compile is: ......void main() { for (int i=0; i<10; i++) { student s;
1
1301
by: Student | last post by:
Hey I need to write an application that will scan my network, explicitly my network group. So it needs to do something like a "nbtscan" (you give it a parameter like 192.168.0.0/24 and it gives you a list of computers in your network ). I don't have any idea how to get list of computers in my network ( dispite ping everything,but maybe there is some more robust technique. After I will have a list of computers I need to search their shared...
4
1418
by: William | last post by:
My first time posting to clj , I have already read http://jibbering.com/faq/#FAQ2_3 before posting. javascript function in question: saveText() is as follows: function saveText( scroll_list, t_area, listToBeUpdated ) { alert( listToBeUpdated.name ); // need to know which list to add the value in textarea back into
1
3352
by: GS | last post by:
I am looking for some software package for students information for school, is there any open-source package available?. This should collect complete student information like: student details, collect student grade/marks info, also staff details. appreciated. GS.
10
1600
by: sandy | last post by:
I have been given a class, stack to work with. I have created a class called Job that I want to push on the stack. I cannot seem to figure out why the push isn't working. (I know the stack works, I have seen it demonstrated.) The stack header looks like this: <code>
2
9695
by: sallyk07 | last post by:
Modify the Student class so that each student object should also contain the scores for three tests. Provide a constructor that sets all instance values based on parameter values. Overload the constructor such that each test score is assumed to initially be zero. Provide a method called setTestScore that accepts two parameters: the test number (1 through 3) and the score. Also provide a method called getTestScore that accepts the test number and...
11
4052
by: xxbabysue123xx | last post by:
Heres the problem: Create a class Student with instance data name, studentNumber, class (where class is a String containing one of the following: “Freshman”, “Sophomore”, “Junior”, “Senior”. Make the class implement the Comparable interface. Include a toString method. Write a driver program to demonstrate your work. Instantiate several objects of the Student class. Call your methods several times to show that class is ordered. ...
1
1810
by: sajaisosa | last post by:
Hey there I've been following through the book "Beginning Python from Novice to Professional", and I have learned a great deal. At the moment, I am trying to expand upon the chatroom project near the end of this book. My problem, is that I can't get my head around how to allow the users to add new rooms. At the moment, there is only one room. My first thought on how to do this was instantiating objects from the main room class, using the...
3
1494
by: ejaggers | last post by:
I'm teaching myself OOP by following examples. I can't figure out what this is doing for the life of me. I've read the explanation and still don't get it. Can anyone explain, plus is there a more obvious way to do this: MY CONFUSION IS THIS STEP: push (@{$year_index {$year}}, $rlEntry); # By Year BOOK'S EXPLANATION: Since we would like to retrieve entries by category or by year, we use a double indexing scheme. Notice that...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.