Welcome to AP Computer Science A. If you are a student in the class, the first thing you need to do (and which we should have done in class) is set up your GitHub account.
Once you have a GitHub account, click “Log in to GitHub” below to proceed.
If you don’t have a GitHub account yet, please create one and then log in here for further instructions.
Congratulations! You have successfully connected this app to GitHub. However you are not yet a member of the GitHub organization for this class, something Mr. Seibel needs to set up for you.
This is your GitHub profile URL:
Click the clipboard icon to copy it and then submit it at this form so he can add you.
Congratulations! You have successfully connected this app to GitHub. And it looks like you have an invitation to join the GitHub organization for this class. You need to accept that invitation before you can proceed. The invite should be sent to whatever email you used when you created your GitHub account.
I see you are logged into GitHub and a member of the berkeley-high-cs GitHub organization. However there seems to have been some problem finishing the setup for your account. Please let Mr. Seibel know.
This is a tool for the AP Computer Science A class at Berkeley High School. It is intended to provide a simple environment for experimenting with Javascript without all the complexities of a full development environment such as ReplIt or Glitch which we may use later in the year.
It is also designed to take advantage of the browser’s ability to run Javascript natively. It does not need access to a server to run code making in extremely responsive even if the Wifi is flaking out.
Finally, under the covers it is saving work to a GitHub repository in a very simplified workflow that does not depend on immediately learning any git commands. Code written in this environment for each assignment is saved to a directory and branch specific to that assignment each time it is saved. Thus when the assignment is done, it is easy to go to GitHub and create a PR containing just the work on that assignment which can then be commented on and worked on further before it is turned in and merged to main.
You're all set! You don't need to worry about this yet but we have successfully created a GitHub repository for your work:
You can get to it any time by clicking on your GitHub username at the top-right of the screen.
Write a method isEmpty
that takes a
String
argument and returns a
boolean
indicating whether it is the empty string (i.e.
the String
with no characters in it.)
Write a method nameOfCity
that takes no arguments and
returns a String
of the properly capitalized name of
the city where our high school is located.
Write a method shout
that takes a single
String
argument and returns a new
String
which is the same but all in upper case.
Write a method whisper
that takes a single
String
argument and returns a new
String
which is the same but all in lower case.
Write a method longer
that takes two
String
arguments and returns whichever one of them is longer or the first
argument if they are the same length.
Write a method isAtLeastNCharactersLong
that takes a
String
and an int
and returns a
boolean
indicating whether the given
String
is at least the given number of characters long.
Write a method whichCameFirst
that takes a single
String
argument that is guaranteed to contain both the
words “chicken” and “egg” and returns either
"chicken"
or "egg"
, whichever one occurs
first in the string.
Write a method isPlural
that takes a single
String
and returns true
if it a plural
word by the very simple rule of, it’s a plural if it ends in “s”.
Write a method combineToSame
that takes four
String
arguments and returns true
if
concatenating the first two arguments produces the same string as
concatenating the last two arguments.
Write a method email
that takes three
String
arguments, a first name, a last name, and a domain name (like
gmail.com), and returns an email address of the form: first initial
followed by the full last name, an @ sign, and then the domain, all
in lower case.
Write a method isPalindrome
that takes a single
String
argument and returns true if it is a palindrome,
i.e. its the same backwards as forwards.
Write a method isPalindromeIgnoringCase
that takes a
single String
argument and returns true if it is a
palindrome, i.e. its the same backwards as forwards ignoring
differences in case.
Write a method lastIndexOf
that takes two
String
arguments and returns the last index of
the second string in the first one or -1 if it does to occur. N.B.
you may not use the lastIndexOf
method defined
in Java’s String
class.
Usual drill. Write as many methods as you can. Note that some of these are designed to be hard enough to justify raising 3s to 4s. But if you’re aiming to increase to a 3 don’t worry if you can’t get them all. On the other hand, some of these are really quite easy—don’t psych yourself out by thinking it needs to be harder; they might really be that easy. (Back to Fall Final page.)
All topics: