West Ranch High School

Skip to main content
Main Menu Toggle

Assignments

Upcoming Assignments RSS Feed

No upcoming assignments.

Past Assignments

Due:

Final Project:  Card Game
 
Using the Elevens lab as a base, develop a proposal and implement a new card game. This project can be completed in groups up to 3 students.
 
The proposal, submitted through Google Classroom, must include the names of the participating group members, a description of the game to be created, and assignments for each member of the group. All members need to be responsible for a portion of the programming for the game.
 
If the game is a multiplayer game, it is not necessary to "hide" one players cards from the others.
 
The Elevens lab provides the model for the display of cards. Proposals must be submitted no later than Monday 5/21. Projects will be shared with the class during the final exam period

Due:

Elevens Lab
Complete a working Thirteens game from Activity 10

Due:

Review Materials: This is not graded. It is just a resource to help prepare for the exam
 
Practice Multiple Choice tests
 

Due:

Due:

Rabbit Hunt
 
Complete the assignment in Google Classroom

Due:

CodingBat: 15 questions from the AP-1 set.

Due:

Picture Lab QuickCode: Write two unrelated methods for the Picture class. Full value if complete by 7:45.
  • Write a method int getCountRedOverValue(int value) that returns a count of the number of pixels in the current picture that have a red value more than the parameter value.
  • Write a method setRedToHalfValueInTopHalf() that sets the red value for all pixels in the top half of the picture to half the current red value.
  • Modify the main method in the Picture class to test the two new methods using the Beach picture. Test the first method with values 100 and 200.

Due:

Picture Lab: Steganography-Steganography is the science of hiding information in a picture. You can hide a black and white message inside a color picture by first changing all the red values in the original color picture to be an even value (by subtracting one if odd). Make a picture of the same size out of the message that will be hidden. Then loop through both the original picture and the message picture, setting the red value of a pixel in the original picture to odd (by adding one to it) if the corresponding pixel in the message picture is close to the color black. Write an encode method that takes the black and white picture message and changes the current picture to hide the message picture inside of it. Then also write a decode method that returns the picture hidden in the current picture.

Steganography Graded Projects-
  • Hide three different messages in one picture at the same time. One of the hidden messages must be a black and white (not grayscale) lineart image. You should be able to selectively choose which message to decode.
  • Embed a 3-bit rgb image inside of a picture.

Due:

Picture Lab 1
Copy the Picture Lab folder from the common drive
Complete parts A1 through A4 of the Picture Lab from the Student Guide
Answer the questions at the end of each part in a Google Doc in the Google Classroom assignment

Due:

Quickcode- Using the files in the Inheritance QuickCode folder in the common drive, create EquilateralTriangle and RightTriangle classes that are derived from the abstract Triangle class. The Right Triangle should create an Isosceles Right Triangle. Provide an appropriate constructor for each of the classes and have them call the superclass's constructor. Redefine the abstract methods appropriately in the derived classes. Complete the declaration statements in the TriangleTester class. Compile all classes and run the TriangleTester. Full Value if complete by 11:45

Due:

Abstract Classes - Pets
Using the Pet class from the common folder, add at least one additional instance variable, at least one additional implemented method, and at least one additional abstract method.
Modify the Dog and Snake classes to use your new variables and methods.
Create one additional subclass for the Pet class.
Modify the Pets driver class to test the new features.
 
Polymorphism additions
Modify the Pets driver class to create an ArrayList of Pet objects.
Add Pet subclass objects to the ArrayList
Use an enhanced for loop to print the contents of the ArrayList (testing the use of toString())
Use instanceOf and typecasting to test the ability to use the specific methods of the classes.

Due:

Monetary Coin Programming Project:
Design and implement a class called MonetaryCoin that is derived from the Coin class from Chapter 4. Store a value in the monetary coin that represents its value and add a method that returns ts value. Create a main driver class to instantiate ten coins. Flip each coin, print the value and face of the coin and then print the sum of the coins that show heads.

Due:

Fall Final Exam Review Sheet: The linked document contains the topics that may be tested on the Final Exam.  Review the list and ask questions about any topic that you do not understand.

Due:

Programming Project 6.8
  • Using the Card class the common folder or your Card class from project 4.6, Create a class called DeckOfCards that uses an ArrayList to store 52 objects that are instances of the Card class creating a standard deck of playing cards. Include methods to shuffle the deck, deal a card, and report the number of cards left in the deck. The shuffle method should assume you have a full deck. Create a driver class with a main method that deals each card from a shuffled deck, printing each card as it is dealt.

Due:

Arrays
CodingBat: Array-1 and Array-2: 10 problems from each set

Due:

Array Programming Projects
  • Programming Project 6.1: Design and implement an application that reads a number of integers that are in the range 0 to 50 inclusive and counts how many times each one is entered. After all input has been processed, print all of the values with the number of times each one was entered.
  • Programming Project 6.2: Change the program from 6.1 so that it works for numbers from -25 to 25.

