AP Computer Science A - Unit 2: Using Objects

Sdílet
Vložit
  • čas přidán 4. 08. 2024
  • Study guide and exam review for Unit 2: Using Objects.
    APCSA curriculum in Java
    ap csa unit 2
    ➡️ Great AP CSA Exam Review Book: amzn.to/3RGN8ii ⬅️
    🎧🚀 Fun Sci-Fi Audiobook For Educators: amzn.to/3TItymu 🪐🎧
    Chapters
    0:00 Introduction
    0:20 Using Java Classes and Objects
    5:47 Methods, Parameters, and Return Types
    13:12 Escape Sequences ( \\ \" \'
    )
    16:05 String and String Methods
    23:58 Math Class
    26:55 Random Numbers With Math.random()
    30:40 Scanner Class For Taking User Input
    Also check out the College Board Advanced Placement AP Daily Live Review Sesson.
    #Java #JavaTutorial #APComputerScienceA

Komentáře • 23

  • @BillBarnum
    @BillBarnum  Před 7 měsíci

    ➡ Great AP CSA Exam Review Book: amzn.to/3RGN8ii ⬅
    🎧🚀 Fun Sci-Fi Audiobook For Educators: amzn.to/3TItymu 🪐🎧

  • @YTAccount82825
    @YTAccount82825 Před 2 lety +11

    Thank you so much for these videos! I couldn’t really find any other tutorials that explained in-depth enough to make you be able to understand the material proficiently but not too detailed to be confusing. Huge thanks!

    • @BillBarnum
      @BillBarnum  Před 2 lety +4

      Thanks for watching and commenting!

  • @soniciscoool7611
    @soniciscoool7611 Před rokem +3

    I learned so much in so little time. Thank you for making videos like these. I don't have to be searching a bunch of videos to understand each topic. Video is super helpful, Thank you! helped me a lot.

  • @kunnudev7250
    @kunnudev7250 Před rokem +1

    Great thanks so much for your help and support and guidance please make more videos like this awesome videos

  • @burakgok9895
    @burakgok9895 Před rokem +7

    This guy should go down in history as a legend

  • @aadarshbattula900
    @aadarshbattula900 Před 2 lety +2

    This video is really helpful, thank you so much!

    • @BillBarnum
      @BillBarnum  Před 2 lety +1

      Thanks for watching and commenting, Aadarsh!

  • @gabrielmanabat8411
    @gabrielmanabat8411 Před 2 lety +2

    TYSM

  • @seppuku8716
    @seppuku8716 Před rokem +1

    at 30:08 example 1, wouldn't there be a higher chance for Dorothy to be chosen compared to all the others? To get dorothy, you need 0, which would happen if math.random generated anything from 0 to 0.3, so there are 4 options for that. For glenda it would be 0.4-0.6, which is only 3, and for Toto it would also be 3, since it would be from 0.6-0.9

    • @BillBarnum
      @BillBarnum  Před rokem +1

      Excellent question. It won't be completely equal, but it will be extremely close. To get Dorothy (index 0) Math.random() would need to return between 0 and 0.3333333333333333, which is ALMOST 1/3.
      There are ways to do better but at the end of the day Math.random() returns a pseudo-random number, not a true random number. Some pseudo-random number generators are better than others, and to really go down a rabbit hole, type in pseudo-random vs. true random into CZcams.

    • @gloryer-chison4445
      @gloryer-chison4445 Před rokem

      actually, I was thinking about this as well, but I find out that the three indexes are equally distributed, which each of the index would obtain a 33.3% chance. Just noticed that math.random generates not only 0.1, 0.2, 0.3, but to the thousandths as well. bc you included 0, and excluded 0.9-1. btw, I think you are trying to say 0 to 0.3, 0.3-0.6, 0.6-0.999999999

  • @yojacq
    @yojacq Před 2 lety +2

    so helpful tysm

    • @BillBarnum
      @BillBarnum  Před 2 lety

      Thanks for the comment YoJacq. I'm glad it was helpful.
      Mr. Barnum

  • @realairlot
    @realairlot Před měsícem

    30:20 wouldn’t this just make it so anything only equal to zero would be heads? What if the random generator generated 0.12 for example? Then the only possibility to make it heads would be 0 no? Making it harder to actually get heads and thus, not making it a 50/50 chance.
    So instead of that, could I do if(coinFlip < 1), SOP(“Heads”) so it’s actually 50/50? Or am I thinking of this number generator wrong?

  • @shriya6235
    @shriya6235 Před 3 měsíci

    are scanner inputs tested on the ap csa exam?

  • @aditya1126.
    @aditya1126. Před 3 měsíci

    16:34 - 23:58

  • @egqos
    @egqos Před 5 měsíci

    W

  • @semiasims0714
    @semiasims0714 Před 2 lety

    My daughter is taking a high school CSA class learning JAVA 1.16 math riddle numbers. but she can't figure out how to do the equation. Do you have videos to help?

    • @BillBarnum
      @BillBarnum  Před 2 lety

      Hi Semia,
      It sounds like that lesson may be part of a specific curriculum that I'm not familiar with.
      If you have a link to that problem, I might be able to point you in the right direction.

  • @darthyoutube1914
    @darthyoutube1914 Před rokem +3

    Bill you are so helpful. Thank you soooooooo much!!!!
    System.out.print(“Thank you!!!”);

    • @BillBarnum
      @BillBarnum  Před rokem

      Thanks for watching and commenting, Darth!