+ 2
I need help with my java code as errors are coming up.https://code.sololearn.com/cCYGP0raCLGZ/?ref=app
The erros is a illegal start of expression
20 Respuestas
+ 3
Irtaza Qayyum
No I didn't but I changed your code and it is working now
https://code.sololearn.com/cWyvr8590GWy/?ref=app
+ 3
Can't test it. Many wrong character in there. Looks like the code is copied from an IDE.
But look here:
public String getCode()
{
return this.code;
}
The closing '}' is missing
+ 2
Thank u so much A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟
+ 1
It would be better, if you link your code in the post/question, not in a tag. Nobody can open it.
But you can tag the languages which you are asking for.
+ 1
Thank youA͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟
+ 1
Irtaza Qayyum
Just written fresh code by removing extra characters.
And also in println l is small letter of L not capital letter of i
0
Coding Cat thanks
0
Irtaza Qayyum
I think you used { } at wrong place. Will you please show your code?
0
Coding Cat I'm not sure why what's going on here but I can show the end goal I'm trying to get
0
I'm using github atm
0
Irtaza Qayyum
You have many mistakes like
credits should be credit here private int credits;
public String getTitle(); //Semicolon is at wrong place
{
return this.title;
}
You missed } here
.public String getCode()
{
return this.code;
No need to write this when you return private attributes.
0
1. A new class called Module and create a suitable constructor.
2. Variables for the code, title and credit value for a Module
3. Methods to get the value of those variables
4. A method to set a value for the module's credit.
5. A method to print all the details of a module.
6. A new variable so that a course can contain one module
7. A method in the course class to add a module to a course.
8. A modified Course print method that prints the details of the course and the module
0
My end goal is to be at step eight
0
Wow
0
How did u do that A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ Am I able to use this code
0
Irtaza Qayyum
Yes why not
- 3
Oh thanks do you use github A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