473,837 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Method PrintLn (two classes)// need help

Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;

}

}

Is it possible to print only the schedule of one teacher at a time ? Thanks
for you time.

/--Here my classes

# ifndef CASE_H

# define CASE_H

#include <iostream>

#include <iomanip>

#include <cstring>

using namespace std ;

const int Clundi = 1 ;

const int Cmardi = 2 ;

const int Cmercredi = 3 ;

const int Cjeudi = 4 ;

const int Cvendredi = 5 ;

const int Csamedi = 6 ;

const int Cdimanche = 7 ;

class Tcase{

public :

Tcase (int numSemaine, int numJour, double heureDebut, double duree,

char matiere[], char classe[]= " ", char salle[]= " ") ;

int getNumSemaine() const ;

double getDuree() const ;

void printLn() const ;

private :

//attributs obligatoires

int m_numSemaine ; //1..53

int m_numJour ; //1..7

double m_heureDebut ; //13h30 = 13.5

double m_duree ; //2h45 = 2.75

char m_matiere[10] ; //p ex. prog7

//attributs optionnels

char m_classe[10] ; //p. ex. 3IG-EE

char m_salle[10] ; //p. ex A46A

}

#endif



# ifndef HORAIRE_H

# define HORAIRE_H

# include <iostream>

# include <cstring>

using namespace std ;

#include « case.h »

class TenseignantErro r{} ; // the teacher is not matching

class Toverflow{} ; //capacity overflow



const int CcasesMax = 1000 ;

class Thoraire{

public :

//create a new hours schedule

Thoraire (const char nomEnseignant[]) ;

//add a case in the hours schedule

void ajouteCase (Tcase* caseHor) throw (Toverflow) ;

//calculate the total hours

double chargeHoraire() const ;

//return a sample of the schedule



//return an empty schedule if the number of the week doesn't
exist

Thoraire horaireHebdomad aire (int numSem) const ;

/*

Create a new hours schedule by fusionning both schedule, throw an exception
of class TenseignantErro r when the schedules don't have the same teacher
(enseignant) name.

Throw an exception of class Toverflow when the fusion create an overflow of
capacity (>CcasesMax)

*/

Thoraire operator+ (const Thoraire & hor) const throw (TenseignantErr or,
Toverflow) ;

Void printLn() ;

Private :

Char m_nomEnseignant [30] ; // obligatory

Tcase* m_cases[CcasesMax] ;

Int m_nbCases ;

} ;

#endif


Jul 23 '05 #1
7 1439
stephane wrote:

First of all:
Can you check your newsreader settings? All of your
posts come through terrible formatted.
Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?
Well. What does the compiler say?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;


Looking at your class definition I can see ...

class Thoraire
{
public :

[...]

private :
char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
int m_nbCases ;
};

that m_cases is an array of pointers. Thus m_cases[i] is a single
pointer. But a pointer doesn't have a method printLn(). But the
object it is pointing to has that function. Thus you probably want:

m_cases[i]->printLn();
I noted something in your posted code. You use 'keywords'
Private, Char, Int
(Note the uppercase first letter!)

Those are *not* the C++ keywords, which are all lower case only.
This makes me think that you somewhere have some
#define Private private
#define Char char
#define Int int
which is definitly *not* a good idea!!!

But then: Given the very bad formatting of your text and source code
it could also be possible that your newsread introduced that nonsense.
Which is just an additional argument to: either check and change the
configuration of your newsread or use a different one, since the one
you use is complete crap.

--
Karl Heinz Buchegger
kb******@gascad .at
Jul 23 '05 #2
Danke schön Karl,

Sorry about the display:

Is it better like this?

Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;

}

}

Is it possible to print only the schedule of one teacher at a time ? Thanks
for you time.

/--Here my classes
# ifndef CASE_H
# define CASE_H
#include <iostream>
#include <iomanip>
#include <cstring>
using namespace std ;

const int Clundi = 1 ;
const int Cmardi = 2 ;
const int Cmercredi = 3 ;
const int Cjeudi = 4 ;
const int Cvendredi = 5 ;
const int Csamedi = 6 ;
const int Cdimanche = 7 ;

class Tcase{
public :

Tcase (int numSemaine, int numJour, double heureDebut, double duree,
char matiere[], char classe[]= " ", char salle[]= " ") ;

int getNumSemaine() const ;
double getDuree() const ;
void printLn() const ;

private :

//attributs obligatoires
int m_numSemaine ; //1..53
int m_numJour ; //1..7
double m_heureDebut ; //13h30 = 13.5
double m_duree ; //2h45 = 2.75
char m_matiere[10] ; //p ex. prog7
//attributs optionnels
char m_classe[10] ; //p. ex. 3IG-EE
char m_salle[10] ; //p. ex A46A

}
#endif

