1 / 25

CSC141 Computer Science I

Prepare for a competitive edge with hands-on experience, industry collaborations, and real-world principles in computer science. Embrace challenges, critical thinking, and collaboration for success! Learn the ropes of software engineering and database management.

vgarrison
Download Presentation

CSC141 Computer Science I

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSC141 Computer Science I Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA 19383 zjiang@wcupa.edu

  2. Table of Contents • Introduction • Plain text format printout • Variable and its value type • Expression & operator • Math.pow & Math.sqrt • Combined assignment • DecimalFormat • String

  3. Welcome • Why this class? • Job hunting • WCU graduated, Database, Software Engineering, … vs. • UPenn, Temple, Drexel, … • Something help you to stand out! — How do you like to be introduced?

  4. Research project • Critical thinking, communication, well-plan, etc. • Real competition, deadline, pressure • More realistic system, complex programming, for instance, http://www.cis.temple.edu/~jiang/RSU_Van.pptx. • Student opportunities: http://www.cs.wcupa.edu/~zjiang/student_info.htm • Sponsorship • NSF, NSA, etc • Industry interns

  5. Student Opportunities Collaboration at international level Course project NSF REU Collaboration at inter-disciplinary level Collaborative work at inter-department level

  6. Industry partners • Such as Gnostech, Chase, etc. • Invited talks in courses • Seminars or guest speeches • Curriculum review/assessment • Permanent intern opportunities

  7. Goal • Competitive students entrepreneurially and computationally empowered citizenries • Temple, NYU, etc. • IBM, SAP, Vanguard, Bell lab, etc. Key • Attract students and keep them continuously working hard Strategy • Real-world computing paradigms and principles in an obstacle-less learning

  8. No pain, no gain • Need to handle those things coming from pressure: frustration, upset, madness, etc. • Looking for solution, not excuse. • Deadline!

  9. Highlights in class materials (available on class website) • Textbook • Thinking process (instead of resultant program) • Hands-on experience • Happy ending!

  10. Print-out • Code 2-1 (Welcome.java), page 27 • Names • Main • { } and ( ) • Println and print (Code 2-3, page 35) • \n (Code 2-5, page 36), \t (Code 2-6, page 37), and table 2-2. • // (not \\) , page 77 • Java is case-sensitive

  11. What a println statement (one statement only) will generate the following output (one statement only)? This program prints a quote from the Gettysburg Address. "Four score and seven years ago, our 'fore fathers' brought forth on this continent a new nation." What aprintln statement (one statement only) will generate the following output? A "quoted" String is 'much' better if you learn the rules of "escape sequences." Also, "" represents an empty String. Don't forget to use \" instead of " ! '' is not the same as "

  12. Variable • Code 2-7 (Variable.java), page 39 • Type (declaration) • Name, page 43 • Begin with [a]-[Z], or _, or $ • Contain only [a]-[Z], [0]-[9], _, and $ • No keyword • Case distinct • Samples, table 2-4, page 43

  13. Assignment • Assignment • Left is a single variable • Right is a legal expression • Initialization, page 53 • Value of variable, page 53 • Execution time line, page 55

  14. Expression • Operator (Increment.java) • Complete list, Table 2-7, page 55 • Precedence order, table 2-8, page 58 • Prefix/postfix increment (decrement), page 190-191 • n[x][y][pd].counter[type]++ • Casting, page 65 • 17/3=? • 17.0/3=? • (double)17/3 = ?

  15. Types, Code 2-10, page 46 • Sample, Code 2-18, page 59 • 10% off?

  16. Discrete Types byte short int long Continuous Types float double Non-numeric Types boolean char

  17. double float long int boolean short char byte

  18. Advanced techniques • Math.pow and Math.sqrt, page 62 • Combined assignment, table 2-13, page 64 • Scope, page 75-77

  19. Keyboard Input • Code 2-29 (Payroll.java), page 87

  20. String • Displaying message, Code 2-32, page 94 • Input, converting a string to number, Code 2-33 (PayrollDialog.java), page 97 • String to Number • Parse, table 2-18, page 96 • String value of, table 9-7, page 581 • Number to String – Simple! • 12+ “”

  21. String processing • StringDemo.java • indexOf, table 9-4, page 572 • substring, table 9-5, page 575 • Length, Code 2-21, page 73 • charAt, toLowerCase, toUpperCase, Code 2-22, page 74 • Sting.valueOf, table 9-7, page 581

  22. Example • Ex 4 • Self-evaluation questions: • Merge 2 strings a and b? • Split 1 string into 2 parts? • Cut the head? • Cut the tail? • Take the middle? • Search?

More Related