Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Jordan Belford

Ranch Hand
+ Follow
since Mar 29, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jordan Belford

Paul Clapham wrote:That wouldn't be my question. My question would be "Why aren't the height and width values being set to the numbers I wanted them to be set to?"


This is a difficult question to answer since you're providing a limited amount of your coding, provide more information so that people can understand how you're trying to build your app and how you can fix the problem.
2 hours ago
I'm currently trying to master java. I would say I know an average to above average amount of java at this point in time. My current goal is to try to master java as well as possible and be able to create a decent application such as a video game or something else. Overall I would like to master as many coding languages as possible. I would like to make it my job do this and specifically to be self employed. How can I achieve this? All answers are greatly appreciated. Also how long on average will it take me to make a career from this?
3 hours ago

Norm Radder wrote:From the previous responses to this problem:
Have a Quiz class that holds a question and the correct answer(s) and score values for correct, wrong or close answers from user
Create a list of Quiz items.  This could be read from a file.
Use a loop that accesses the next Quiz item, asks the user the question, reads the user's response and compares that to the answer in the Quiz class.
Evaluate the user's answer and give a score.



I understand the concepts, but how do I put that code together for it to work? Idk how to format it, which line of code goes first and so forth That's my problem, i did it multiple times and I just deleted it since I was getting no where with it
1 month ago
I want to make a java game with multiple questions using encapsulation, for loop and if loop, and an array for the question, how do I do that? Can someone message me or post an example of how the code should look like? I have posted previously my code but ditched it since I didn't know how to proceed with it.
1 month ago

Campbell Ritchie wrote:Don't duplicate the code in lines 12‑17; use a loop or a Stream.


how do I do that and where in my code do I place it?
1 month ago




error:
C:\GameApp.java:10: error: cannot find symbol
Game myGame;
^
 symbol:   class Game
 location: class GameApp
C:\GameApp.java:11: error: cannot find symbol
myGame = new Game();
             ^
 symbol:   class Game
 location: class GameApp
C:\GameApp.java:13: error: array required, but String found
ques[0] = JOptionPane.showInputDialog("what is the answer to question1");
    ^
C:\GameApp.java:14: error: array required, but String found
ques[1] = JOptionPane.showInputDialog("what is the answer to question2");
    ^
C:\GameApp.java:15: error: array required, but String found
ques[2] = JOptionPane.showInputDialog("what is the answer to question3");
    ^
C:\GameApp.java:16: error: array required, but String found
ques[3] = JOptionPane.showInputDialog("what is the answer to question4");
    ^
C:\GameApp.java:17: error: array required, but String found
ques[4] = JOptionPane.showInputDialog("what is the answer to question5");
    ^
C:\GameApp.java:18: error: array required, but String found
ques[5] = JOptionPane.showInputDialog("what is the answer to question6");
    ^
C:\GameApp.java:24: error: no suitable method found for showMessageDialog(String)
JOptionPane.showMessageDialog("your results" +message +points+ "6");
           ^
   method JOptionPane.showMessageDialog(Component,Object) is not applicable
     (actual and formal argument lists differ in length)
   method JOptionPane.showMessageDialog(Component,Object,String,int) is not applicable
     (actual and formal argument lists differ in length)
   method JOptionPane.showMessageDialog(Component,Object,String,int,Icon) is not applicable
     (actual and formal argument lists differ in length)
9 errors

Tool completed with exit code 1






Trying to make the questions equal each message dialog and for each answer to equal each question. And at the end to show the user the results but idk how to fix anything or where to even start from, please help
1 month ago

Campbell Ritchie wrote:...or do you mean how do you verify that you haven't copied code from elsewhere? Round here, we used to use a program called turnitin (or similar); it searches for similar code throughout the net and Academia worldwide.



Yes, how do I use this program for free?
1 month ago
How do I check if my java code is plagiarized? I need something very accurate, like high institution level that is preferably free.
1 month ago

Junilu Lacar wrote:

Jordan Belford wrote:I can't share any code due to plagiarism security reasons. I would also like to get information only in words not coding as I don't want to get plagiarized.


That severely limits the options for helping you. Without code to look at and discuss, we won't know exactly where and how things are going wrong for you. Any suggestions made that do not include code examples can quickly be misinterpreted and mistranslated to code, resulting in the wrong thing. You might be in for a long and frustrating haul. Good luck.



Can I delete thread after if I post my code and once I got the solution?
1 month ago

Norm Radder wrote:

how to make each answer equal to a certain question


I don't understand what that means.  Can you explain and give an example.

how I can add a a point for each question


Where are the points being kept?  

the total score


Would that be the sum of the points that were kept somewhere?



I mean I want the answer to be assigned to a question. So that if the user gets it right it adds a point to his total score otherwise nothing is added if he gets it wrong.

The score is kept in the main class, they're made private at the start and the values are assigned in a method
1 month ago

Norm Radder wrote:Use field(s) in a class to save scores.


I did that for my score, I'm also using private string array for my answers and used a method to assign the variables to that string array like the answers for my questions and assign the score to 0; but idk how to make each answer equal to a certain question and how I can add a a point for each question and how to then show the total score at the end and also show the results such as if the total is 3/10 then it equals pass, if it equals 9/10 it equals excellent and so forth. How do I do that?
1 month ago
How do I add a scoring system to my program if I'm using OOP I want to put all my datatypes in private and create the methods in one class and then do the application from another class. I am trying to ask the user a couple of question, and for him to get the the total right he got out of the total possible he could have got right. And for a grade to appear such as if he got 5/10 for the grade pass to come up, and if he got 9/10 an excellent to come up. How do I do this? I can't share any code due to plagiarism security reasons. I would also like to get information only in words not coding as I don't want to get plagiarized. Sorry if I used any incorrect terminologies but I am new to java coding. I am also trying to do it a certain way as I am trying to fill in a certain parameters, such as using OOP, private, if loops, for loops and array. Hopefully someone can help me as I am very lost and have been looking for hours for an answer but I don't know how to put them together for it to fit my parameters. I have looked at encapsulation and at for loops, and at if loops but idk how to put them together for it to come out for what I need to accomplish. All the help would be appreciated alot!!
1 month ago

Norm Radder wrote:

I have most of the concepts in my head


Good, that is a first step.  Now for us to be able tp help you improve and implement your design can you post  the details of the design so we can work on that before trying to write any code.
Once there is a good design for the program. then you could ask specific questions about any of the steps that are giving you a problem.  



What do you mean by design?
1 month ago

Norm Radder wrote:Is the reason you don't want to do a design for the project because of  can't show my work because of security reasons?


Partially but I changed the class names and variables so they're different to my actual ones so the security issue is no longer there. I have most of the concepts in my head but I don't know how to implement them into my program and I tried to find a way of doing it but there's no solution to my specific problem and so this is why I made this thread
1 month ago