70 likes | 228 Views
CS 241 – Computer Programming II Lab . Kalpa Gunaratna – kalpa@knoesis.org http://knoesis.wright.edu/researchers/kalpa /. Contact . Contact by e-mail kalpa@knoesis.org Office hours 376 Joshi Mondays & Wednesday 3:00 pm – 4:00 pm. About me. Kalpa Gunaratna Sri Lanka
E N D
CS 241 – Computer Programming IILab KalpaGunaratna – kalpa@knoesis.org http://knoesis.wright.edu/researchers/kalpa/
Contact • Contact by e-mail • kalpa@knoesis.org • Office hours • 376 Joshi • Mondays & Wednesday 3:00 pm – 4:00 pm
About me • KalpaGunaratna • Sri Lanka • Graduate from University of Colombo, Sri Lanka • Computer Science first year PhD student @ Wright State University and member of Kno.e.sis Center of Wright State University. • More information if you are interested in knowing my background • http://knoesis.wright.edu/researchers/kalpa/
Some rules and guidelines to remember • Lab consists of two parts • Part I – in lab which is due on the second lab session of the week. • Part II – post lab which is due before next week’s lab session starts. • You cannot turn in assignments later than this deadlines. 0 marks otherwise. • Make sure you follow these deadlines and normally ignore WebCt deadlines. • Because WebCt deadline is set for all set of classes • Upload the zipped Net Beans project to WebCt.
You will have 4 projects. Each project will have a deadline posted in WebCt. • Projects are accepted only until 3 days past deadline and each day accounts for 10% off from your total eligible score. • I may sometimes make minor changes to assignments in the lab and make sure you make a note of them! • If you use a lab computer please save your net beans project into pen drive or e-mail.
Today’s lab! • Create an array of size 10 only. • Read a list of integers from a file (use Scanner class as shown in the assignment page). • If file contains more than 10 integers, you should print an error message. • Print the maximum value to the console. • Remove the maximum value and write it back to the same file.
Create an arraylist. • ArrayList<type> <variable name> = new ArrayList<type>(); • Have the same functionality as in lab section. • But you can use the in-built functionalities of ArrayList class.