rcc.csc18a.FA15.assignments || [Main Index] || [ MATHS ] || [Notation] || [Copyright] || [Contents] || [Source Text] || [Dictionary]
Last updated: Thu Dec 3 23:14:52 PST 2015

Contents


    CSC 18A - Assignments

    Assignment #9


      Chapter 12, Exercise #12 (Temperature Conversion), Due 12/16/15 at the beginning of class.

    Assignment #8


      Take our Date class that we created in our 11/5/15 discussion, add six new methods named: nextDay, and previousDay; nextMonth, and previousMonth; and nextYear, and previousYear.

      In the method named: nextDay, the method should increment the current day to the next day. You will need to make sure that it will increment to the next month or next year if needed. For example, if the current date is 7/31/2015, the method should increment the date to: 8/1/2015 (since 7/32/2015 is an impossible date). Likewise, if the date is 12/31/2015, the method should increment the date to 1/1/2016.

      In the method named: previousDay, the method should decrement the current day to the previous day. You will need to make sure that it will decrement to the previous month or previous year if needed. For example, if the current date is 8/1/2015, the method should decrement the date to: 7/31/2015 (since 8/0/2015 is an impossible date). Likewise, if the date is 1/1/2016, the method should decrement the date to 12/31/2015.

      In the method named: nextMonth, the method should increment the current month to the next month. You will need to make sure that it will increment to the next year if needed. For example, if the current date is 12/31/2015, the method should increment the date to: 1/31/2016 (since 13/31/2015 is an impossible date). Consider this, what should happen if the date is the following: 1/29/2013, as there is no such date: 2/29/2013? (I'm leaving this up to you to decide how to handle this impossible date since the year 2013 was not a leap year).

      In the method named: previousMonth, the method should decrement the current month to the previous month. You will need to make sure that it will decrement to the previous year if needed. For example, if the current date is 1/31/2016, the method should decrement the date to: 12/31/2015 (since 0/31/2016 is an impossible date). Consider the leap year issue again, what should happen if the date is the following: 3/29/2013, as there is no such date: 2/29/2013? (I'm leaving this up to you to decide how to handle this impossible date since the year 2013 was not a leap year).

      In the method named: nextYear, the method should increment the current year to the next year. This should be relatively straightforward since there are no special considerations that need to be made when incrementing the year to the next year.

      In the method named: previousYear, the method should decrement the current year to the previous year. Consider this, what should happen if the date is the following: 2/29/2000, as there is no such date: 2/29/1999? (I'm leaving this up to you to decide how to handle this impossible date since the year 1999 was not a leap year).

      Do not turn in this assignment BEFORE 11/12/15, as I will be discussing more on unit testing in class on 11/12/15 and adding a unit test class to this assignment for you to check your work!

      Assignment is due 11/25/15 (Wednesday before Thanksgiving) by email, working source code and 3-4 sentence write up must be emailed for up to 40 points.


    Assignment #7


      Chapter 7 Exercise #11 (Invoice Class), due 11/5/15 by the beginning of class, working source code and 3-4 sentence write up must be emailed for up to 40 points.

    Extra Credit For Chapter 7


      Read up on Chapter 7, and formulate five questions you have from your reading. This is due 10/29/15 by the beginning of class for 10 points extra credit.

    Assignment #6


      Chapter 18 Exercise #14 due 10/15/15 at the beginning of class, for a maximum of 40 points with write up.

    Assignment #5


      Do Chapter 18 Exercises #12, and 13 Make sure to include a write up summary about what you learned from the assignment. Exercises 12 and 13 due: 10/08/15 at beginning of class, for a maximum of 40 points.

    Assignment #4


      Do Chapter 5 Exercise #22 (Temperature Conversions) Implement the following integer methods: a) Method celsius returns the Celsius equivalent of a Fahrenheit temperature, using the calculation celsius = 5.0 / 9.0 * ( fahrenheit - 32);

      b) Method fahrenheit returns the Fahrenheit equivalent of a Celsius temperature, using the calculation fahrenheit = 9.0 / 5.0 * celsius + 32;

      c) Use the methods from parts ( a) and ( b) to write an application that enables the user either to enter a Fahrenheit temperature and display the Celsius equivalent or to enter a Celsius temperature and display the Fahrenheit equivalent. Make sure to include a write up summary about what you learned from the assignment. Due: 10/01/15 at beginning of class, for a maximum of 40 points.


    Assignment #3


      Do Chapter 5 Exercise #27 ( Greatest Common Divisor ). Have two Greatest Common Divisor functions, one done with a while loop, and the other function done recursively. Make sure to include a write up summary about what you learned from the assignment. Due: 9/24/15 at beginning of class, for a maximum of 40 points.

    Assignment #2


      Do Chapter 3 Exercise #37 (Factorial). This assignment is due at the beginning of class on Thursday, September 17th, 2015. Program must be working, logged in lab hours will be checked, and also include your 3-4 sentence summary for up to 40 points maximum credit.

    Assignment #1


      E-mail to my faculty email address a short biographical write up about yourself. This can be what your academic goals are, what you are planning for a career, your interests, etc.

      This assignment is due no later than the beginning of class on September 10, 2015, for a maximum of 40 points.


    . . . . . . . . . ( end of section CSC 18A - Assignments) <<Contents | Index>>