# ifndef HORAIRE_H
# define HORAIRE_H
# include <iostream>
# include <cstring>
using namespace std ;
#include « case.h »

class TenseignantErro r{} ; // the teacher is not matching
class Toverflow{} ; //capacity overflow

const int CcasesMax = 1000 ;
class Thoraire{
public :

//create a new hours schedule
Thoraire (const char nomEnseignant[]) ;
//add a case in the hours schedule
void ajouteCase (Tcase* caseHor) throw (Toverflow) ;
//calculate the total hours
double chargeHoraire() const ;
//return a sample of the schedule
//return an empty schedule if the number of the week doesn't
exist

Thoraire horaireHebdomad aire (int numSem) const ;
/*
Create a new hours schedule by fusionning both schedule, throw an exception
of class TenseignantErro r when the schedules don't have the same teacher
(enseignant) name.
Throw an exception of class Toverflow when the fusion create an overflow of
capacity (>CcasesMax) */

Thoraire operator+ (const Thoraire & hor) const throw (TenseignantErr or,
Toverflow) ;

Void printLn() ;
Private :

Char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
Int m_nbCases ;
} ;

#endif
"Karl Heinz Buchegger" <kb******@gasca d.at> a écrit dans le message de news:
41************* **@gascad.at...
stephane wrote:


First of all:
Can you check your newsreader settings? All of your
posts come through terrible formatted.
Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?


Well. What does the compiler say?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;


Looking at your class definition I can see ...

class Thoraire
{
public :

[...]

private :
char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
int m_nbCases ;
};

that m_cases is an array of pointers. Thus m_cases[i] is a single
pointer. But a pointer doesn't have a method printLn(). But the
object it is pointing to has that function. Thus you probably want:

m_cases[i]->printLn();
I noted something in your posted code. You use 'keywords'
Private, Char, Int
(Note the uppercase first letter!)

Those are *not* the C++ keywords, which are all lower case only.
This makes me think that you somewhere have some
#define Private private
#define Char char
#define Int int
which is definitly *not* a good idea!!!

But then: Given the very bad formatting of your text and source code
it could also be possible that your newsread introduced that nonsense.
Which is just an additional argument to: either check and change the
configuration of your newsread or use a different one, since the one
you use is complete crap.

--
Karl Heinz Buchegger
kb******@gascad .at

Jul 23 '05 #3
Well it is not different. Sorry.

"stephane" <st************ *@bluewin.ch> a écrit dans le message de news:
41************* *********@news. sunrise.ch...
Danke schön Karl,

Sorry about the display:

Is it better like this?

Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;

}

}

Is it possible to print only the schedule of one teacher at a time ?
Thanks for you time.

/--Here my classes
# ifndef CASE_H
# define CASE_H
#include <iostream>
#include <iomanip>
#include <cstring>
using namespace std ;

const int Clundi = 1 ;
const int Cmardi = 2 ;
const int Cmercredi = 3 ;
const int Cjeudi = 4 ;
const int Cvendredi = 5 ;
const int Csamedi = 6 ;
const int Cdimanche = 7 ;

class Tcase{
public :

Tcase (int numSemaine, int numJour, double heureDebut, double duree,
char matiere[], char classe[]= " ", char salle[]= " ") ;

int getNumSemaine() const ;
double getDuree() const ;
void printLn() const ;

private :

//attributs obligatoires
int m_numSemaine ; //1..53
int m_numJour ; //1..7
double m_heureDebut ; //13h30 = 13.5
double m_duree ; //2h45 = 2.75
char m_matiere[10] ; //p ex. prog7
//attributs optionnels
char m_classe[10] ; //p. ex. 3IG-EE
char m_salle[10] ; //p. ex A46A

}
#endif

# ifndef HORAIRE_H
# define HORAIRE_H
# include <iostream>
# include <cstring>
using namespace std ;
#include « case.h »

class TenseignantErro r{} ; // the teacher is not matching
class Toverflow{} ; //capacity overflow