Due:

ArrayList Quickcode- Using the files in the ArraylistQC folder in the common drive, complete the employeeIsEligible() and processRetirements() methods of the Company class. Period 1: Full value if completed by end of class.
You should not need to change any class other than the Company class, but you will need to compile the other classes.
Use the CompanyTester class to check that it works correctly.  An employee is eligible for retirement if (s)he meets at least two of the following requirements.
  • The employee is at least RETIRE_AGE years old.
  • The employee has worked for at least RETIRE_YEARS years.
  • The employee's salary is at least RETIRE_SALARY.
 
Method processRetirements removes all retirement-eligible employees from ArrayList myEmployees and maintains the following conditions: the ArrayList is maintained in order by employee ID and myTotalSalary is the total of all salaries of the remaining employees.

Due:

  • Programming Project 5.2: Change the Rational class from Chapter 4 (available in the Common folder) so it implements the Comparable interface. To do the comparison, computer a floating point value from the numerator and denominator for both Rational objects, then compare them using a tolerance value of 0.0001. Write a main driver to test your changes.
  • Programming Project 5.6: Design a Java interface called Lockable that includes the following methods: setKey, lock, unlock, and locked. The setKey, lock, and unlock methods take an integer parameter that represents the key. The setKey method establishes the key. The lock and unlock methods lock and unlock the object, but only if the key used is correct. The locked method returns a boolean of true for locked and false for unlocked. A Lockable object is an object whose regular methods are protected: if the object is locked, the methods cannot be invoked. Redesign and implement a version of the Coin class so that it is Lockable. A locked coin can be looked at to see if it is heads or tails, but it can not be flipped.

Due:

  • Interface QuickCode:
    • Copy the Interface QuickCode folder from the common folder to your drive (available after instructions are given in class)
    • Compile all of the files in the folder
    • Create and compile class files for the Eggs, Bacon, and Juice classes that implement the edible interface
    • Run the BreakfastTest file to test completion of the project
    • Full Credit if complete by the end of the period

Due:

Programming Project 4.5 - Game of Pig - Using the PairOfDice class, design and implement a class to play a game called Pig.  In this game, the user competes against the computer. On each turn, the player rolls a pair of dice and adds up the points. Whoever reaches 100 points first wins. If a player rolls a 1 on either die, all points for that round are lost and the die pass to the other player. If a player rolls 2 1's on the same roll, all points earned in the game are lost and the player loses control of the dice. The player may voluntarily turn over the dice after each roll, so they have the choice to roll again (be a pig) or turn over the dice and let the other player have a turn. Set up the computer player so that it always gives up the dice after getting 20 or more points in a round.  Modify your PairOfDice class as necessary to add functionality for this game without impacting the ability to use the Boxcars program.

Due:

Chapter 4 Multiple Choice Questions discussion
Programming Project 4.6: Design and implement a class called Card that represents a standard playing card. Each card has a suit and a face and a value. Create a program that displays 20 random cards. You can either have a default constructor that creates a random card or you can send random data as arguments to the constructor.  The 20 cards do not have to be unique.

Due:

Chapter 4 Programming Projects

Programming Project 4.3: Write an application that rolls a die and displays the result. Let the user pick the number of sides on the die. Use the Die class from the common folder to represent the die in your program.

Programming Project 4.4: Design and implement a class called PairOfDice, with two six sided Die objects. Create a driver class called BoxCars with a main method that rolls a PairOfDice 1000 times, counting the number of box cars (two sixes) that occur.

Due:

HW: Read Textbook Chapter 4. Answer Multiple Choice Questions 4.1-4.10 on pp244-247

Due:

  • Read about loops at http://codingbat.com/doc/java-for-while-loops.html
  • Complete 10 Exercises in CodingBat String-2
  • Textbook Programming Project 3.10
    • Design and implement an application that plays the Hi-Lo guessing game with numbers.  The program should pick a random number between 1 and 100(inclusive), then keep asking the user to guess a number. On each guess, report to the user that he or she is correct, guess is high, or guess is low. Keep accepting guesses until the user guesses correctly or quits. Use a zero (0) guess for the user to quit. report the number of guesses made after the user guesses correctly.

Due:

Midterm Exam
  • Midterm on Friday 10/13 (Period 1 will start the Midterm on Thursday 10/12)
  • End of First Quarter Friday 10/13
  • HW: Complete Midterm Study Grid for in class review
    • Page 1 of the grid will be reviewed on Thursday 10/5
    • Page 2 of the grid will be reviewed on Tuesday 10/10 for period 1 and Wednesday 10/11 for period 5.

Due:

 
Recursion Exercises
 
  • CodingBat Recursion-1 (10 problems)
  • AP-Style free response question 8.1 (textbook p. 510). Include a main method to test the three methods. All methods must implement a recursive solution. Change the triple method to return three times the value of a passed int instead of working with an array. You may modify the parameters for the triple method if necessary. Save as MathUtils.java.
