Giter Site home page Giter Site logo

bhoffman0 / csawesome Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ericsonga/apcsareview

28.0 3.0 140.0 99.91 MB

This is the CSAwesome curriculum Runestone repo for the AP CS A Java Course

Home Page: https://runestone.academy/runestone/books/published/csawesome/index.html

License: Other

Python 5.41% HTML 3.09% CSS 1.42% Java 88.23% JavaScript 1.86%

csawesome's Introduction

CSAwesome

This is an eBook curriculum for the AP Computer Science A Exam on Runestone at https://runestone.academy/runestone/books/published/csawesome/index.html.

Authors

This book is based on the Java Review ebook written by Barbara Ericson of University of Michigan - @ericsonga

This book was revised by Beryl Hoffman of Elms College and the Mobile CSP project in 2019 for the 2019 AP CS A exam.

Many others have contributed. For the most up to date listing of who has contributed to the ebook see the preface in Unit 1.

csawesome's People

Contributors

amonrs avatar anujinm avatar arvindh-manian avatar aunyks avatar axeinator avatar barbarer avatar bhoffman0 avatar bnmnetp avatar bsimonucsd avatar carlosdiaz723 avatar christinehsieh avatar ember1050 avatar emkbrown avatar ericsonga avatar esayles avatar gabbyjackson avatar gigamonkey avatar jfigliulo avatar juan8659 avatar kiwo12 avatar kmcdonnell2 avatar sanjanadg avatar seibelsabrina avatar thatrobotdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

csawesome's Issues

Unit 4 Consumer Review Lab is out-of-sync with Replit

It looks like the Review.java file in the Unit 4 Consumer Review Lab is missing the removePunctuation method that was added to the same file in Replit. Based on the comment it sounds like the method was added to the teacher code.

9.5.3. Superclass Arrays and ArrayLists Unit Test

The last unit test, "Checking that code contains petList.add(new Cat())" fails unless a call to the constructor of Cat is passed null.
Specifically,
import java.util.
; // for ArrayList

public class Pet
{
private String name;
private String type;

 public Pet(String n, String t)
 {
    name = n;
    type = t;
 }
 public String toString()
 {
    return name + " is a " + type;
 }

 public static void main(String[] args)
 {
     ArrayList<Pet> petList = new ArrayList<Pet>();
     petList.add(new Pet("Sammy","hamster"));
     petList.add(new Dog("Fido"));
     petList.add(new Cat("Fluffy"));
     petList.add(new Cat("?"));
     petList.add(new Cat(null));                   // passes with this statement; fails otherwise
     
     // This loop will work for all subclasses of Pet
     for(Pet p : petList)
     {
        System.out.println(p);
     }
 }

}
class Dog extends Pet
{
public Dog(String n)
{
super(n, "dog");
}
}

class Cat extends Pet
{
public Cat(String n)
{
super(n, "cat");
}
}

Autograder Issue for 4.1.5

Hi @bhoffman0 and team.

A Coding Rooms user (JKearns) reported an issue with the autograder not passing the While loop test in the tests for 4.1.5. Both examples below pass all other tests.

This one here:
image

Here is an example of code that does not pass the while loop check, even though it does produce a while loop on run in Runestone:

import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        int num_r = (int)(Math.random()*101);
        System.out.print("Number 0-100: ");
        int user_g = scan.nextInt();
        while (user_g!=num_r)
        {
            if (user_g < num_r){
                System.out.println("Too low!");
            }
            if (user_g > num_r){
                System.out.println("Too high!");
            }
            System.out.print("Number 0-100: ");
            user_g = scan.nextInt();
        }
        System.out.print("You got it");


    }
}

Here is an example of code that does pass the while loop:

import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        // Choose a random number from 0-100
      
        int num = (int) (Math.random() * (100)) + 1;

        System.out.println("Try to guess a number between 0 and 100");
        int guess = scan.nextInt();

        while (guess != num) {
            if (guess > num)
            System.out.println("Too high!");

            guess = scan.nextInt();

            if (guess < num)
            System.out.println("Too low!");
        }
            if (guess == num)
            System.out.println("You got it!");
            
        scan.nextInt();
        if (guess == num)
        System.out.println("You got it!");

    }
}

Code Assignment 7.4.1.3 autograder issue

Hi Beryl,

One of the Coding Rooms users noticed that a test case was not fulling passing even though it showed two individual tests that both passed.
image

The issue seemed to be related to the main method test not working properly.

@Test
   public void testMain() throws IOException
   {
     String output = getMethodOutput("main");
     String expect = "[TNA, BARCADABARA, PAPLE]";
     boolean passed = output.contains(expect);
     assertTrue(passed);
     System.out.println("expected output from main");
   }

Upon investigation, we noticed Runestone has the same issue.
image

Autograder issue for a 1.10 Code Practice Q

Hi @bhoffman0 and team.

A Coding Rooms user reported an issue with the autograder not giving full credit on one of the coding practice questions on 1.10.

It is this one:
image

Runestone and Coding Rooms only shows one test's result but there are two tests.

Sadly I do not have time right now to discover what the issue is and help. Was hoping maybe @kmcdonnell2 would be able to spot it easily.

CSA 12.2, Exam 2, Question 13

A Coding Rooms user reported an issue in the 12-2-13 question which appears to be present on Runestone around the 12th line:
image

AP Practice test 12.2 Exam 1 Question 13
Inner for loop should not have println

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.