C++ Programming

cplusplus.com | Java Documentation | Site Stats
AP schedule | AP LogIn | AP Forms | AP Resources | AP Archive | AP Stuff
Java schedule | Java LogIn | Java Forms | Java Resources | Java Archive | Java Stuff
Adven schedule | Adven LogIn | Adven Forms | Adven Resources | Adven Archive | Adven Stuff
Stat schedule | Stat LogIn | Stat Forms | Stat Resources | Stat Archive | Stat Stuff

Java Schedule 1-18-10

Monday 1-18

No School

Tuesday

grades

hasThreeNames() == true


 

isLastFirst () == true && hasThreeNames() == true


 

  public boolean hasThreeNames()
        {
            if(fullName.indexOf(" ") == fullName.lastIndexOf(" "))
            return true;
            else
            return false;
        }//end hasThreeNames

           
   


 if (data.indexOf("2745") > 0)





 if(data.indexOf("/20")>-1)



while (!fin.eof())
        {
           data = fin.readLine();
  
           if(data.indexOf("/20") > -1)
           {
                System.out.println ("Line " + count + " " + data);
                count++;
           }//end if 



 

if(data.indexOf("/20")>-1 && data.contains("DIR") == false)

 
                

Wednesday

Files Project - Using the Name class : due midnight tonight

Data input file : small version - remove blank lines at the end of the file.
Create an Amain2 class which will contain only a main method. Copy the code from the Amain method (change class name and compile)

1st - In the Amain2 class, open and output the contents of the file listed above to the monitor. Paste Amain2 method code here.

2nd - create a new class named Amain3 - copy the code from amain2. Modify the code to do the following - Extract only the name part of the data read from the file and output to the monitor. Paste Amain3 method code here.

3rd - Create a Amain4 class. Copy and code from Amain3 and compile (change class name). Modify the code to do the following - Create a Name object with the String from Amain3. Output the Name object's toString to the monitor. Paste Amain4 method code here.

4th for APCS - Create an ArrayList of Name objects

Thursday

New Project Name : TicTacToe (copy keyboard)

Square Class for Tic Tac Toe - First Submission due EOC

APCS - Board Class - due midnight Sunday

Friday

Today do the following in this order :

1. Make sure you are saving your projects to the U drive. Copy all projects from the local computer to the U drive.

2. Add the Name class to the tictactoe project.

3. Add an equals method to the Name class.

Square class should have the following methods - may be named different.

private data

one character variable.

constructor(s)

creates a blank square

accessor(s)

getValue - returns the current state of the square - blank, x, or o.
toString() - returns the current state of the square as a String.

mutator methods -

putX - assigns the square a value of 'x'
putY - assigns the square a value of 'y'

helper methods

isEmpty returns true if the square is empty (doesn't have an x or an o)
hasX returns true if the square contains an x.
hasO returns true if the square contains an o.
equals - returns true if two squares have the same state or value.

Grading - 10 pts maximum per method. Watch for deductions related to the example listed above. Watch Style like blank lines, alignment, and comments.

Second Submission of the Tic Tac Toe Square Class due Midnight Sunday.

 

 

 

Last Week

 

Monday 1-11

Due midnight tonight - (from last week) Need the file to work at home? Download here.

Assignment 1 - counting the number of directories in the public drive.
Assignment 2 - counting the number of hidden files in public.
Assignment 3 - counting the number of files you own in the public drive.
Assignment 4 - counting the number of graphics in the public drive. There are several different types of graphics.

Tuesday

Identifying files and directories - Due midnight Wednesday

Part 1 - Output only the lines containing a file or directory in publicA.txt.

Part 2 - Count and output the lines containing a file or directory in publicA .txt.

Part 3 - Count and ONLY output the file or directory names in publicA.txt

Part 4 - Count and ONLY output the file names.

Wednesday

Name Class - copy the project from public kedigh java named StudentInformation.

private data

String fullName - the name the user enters.
String firstName - contains the first name, no spaces.
String middleName - contains the middle name (no spaces) or and empty string - " " .
String lastName - contains the last name, no spaces.

Constructor - String (Name) consisting of either a two names (first and last) or three names (first, middle, and last). The two names may be entered as "Larry Kedigh" or Kedigh, Larry". The three names may be entered as "Kedigh, Lawrence Michael" or Lawrence Michael Kedigh". A comma will be used when the last name is first. A space will appear between all names.

You will need methods to determine if you have two or three names (hasThreeNames) and if the last name is first (isLastFirst). These should be boolean methods.

The constructor will determine which format the name is in and extract the first, middle, and last names. If the name does not have a middle name, the middle name will be assigned an empty string.

Helper -

getInitials - returns the initials in standard format.
hasThreeNames - if this returns false we will assume a name consisting of a first and last name.
isLastFirst - if this return false we assume the last name is last.

Thursday

Due midnight tonight

submit isLastFirst
submit hasThreeNames
submit the constructor
submit getInitials - L.M.K or L.K.
submit toString - returns the name in the format last, first middle or last, first

Friday

Quiz part 1 - due midnight Monday (small version of the file)
Quiz part 2 - due midnight Monday (small version of the file)

 

 

Monday 1-4

Setup Primary and Secondary Computers.

Bookmark javadoc for the String Class

 

Tuesday

Reading files - instructions in class.

Implementing the String methods - counting

Resources

input files and project for downloading

Wednesday

Implementing the String methods - counting

Assignment 1 - counting the number of directories in the public drive.
Assignment 2 - counting the number of hidden files in public.
Assignment 3 - counting the number of files you own in the public drive.
Assignment 4 - counting the number of graphics in the public drive. There are several different types of graphics.

Thursday-NO School SNOW

Implementing the String methods - extracting and parsing

Friday-NO School SNOW

 

 

 

Updated: Wednesday, February 3, 2010 10:27 AM

About | Site Map | Contact | Search | ©2005 brentwoodhigh.com