Giter Club home page Giter Club logo

apclass's Introduction

APClass

Homework and Problems for Groton AP Computer Science

// See all files in 'src' folder

9/16/14 Chapter 2

  1. C++, Ruby, Python, JavaScript

  2. A

  3. a) I get "error: illegal character: ''"

    b) They are used to document comments.

  4. See HomeworkFace9.java

  5. a) See DoubleIntegers11a.java

    b) It concatenates strings and numbers. The extra set of parentheses specify that it is a mathematical operation.

  6. See HWBanner15.java

9/20/14 Chapter 3

  1. a) True, a class "Flower" must be stored in a file named "Flower.java".

    b) True, in Java all names are case-sensitive.

    c) False, the "import" statement tells the compiler which other classes this class uses.

  2. a) True, you should only allow access to what users need.

    b) True, you can't refer to something that doesn't exist.

    c) True, you can have multiple constructors with arguments or no arguments.

    d) True, the names are used to refer to specific objects.

    e) False, some objects do not even have init methods.

  3. i) It is easier to modify. You do not have to manually change every reference in the source code. The getter can access the one changed field.

    ii) Users cannot access and change a field's value directly. They will only receive values through a getter. This enhances security.

    iii) You can document a class for other programmers who want to use the class by describing all its constructors and public methods; there is no need to document the implementation details.

  4. For (a, b) in GridWorld, a is the row and b is the column. Rows and columns are counted from 0.

  5. See BookTestPackage folder and Book11.java

  6. a) True

    b) False

  7. a) Yes, Actor to Actor (Superclass to Class)

    b) Yes, Actor to Bug (Superclass to Class)

    c) Yes, Actor to Flower (Superclass to Class)

    d) No, Bug to Actor (Subclass down to Superclass)

    e) No, Flower to Actor (Subclass down to Superclass)

    f) No, Wrong variable entered in field

    g) Yes, Class to Class

    h) Yes, Class to Class and valid variable

    i) Yes, Bug to Boxbug (Superclass to Class)

See BugRunner16.java and BoxBugRunner16.java

Questions from Chapter 3:

-How do you complete the program on page 69?

-How do you change an object or class from public to private and keep the program functional?

-Can we review Exercise 11 on page 74?

apclass's People

Watchers

James Cloos avatar Malik Jabati avatar

Forkers

juchkell

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.