public class MathUtils
{
  public static int factorial(int n){
 
  }
  public static int power(int base, int exp) {
 
  }
  public static int triple (int a) {
 
  }
  public static void main (String[ ] args){
 
  }
 
 
}

Due:

NCWIT Award for Aspirations in Computing
The NCWIT is an organization that promotes the role of women in technology. The Aspirations in Computing award opens up opportunities including scholarships for women who are interested in pursuing studies in computer related fields. West Ranch student Sarah Castillo was an affiliate award winner last year. More information at https://www.ncwit.org/
 
For information only.  This is not an assignment for the class

Due:

  • Recursion and Conditionals Quiz: You will be expected to trace recursive code to determine the result and be able to identify the base case and recursive case of a recursive method. You should know the dragon's three rules for recursion. You will be expected to trace and write code using if and else statements. Understanding of methods of the String class will be necessary for this quiz.

Due:

CodingBat
Complete at least 10 problems from each of the following sets:
  • Warmup-1
  • String-1
  • Logic-1

Due:

Magpie Lab Graded Assignment
 
Make a copy of Magpie3 called MagpieFinal and add the following functionality:
 
1. Change the greeting so that Magpie asks for the users name and then stores the name in a variable. The name should then be used randomly in the responses.
 
2. Add code to respond to the phrase "Tell me about..."  Choose two topics with at least two keywords for each topic. Have three responses for each topic. Each time that the user asks about the topic using any associated keyword, it will give a different response. When it runs out of responses for that topic, it should respond "I don't know any more about " with the name of the topic. If the Tell me about phrase is not one of the topics, it should respond "I don't know anything about" with the topic.
 
Make a copy of MagpieRunner3 called MagpieRunnerFinal. Modify it as necessary to make MagpieFinal work.

Due:

HW: Read Chapter 8 in the Textbook. Answer multiple choice questions 8.1 through 8.6 at the end of the chapter (p. 501)

Due:

 
Read Think Java Chapter 4
starting at section 4 by Monday 9/11

Due:

Magpie Chatbot Lab Activity 3.
 

Due:

Introduction to Magpie Chatbot Lab
 
Open the Magpie Lab Student Guide

Activity 1: Getting Acquainted with Chatbots. http://sites.google.com/site/webtoolsbox/bots


Due:

Magpie Chatbot Lab Activity 2
 
Copy Magpie Lab Folder from Common Drive to your G: Drive

Activity 2: Introduction to the Magpie Class. Open the Magpie2.java and MagpieRunner2.java files using jGrasp. Compile both classes. Complete Activity 2.

Due:

Programming Projects 2.2, 2.3, 2.6, 2.7, 2.8, 2.12
 
For each project, name the class and file with the name of the project. For example, Project2_2
 
  • 2.2 Write an application that reads three numbers and prints their average
  • 2.3 Write an application that reads two floating point numbers and prints their sum, difference, and product.
  • 2.6 Write an application that reads values representing a time in hours, minutes, and seconds. Then print the same time in seconds
  • 2.7 Write an application that performs the reverse of 2.6. Read a value representing a number of seconds then print the same amount of time in hours, minutes, and seconds.
  • 2.8 Write an application that reads the x,y coordinates for two points. Compute and print the distance between the two points.
  • 2.12 Write an application that determines the total value of coins in dollars and cents using keyboard input for the number of quarters, dimes, nickels, and pennies. Use the currency formatter to print the output.
 

Due:

Computer History through Advertisements
Examine the advertisements from the 1970s and 1980s on the Time Magazine Website
Working with a partner or in a group of three brainstorm questions that are raised by the ads. Think about the historical context of the ad images.
Rewrite any questions that can be answered with one or two words as open-ended questions.
For Friday, find at least one valid, reliable source that would be part of researching the question.

Due:

Blown to Bits part 2: Select at least 3 of the Koans from Chapter 1 of Blown to Bits. Write an example of what the Koan means. Do not use examples that are directly from the article. Post your examples in the appropriate Google Classroom discussion
 

Due:

Syllabus Verification Form - This form must be returned with parent signature. 20 points by due date. 15 points if late

Due:

Read Chapter 1 of Blown to Bits

Due:

Inside the Computer Project: Describe how a computer works in two different ways. Post your descriptions in Google Classroom
Method 1: Words
Write a description of how a computer works. Do not be literal, but instead
demonstrate an understanding of the processes and logic involved in the internal
operation of the computer in non computer terms. You may not use any of the words on the restricted list below and you may only use the words “computer,” “device,” and
“system” three times each.
Restricted terms list: CPU, Central Processing Unit, Memory, RAM, ROM, Bit, Byte,
Chip, Motherboard, Drive
Method 2: Pictures
Create a pictorial representation of how a computer works. Again, do not be literal, but demonstrate an understanding of the processes and logic. You may not use pictures of actual computer components in your representation.