natashatherobot / stanford-cs-106a Goto Github PK
View Code? Open in Web Editor NEWWomen Learning Code references
Home Page: http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111
Women Learning Code references
Home Page: http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111
Hi All, This is the new github repository where I will be posting the solutions that I come up with for the Stanford CS 106A course. Best, Natasha ATTENTION: STANFORD STUDENTS If you are a current CS 106A student at Stanford University who has not yet made a final submission of this assignment, then looking at this solution for any amount of time constitutes a violation of Stanford's Honor Code. The CS 106A course staff runs similarity-detection software each quarter over all current and past assignment solutions. The solutions contained in this web site are included in the batch of solutions given to that software. Any submission influenced by the solutions here will be flagged for plagiarism, and submitted to the Office of Community Standards for violating the Honor Code.
FYI - the lecture videos are no longer available for this course.
BUT you can access videos for the same course from a different year (2008) via iTunes university for free. The subject matter appears to be the same so is compatible with the handouts/assignments provided here.
Your solution breaks on the SampleQuad2 map. Ive made a solution for this but not sure if it's the best way of doing it.
/*
* File: StoneMasonKarel.java
* --------------------------
* The StoneMasonKarel subclass as it appears here does nothing.
* When you finish writing it, it should solve the "repair the quad"
* problem from Assignment 1. In addition to editing the program,
* you should be sure to edit this comment so that it no longer
* indicates that the program does nothing.
*/
import stanford.karel.*;
public class StoneMasonKarel extends SuperKarel {
public void run() {
while(frontIsClear()) {
ColRepair();
nextCol();
for(int i = 0; i < 4; i++) {
move();
if(frontIsBlocked()) {
ColRepair();
nextCol();
}
}
}
}
private void ColRepair() {
turnLeft();
for(int i = 0; i < 4; i++) {
while(beepersPresent() && frontIsClear()) {
move();
if(!beepersPresent()) {
putBeeper();
}
}
beeperCheck();
}
}
private void beeperCheck() {
if(noBeepersPresent()) {
putBeeper();
if(frontIsClear()) {
move();
}
}
}
private void nextCol() {
turnAround();
while(frontIsClear()) {
move();
}
turnLeft();
}
}
This repository is probably responsible for more violations of the Stanford honor code than anything else on the internet. I know it's not your responsibility to police Stanford students, but having online solutions to all the CS106A assignments at the tips of their fingers makes it that much likelier that students will cheat. What do you feel is being gained by keeping these solutions online?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.