Winter 2023 Course Updates and Reminders

Slide Note
Embed
Share

Stay up-to-date with the latest announcements for CSE 121 taught by Elba Garza in Winter 2023. Quiz deadlines, creative project due dates, resubmission forms, and retake opportunities are highlighted. Learn about user input methods in Java programming and essential Scanner class methods. Get ready for file input/output tasks using the Scanner class. Be prepared for the upcoming challenges in your course!


Uploaded on Sep 08, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. CSE 121 Elba Garza Winter 2023 Music: Juice - Lizzo

  2. Announcements, Reminders Quiz 2 - February 23rd 24th, 00:01 to 23:59 (TONIGHT!) Take-home, same exact format as usual, and no longer! Open for 48 hours, start any time & given 1.5 hours to finish; Accommodations still apply. No retakes though! Can work together; must state with whom! Will send out more information (logins/links/etc.) tonight! Creative Project 3 out tonight; due February 28that 11:59 PM Resubmission Form for R5 out soon; due February 28thby 11:59 PM Lesson 14 - Winter 2023 2

  3. Announcements, Reminders Quiz Retake on Tuesday, February 28th: Retake Form out soon; due Sunday Feb 26that 11:59 PM Eligible Quizzes: Quiz 1 - 3rd and final opportunity! Quiz 0 retakes grading sorry, didn t get to it this weekend! Lesson 14 - Winter 2023 3

  4. Last Time User Input Scanner class Methods: console.next() - asking the user for one singular token as input. Token: a unit of input separated by some whitespace (e.g. space, tab, newline!) console.nextLine() - input that can be multiple words, separated by spaces! console.nextInt() - asking the user for an int value as input console.nextDouble() - asking the user for a double value as input If methods don t receive correct input Exception! Lesson 14 - Winter 2023 4

  5. Scanner fileScan = new Scanner(<File object>); Plan for Today File Input/Output New class used: File (need to warn about exceptions!) Need to import java.io.* Scanner Methods using Files: fileScan.hasNext() - Returns true if the Scanner contains another token of input, returns false otherwise. fileScan.hasNextInt()/hasNextDouble() - Returns true if the Scanner s next token of input is a(n) int/double, returns false otherwise. fileScan.hasNextLine() - Returns true if the Scanner contains another line of input, returns false otherwise. fileScan.next() - Scans and returns the next token of input from this Scanner. fileScan.nextInt()/nextDouble() - Scans and returns the next token of input from this Scanner as a(n) int/double. fileScan.nextLine() - Scans and returns the next line of input from this Scanner. Lesson 14 - Winter 2023 5

Related


More Related Content