const int CcasesMax = 1000 ;
class Thoraire{
public :

//create a new hours schedule
Thoraire (const char nomEnseignant[]) ;
//add a case in the hours schedule
void ajouteCase (Tcase* caseHor) throw (Toverflow) ;
//calculate the total hours
double chargeHoraire() const ;
//return a sample of the schedule
//return an empty schedule if the number of the week doesn't
exist

Thoraire horaireHebdomad aire (int numSem) const ;
/*
Create a new hours schedule by fusionning both schedule, throw an
exception
of class TenseignantErro r when the schedules don't have the same teacher
(enseignant) name.
Throw an exception of class Toverflow when the fusion create an overflow
of
capacity (>CcasesMax) */

Thoraire operator+ (const Thoraire & hor) const throw (TenseignantErr or,
Toverflow) ;

Void printLn() ;
Private :

Char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
Int m_nbCases ;
} ;

#endif
"Karl Heinz Buchegger" <kb******@gasca d.at> a écrit dans le message de
news: 41************* **@gascad.at...
stephane wrote:


First of all:
Can you check your newsreader settings? All of your
posts come through terrible formatted.
Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?


Well. What does the compiler say?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;


Looking at your class definition I can see ...

class Thoraire
{
public :

[...]

private :
char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
int m_nbCases ;
};

that m_cases is an array of pointers. Thus m_cases[i] is a single
pointer. But a pointer doesn't have a method printLn(). But the
object it is pointing to has that function. Thus you probably want:

m_cases[i]->printLn();
I noted something in your posted code. You use 'keywords'
Private, Char, Int
(Note the uppercase first letter!)

Those are *not* the C++ keywords, which are all lower case only.
This makes me think that you somewhere have some
#define Private private
#define Char char
#define Int int
which is definitly *not* a good idea!!!

But then: Given the very bad formatting of your text and source code
it could also be possible that your newsread introduced that nonsense.
Which is just an additional argument to: either check and change the
configuration of your newsread or use a different one, since the one
you use is complete crap.

--
Karl Heinz Buchegger
kb******@gascad .at


Jul 23 '05 #4
LOL!

stephane wrote:
Danke schön Karl,

Sorry about the display:

Is it better like this?

Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;

}

}

Is it possible to print only the schedule of one teacher at a time ? Thanks for you time.

/--Here my classes
# ifndef CASE_H
# define CASE_H
#include <iostream>
#include <iomanip>
#include <cstring>
using namespace std ;

const int Clundi = 1 ;
const int Cmardi = 2 ;
const int Cmercredi = 3 ;
const int Cjeudi = 4 ;
const int Cvendredi = 5 ;
const int Csamedi = 6 ;
const int Cdimanche = 7 ;

class Tcase{
public :

Tcase (int numSemaine, int numJour, double heureDebut, double duree,
char matiere[], char classe[]= " ", char salle[]= " ") ;

int getNumSemaine() const ;
double getDuree() const ;
void printLn() const ;

private :

//attributs obligatoires
int m_numSemaine ; //1..53
int m_numJour ; //1..7
double m_heureDebut ; //13h30 = 13.5
double m_duree ; //2h45 = 2.75
char m_matiere[10] ; //p ex. prog7
//attributs optionnels
char m_classe[10] ; //p. ex. 3IG-EE
char m_salle[10] ; //p. ex A46A

}
#endif

# ifndef HORAIRE_H
# define HORAIRE_H
# include <iostream>
# include <cstring>
using namespace std ;
#include « case.h »

class TenseignantErro r{} ; // the teacher is not matching
class Toverflow{} ; //capacity overflow

const int CcasesMax = 1000 ;
class Thoraire{
public :

//create a new hours schedule
Thoraire (const char nomEnseignant[]) ;
//add a case in the hours schedule
void ajouteCase (Tcase* caseHor) throw (Toverflow) ;
//calculate the total hours
double chargeHoraire() const ;
//return a sample of the schedule
//return an empty schedule if the number of the week doesn't exist

Thoraire horaireHebdomad aire (int numSem) const ;
/*
Create a new hours schedule by fusionning both schedule, throw an exception of class TenseignantErro r when the schedules don't have the same teacher (enseignant) name.
Throw an exception of class Toverflow when the fusion create an overflow of capacity (>CcasesMax) */

Thoraire operator+ (const Thoraire & hor) const throw (TenseignantErr or, Toverflow) ;

Void printLn() ;
Private :

Char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
Int m_nbCases ;
} ;

#endif
"Karl Heinz Buchegger" <kb******@gasca d.at> a écrit dans le message de news: 41************* **@gascad.at...
stephane wrote:


First of all:
Can you check your newsreader settings? All of your
posts come through terrible formatted.
Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?


Well. What does the compiler say?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;


Looking at your class definition I can see ...

class Thoraire
{
public :

[...]

private :
char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
int m_nbCases ;
};

