Maya Williams

Greenhorn
+ Follow
since Feb 19, 2020
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
5
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Maya Williams

Some plugins require plugin org.jdesktop.layout to be installed.

The plugin org.jdesktop.layout is requested in version 1.19.1.

The following plugin is affected: Web-CAT Electronic Submitter UI



Above is the message that appears when I try to install the Web-CAT plugin. Does anyone have input on how I go about fixing this issue?
Where can I find and access the org.jdesktop.layout plugin?
1 week ago

Maya Williams wrote:

Junilu Lacar wrote:It seems that you don't quite understand how Scanner.next() works vs. Scanner.nextLine(). The former will take one token (word) from the input whereas the latter will take an entire line. Notice how the question displayed back to the user only contains one word.



Hello. The main reason I did the many Scanner.next() and nextLine() was because originally when I ran my program, All of my statements within the addQuestion() method would out print together so it wouldn't allow me to add input for each statement. Is there another way for this to be fixed? Are you saying the Scanner.next/nextLine() are causing the problems within the takeQuiz() method. Sorry, I am still quite new to Java.



I also fixed the question.add(input.next()); to question.add(nextLine()); however I still have problems when I run the method.
3 months ago

Junilu Lacar wrote:It seems that you don't quite understand how Scanner.next() works vs. Scanner.nextLine(). The former will take one token (word) from the input whereas the latter will take an entire line. Notice how the question displayed back to the user only contains one word.



Hello. The main reason I did the many Scanner.next() and nextLine() was because originally when I ran my program, All of my statements within the addQuestion() method would out print together so it wouldn't allow me to add input for each statement. Is there another way for this to be fixed? Are you saying the Scanner.next/nextLine() are causing the problems within the takeQuiz() method. Sorry, I am still quite new to Java.
3 months ago
Hi, I am creating a program to simulate a quiz. It allows the user to enter 1 to add a question to the quiz, and 2 to take the quiz. My program works correctly up until I try to take the quiz (takeQuiz();) I am assuming that user input within the addQuestion() method is not storing within my string arrays. I have included an image to show the output when I try to take the quiz (Formatting for the question is messed up and it fails to display the answer choices). Any help is appreciated!

3 months ago
Hi, I am creating a program to simulate a dice game. I think I am having issues with finding winners. I have run it many times and no matter how many different numbers I enter, nobody ever wins. If you can take a look at my code (specifically the checkWinner and playGame methods) I would really appreciate any help.


Below I attached a screenshot of the interactions pane when I enter multiple players each individually entering one of the numbers between 2 -12) This shows that it is not detecting a winning number, it says each player loses.

CHECK WINNER METHOD


PLAY GAME METHOD



PLAY TURN METHOD

3 months ago

Junilu Lacar wrote:Where does the while-loop that starts on line 10 end? What line # is it's matching closing } ?



Thank you; although, while loops aren't the best, I was simply missing the } to end it. It is working properly now
3 months ago
Here are the instructions for the method playTurn()
9.Implement the playTurn() method. In this method:

1)Tell the player their balance, and ask them to enter the amount to bet. If the amount exceeds the balance, output “Bet balance exceeds available funds” and ask the player to enter the amount of the bet. Repeat until the player’s bet is less than or equal to the bet balance. Assign the input to the player’s betAmount field. Update the player’s balance by subtracting the bet amount.

2)Prompt the player to enter their guess. Assign the input to their guess field. Your program should not accept the input if it is not in the range of 2 and 12.


When I run my code, it doesn't prompt the user to enter their guess between 2-12 and I cannot figure out why. I attached an image of the interactions pane when I run it now. It also doesn't seem to register the user's bet amount.


Here is MY CODE:
3 months ago

Dave Tolls wrote:What are the issues you are having?