that m_cases is an array of pointers. Thus m_cases[i] is a single
pointer. But a pointer doesn't have a method printLn(). But the
object it is pointing to has that function. Thus you probably want:

m_cases[i]->printLn();
I noted something in your posted code. You use 'keywords'
Private, Char, Int
(Note the uppercase first letter!)

Those are *not* the C++ keywords, which are all lower case only.
This makes me think that you somewhere have some
#define Private private
#define Char char
#define Int int
which is definitly *not* a good idea!!!

But then: Given the very bad formatting of your text and source code it could also be possible that your newsread introduced that nonsense. Which is just an additional argument to: either check and change the configuration of your newsread or use a different one, since the one you use is complete crap.

--
Karl Heinz Buchegger
kb******@gascad .at


Jul 23 '05 #5
it's not funny

"Shezan Baig" <sh************ @gmail.com> a écrit dans le message de news:
11************* *********@f14g2 00...legr oups.com...
LOL!

stephane wrote:
Danke schön Karl,

Sorry about the display:

Is it better like this?

Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;

}

}

Is it possible to print only the schedule of one teacher at a time ? Thanks for you time.

/--Here my classes
# ifndef CASE_H
# define CASE_H
#include <iostream>
#include <iomanip>
#include <cstring>
using namespace std ;

const int Clundi = 1 ;
const int Cmardi = 2 ;
const int Cmercredi = 3 ;
const int Cjeudi = 4 ;
const int Cvendredi = 5 ;
const int Csamedi = 6 ;
const int Cdimanche = 7 ;

class Tcase{
public :

Tcase (int numSemaine, int numJour, double heureDebut, double duree,
char matiere[], char classe[]= " ", char salle[]= " ") ;

int getNumSemaine() const ;
double getDuree() const ;
void printLn() const ;

private :

//attributs obligatoires
int m_numSemaine ; //1..53
int m_numJour ; //1..7
double m_heureDebut ; //13h30 = 13.5
double m_duree ; //2h45 = 2.75
char m_matiere[10] ; //p ex. prog7
//attributs optionnels
char m_classe[10] ; //p. ex. 3IG-EE
char m_salle[10] ; //p. ex A46A

}
#endif

# ifndef HORAIRE_H
# define HORAIRE_H
# include <iostream>
# include <cstring>
using namespace std ;
#include « case.h »

class TenseignantErro r{} ; // the teacher is not matching
class Toverflow{} ; //capacity overflow

const int CcasesMax = 1000 ;
class Thoraire{
public :

//create a new hours schedule
Thoraire (const char nomEnseignant[]) ;
//add a case in the hours schedule
void ajouteCase (Tcase* caseHor) throw (Toverflow) ;
//calculate the total hours
double chargeHoraire() const ;
//return a sample of the schedule
//return an empty schedule if the number of the week doesn't exist

Thoraire horaireHebdomad aire (int numSem) const ;
/*
Create a new hours schedule by fusionning both schedule, throw an exception of class TenseignantErro r when the schedules don't have the same teacher (enseignant) name.
Throw an exception of class Toverflow when the fusion create an overflow of capacity (>CcasesMax) */

Thoraire operator+ (const Thoraire & hor) const throw (TenseignantErr or, Toverflow) ;

Void printLn() ;
Private :

Char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
Int m_nbCases ;
} ;

#endif
"Karl Heinz Buchegger" <kb******@gasca d.at> a écrit dans le message de news: 41************* **@gascad.at...
stephane wrote:


First of all:
Can you check your newsreader settings? All of your
posts come through terrible formatted.
Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?


Well. What does the compiler say?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;


Looking at your class definition I can see ...

class Thoraire
{
public :

[...]

private :
char m_nomEnseignant [30] ; // obligatory
Tcase* m_cases[CcasesMax] ;
int m_nbCases ;
};

that m_cases is an array of pointers. Thus m_cases[i] is a single
pointer. But a pointer doesn't have a method printLn(). But the
object it is pointing to has that function. Thus you probably want:

m_cases[i]->printLn();
I noted something in your posted code. You use 'keywords'
Private, Char, Int
(Note the uppercase first letter!)

Those are *not* the C++ keywords, which are all lower case only.
This makes me think that you somewhere have some
#define Private private
#define Char char
#define Int int
which is definitly *not* a good idea!!!

But then: Given the very bad formatting of your text and source code it could also be possible that your newsread introduced that nonsense. Which is just an additional argument to: either check and change the configuration of your newsread or use a different one, since the one you use is complete crap.

--
Karl Heinz Buchegger
kb******@gascad .at