I am having issues with declaring each course Name (ex.ITSC 1212) with its appropriate time (ex.9:00-10:00) and its course lecture room (ex. Woodward) and it's appropriate days (Mondays and Wednesdays). I am unsure how to do this properly for each individual course. Also, I am unsure of how I will eventually compare each class's information to make sure there are no time conflicts.
3 months ago
Hi, I was looking for any advice or suggestions on how to begin this program. My main issue is figuring out how to declare each class with its appropriate lecture room and scheduled days and times. I know I need to use 2-D and parallel arrays; however, I keep having issues. The instructions are as follows:

-The student will enter five courses they would like to register for

-Based on the schedules provided for the two lecture rooms (I provided an attachment of the schedules), the application determines whether the student’s choices are possible

-If they are, display a message that tells the student that they have been registered for their desired courses and exit the application

-If there is a time conflict, or the course isn’t offered, display a message that informs the student of their issue and allows them to either enter a new full set of courses or exit the application

-You must utilize two-dimensional and parallel arrays



3 months ago
Hi, I have to write this code as a method; It is within a class called "WorkshopActivity2" that includes 5 other methods I have written. Can I still create the name and time fields if it is written as a method? I am new to Java still; so sorry If my questions seem quite basic.
3 months ago
INSTRUCTIONS:

Write code that allows the user to enter a series of integers. The user should enter -99 to signal the end of the series. Then display the largest and smallest numbers entered, not including the flag (-99).

Here is my code: (I know that it is not correct whatsoever, but I wanted to provide at least what I have. I cannot figure out how to find the smallest and largest of the inputted integers.

3 months ago
Hi, I am having trouble creating the following program:

INSTRUCTIONS:

The user will input the names and times in minutes that 5 racers took to complete a race.
Write code that displays the 1st, 2nd, and 3rd places in the race.
Your display must include rank, racer name, and time to complete the race:
1st place: Marlon Mejias  1.5 mins
2nd place: Lijuan Cao   2.3 mins
3rd place: Debarati Basu  2.5 mins

Here is the code I have written so far; however, I am having difficulties figuring out what to do next. I need to figure out which of the 5 racers will be in 1st, 2nd, and 3rd. Any help is much appreciated. I am new to creating programs like this.


3 months ago

Campbell Ritchie wrote:

Maya Williams wrote:. . . my textbook . . .

That looks an interesting method you have got there. Please tell us which book, so we can see it for ourselves. I have a few queries about that method:-
  • 1: Whoever wrote that thinks their readers' photographic subjects spend too much time watching TV: they have got square eyes. Maybe you could (?R?)click the eye's centre and get a dropdown list including “remove red‑eye” and work out how to do it in a circular pupil?
  • 2: What does it say about colour distance? Where does 167 come from?
  • 3: I am not sure you need to declare pixel in line 2. Try deleting line and changing line 7 to read,
  • 4: When they use < as you usually do in a for loop, do they expect the end to be selected one pixel beyond the lower right “corner” of the eye?


  • Hi, the textbook is called "Introduction to Computing and Programming with Java" by Mark Guzdial and Barbara Ericson. To be honest, I am not sure where the number 167 comes from. The book explains they used picture explorer to find the upper-left and lower-right corners of the were and those points were (109,91) and (202, 107)

    The problem I am having is I have entered the code exactly how the textbook says to so maybe there's a textual error in the textbook. Otherwise, it should compile..
    [/code]
    6 months ago
    Hi, I have copied this code from my textbook to add to my java file. For some reason, it will not compile even though I typed it word for word. I keep getting an "illegal start of expression" error. Could anyone help me?

    6 months ago

    Piet Souris wrote:hi Maya,

    if you have loaded and created your picture, you can derive the pixeldata with the method 'getPixels'. Make a copy of the pixeldata with the methos 'Arrays.copyOf'.

    When going to the "Dutch" mode you can calculate the pixels using the pixeldata in that copy.

    But don't you suffer from the same problems when using, in sequence, the three tint-methods?

    And Campbell is right. If you say: int newRed = oldRed * 5, then this will not overflow, but that value might be biigger than 255. In the Java Color class, that will give an Exception.



    I am new to Java and am not familiar with the method "Arrays.copyOf." Could you offer an example?
    6 months ago