Jul 23 '05 #6
stephane wrote:

Danke schön Karl,

Sorry about the display:

Is it better like this?
A little bit. At least the complete source code is better now.

Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?
I already answered that one, didn't you see it?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;

}

}

Is it possible to print only the schedule of one teacher at a time ? Thanks
for you time.


I am not sure what you mean with that question and where you problem
is located.
(Part of my unsureness may be the fact that I don't speak french, so it
is hard to me to guess what your program should do, based on the names
of classes and variables).

--
Karl Heinz Buchegger
kb******@gascad .at
Jul 23 '05 #7
I understand the names of variables in french don't help you. You helped me
already though. Thanks.

"Karl Heinz Buchegger" <kb******@gasca d.at> a écrit dans le message de news:
41************* **@gascad.at...
stephane wrote:

Danke schön Karl,

Sorry about the display:

Is it better like this?


A little bit. At least the complete source code is better now.

Hi,

I must implement the method printLn of the class Thoraire.

And I've done this, can someone tell me if I am right ?


I already answered that one, didn't you see it?

void Thoraire ::printLn()

{

cout<< « Teacher's name : « m_nomEsnseignan t<<endl ;

for(int i=0 ; i<m_nbCases ;i++)

{

m_cases[i].printLn() ;

}

}

Is it possible to print only the schedule of one teacher at a time ?
Thanks
for you time.


I am not sure what you mean with that question and where you problem
is located.
(Part of my unsureness may be the fact that I don't speak french, so it
is hard to me to guess what your program should do, based on the names
of classes and variables).

--
Karl Heinz Buchegger
kb******@gascad .at

Jul 23 '05 #8

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

Similar topics

5
2803
by: Eric A. Forgy | last post by:
Hello, I am just learning Java and am trying to write a method that does something like //=========================================== public Static List find(double array,double val,String relationalOp) { List list = new ArrayList();
18
4759
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the class where only the "searched" property has a value. I expected to get the index into the arraylist where I could then get the entire class instance. However, the 'indexof' is never calling my overloaded, overrides Equals method. Here is the...
1
6170
by: ladislav | last post by:
I need modify first program.In second program I try print method findPrime in method main.I have there anywhere mistakes.Please obout help. First program: ** *PrimeNumber.java * *
2
1508
by: Goonrider72 | last post by:
Hi there great sight iv been reading and learning from alot of the questions here. iv just started programming using java... we use Bluej at uni. my problem is as follows: i have 2 classes. the 1st class is called soldiers and creates objects called soldiers and stores their attributes, eg name, id number, rank etc... The second class is taskForce which stores which has an add method and adds soldiers to the task force by storing them in...
7
3143
by: Codeseeker99 | last post by:
I am new to java and I am trying to learn how to to reduce lines of code that are redundant in a simple file I made. I am trying to figure out how to reduce this code down to 13 methods not including the main and reduce any extra lines without using array's public class Song { public static void main(String args) { One(); Two(); Three(); Four();
2
1243
nomad
by: nomad | last post by:
Hello Everyone: I back trying to learn Java again. Here is what I'm trying to do. 1. How does the code inside the visitPennsylvania method refer to the variable with vale "red Planet". I know to that you need to use. this. But I can not figure out how to use it. Here are my two class. import static java.lang.System.out; public class EnglishSpeakingWorld { String mars = " red planet";
1
6501
by: madman228 | last post by:
Hi guys I have run in to a littl bit of trouble. I am writing a class called polynomial in which i need a derivative method I have everything, just dont know how to start the derivative method. Any help will be appriciated here is the code: import java.io.*; import java.util.Scanner; public class Polynomial extends UnorderedArrayList { Scanner sc = new Scanner(System.in); //Default constructor
4
7911
by: lilyumestar | last post by:
I have project I have to do for class. We have to write 4 different .java files. Project2.java HouseGUI.java House.java HouseSorting.java I already finish House.java and I need to work on both the Project2.java and HouseGUI.java Here are the requirements for those two. The GUI Create a class called HouseGUI which extends JFrame. It should display two text areas (JTextArea) in a grid layout (1 row, 2 columns). Your main program,...
3
11126
by: zlwilly | last post by:
Hi everyone! I have written two classes, Fraction and useFraction. Fraction holds all of the methods required to process the data from useFraction, which consists of private ints that are turned into separate fractions. The source for the classes looks like this: useFraction looks like this: public class useFraction { public static void main(String args) {
0
9682
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
10875
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
10566
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
10623
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
10272
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
7806
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
7001
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
4474
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
3
3124
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.