# Author: administrator

## Math Tutor Schedule

## CSC-220 HW3 Two-Dimensional Array Problem

## Due: Friday, Sept. 28, 2018 11:59pm

You work for NASA in their Space Center Laboratory. You are asked to write a JAVA program that takes an array containing the digitized picture of the night sky and locate the star(s) in it. Each element of the array represents the amount of light hitting that portion of the image when the picture was taken. Intensities range from 0 to 20.

Here is a sample of this data:

0 3 4 0 0 0 6 8 5 13 6 0 0 0 2 3 2 6 2 7 3 0 10 0 0 0 4 15 4 1 6 0 0 0 7 12 6 9 10 4 5 0 6 10 6 4 8 0

A star is most likely located in the area covered by the array element [i][j] if: (array[i][j] + sum of the 8 surrounding intensities)/5 > 6.0

Ignore possible stars along the edges of the array.

Output should be a character array with asterisks printed at the coordinates of where a star might possibly be. ie:

+---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | * | | | | | | | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | | | * | | | | | +---+---+---+---+---+---+---+---+ | | | | | * | | * | | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+

(Don’t read into the star pattern too much. I ball parked where the stars would be based on the data given above.)

Your program should have a method that reads in the star data and returns a 2D array of ints. i.e.:

static int[][] readStarData(Scanner sc);

You should have a method that analyzes this data to produce a 2D array of characters. This array contains a space or an asterisk depending on the calculation made for row I, column j. ie:

static char[][] analyzeStarData(int stardata[][]);

Output a nice character grid similar to what was shown above to display the star pattern. Please include the character borders. ie:

static void outputStarData(char pattern[][]);

**Use the template** as always.

Here is the data file to use: StarData.txt

Happy Coding …

## CSC-111 Exam #1 Thursday, September 27

Let’s have our first exam covering chapters 1 and 2 on Thursday, Sept. 27. It will be an in class exam.

**CLOSED BOOK/CLOSED NOTES. COME EARLY TO CLASS AND BRING A PENCIL.**

Go here for sample quizzes:

https://media.pearsoncmg.com/ph/esm/ecs_liang_ijp_11/cw/

Even though we didn’t go into too much detail in Chapter 1, that material is essentially Computer Concepts and is something you should already know. If you don’t study it!

## CSC-111 HW3 Rock, Paper, Scissors Problem

## Due: TBA

## Problem 3.17 (Rock, Paper, Scissor Game) on page 111

## For some bonus points, Code: Rock Paper Scissors Lizard Spock!

## CSC-220 Exam 1 Friday, Sept. 28

Let’s have our first exam covering chapters 6, 7, and 8 on Friday, Sept. 28. It will be an **in class multiple choice exam**.

**CLOSED BOOK/CLOSED NOTES. COME EARLY TO CLASS AND BRING A PENCIL.**

Go here for sample quizzes:

## We are getting NEW Computers!!

We’ll be getting new computers for 17-314! Real modern day computers!

The IT department has given up on trying to make the VDI boxes work.

They say the new machines will be installed by the end of next week. So let’s just hang in there for a week or so.

## Java Notes For Professionals (PDF)

An excellent set of notes for topics in Java:

## CSC-220 Chapter 8 Supplemental Multidimensional Array Examples

## CSC-220 Silvestri’s Solution to Emirp Homework

## Pre-Alg Attendance Verification and MyMathlab Registration

I must verify class attendance by Monday, 9/17/18. What I did was marked all people who registered with mymathlab as attending the class.

**People who have not registered are listed as not attending.**

If you want to continue with the class, show up to class Friday and/or Monday. Register with the mymathlab website, and do the homework!!!

## CSC-220 HW2 Arrays Assignment

## Due: Friday, Sept. 21, 2018 11:59pm

Given two strings s and t, determine if they are isomorphic.

Two strings are isomorphic if the characters in s can be replaced to get t.

All occurrences of a character must be replaced with another character while preserving the order of characters. No two characters may map to the same character but a character may map to itself.

Example 1:

Input: s = “egg”, t = “add”

Output: true

Example 2:

Input: s = “foo”, t = “bar”

Output: false

Example 3:

Input: s = “paper”, t = “title”

Output: true

### Requirements

Incorporate the Project Template for those writing a command line program. CSC-112 graduates can write a GUI to do this problem for extra credit. Don’t forget that knowledge.

### Warning

Only use the material up to and including Chapter 7 on single dimension arrays. If you include data structures that are beyond what we covered, then you will be asked to demo your code to class and explain its operation.

### Hint:

To convert a string to an array, use the String .toCharArray() method.

## CSC-220 – The Ultimate Linear Search Class

## CSC-111 Miles per Gallon program

## CSC-220 Deck of Cards with Methods

## CSC-111 In-Class Exercise for Chapter 2

## CSC-111 HW1 Population Projection Solution

This problem is on page 31 in the textbook.

Do this problem without using variables, loops, or anything beyond what is discussed in Chapter 1.

## Solution:

__Solution to the Population Problem 1-11__ or __Solution to the Population Problem 1-11 With Variables__

## CSC-111 HW2 Calculate Temperature, Dewpoint, or Relative Humidity

### Due: Saturday, Sept 22, 11:59pm

Create a program that inputs the 3 sets of 2 inputs needed to calculate Actual Temperature, Dewpoint, and Relative Humidity. For instance, entering Actual Temperature and Dewpoint will calculate the corresponding Relative Humidity. Entering Actual Temperature and Relative Humidity, calculates Dewpoint. Finally, entering Dewpoint and Relative Humidity, allows calculation of Actual Temperature.

Use the Scanner class for your input. To be clear, you will submit just one program that will have a total of 6 input methods and 3 calculations and outputs.

Use this website: http://andrew.rsmas.miami.edu/bmcnoldy/Humidity.html for the necessary formulas. That page also has a calculator, you can use to check your own calculations.

All the temperatures in the equations are based in Celcius. We live in a Fahrenheit world. Please input and output temperatures in Fahrenheit.

Your outputs should be neatly formatted and annotated. Output **3 decimal digits**.

**Note: Just use the topics discussed in chapter 2, or what was discussed in class. No methods, loops, if statements should be coded.**

### Hint:

References in the formulas to

- exp(expr) is Math.exp(expr) in Java
- ln(expr) is Math.log(expr) in Java

## CSC-220 Chapter 7 Searching and Sorting Examples

Sorting and Searching V1:

http://pastebin.com/Mrryf839

Sorting and Searching V2 using Arrays methods:

http://pastebin.com/Sk7e5GtX

Sorting Using BinarySearch routine (updated 9/17/18):

https://gist.github.com/bytecodeman/2375a479f829025dfe643b2c785a65fc

String Sorting:

http://pastebin.com/D57LPbB9

String Sorting V2 With Interfaces and Lambdas

https://pastebin.com/pV1sgRq8

## CSC-220 HW1 (Emirp)

Let’s do problem 6.27 (Emirp) shown here:

## DUE: Friday, Sept 14 11:59pm

Here is a gist of the solution to 6.26 discussed in class:

https://gist.github.com/bytecodeman/3413b5197a7663b0eee742aa144cdda2

Incorporate the Project Template for those writing a command line program. CSC-112 graduates can write a GUI to do this problem for extra credit. Don’t forget that knowledge.

The template provides a way to run the code over and over again without having to restart the program. For each run, prompt for the starting point for the emirp analysis and how many emirps you want to find from that starting point.

## Joe Santos – SI Schedule

Joe will be having SI sessions on Thursday and Friday at 2:00 PM in our lab 17/314 starting Friday, 9/7/2018.

Please take advantage of his expertise.

## Pre-Alg Class Announcement

First, let me apologize for the first day confusion.

I called the IT helpdesk, and they actually came down quickly to resolve the problems.

On Friday, Sept 7, let’s meet in our regular room 17/403. I’ll show you the website that we’ll use, and I show you how to register for it.

We’ll even do some math! Go figure…

Here’s the website: https://cs.stcc.edu/prealg

See you Friday!!!

## Supplemental Instruction (SI)

The college has a new program called Supplemental Instruction (SI). Through this program, you will have the opportunity to meet weekly with our SI Leader, who will provide weekly review sessions for all interested students. The Leader is a current student who has recently taken the course and done well. They will be in class with you every day, hearing what you hear, and reading what you read. During each review session, you will have a chance to get together with your classmates to compare notes, discuss concepts that might be confusing, review material for tests and quizzes, and ask any questions that you might have.

Sessions will begin the week of September 11th, and run through the end of the semester. You can attend as many review sessions as you like; each one will be different because you will have new material to discuss. SI sessions are informal – bring any notes you have, your textbook, or a classmate! By coming to these sessions, you will be able to develop a better understanding of the course content as well as more effective ways of learning.

If you are unable to attend the group session, but would like to meet with the SI Leader, you can set up an individual time to meet with them. You can let them know you would like to make an appointment with them when you see them in class, or feel free to send them a note through their college email.

I am thrilled that we have this new opportunity for you, and I am hopeful that you take advantage of this program.

Our SI leader is **Joseph Santos** and his email address is: **joesantosjava.si@gmail.com**

## CSC-111 Homework 1

**Due Tuesday, Sept 11 11:59pm.**

This problem is on page 31 in the textbook.

Do this problem without using **variables, loops, or anything beyond what is discussed in Chapter 1**. You’ll have a better appreciation for these advanced tools once you do the problem without them.

You need to submit a **gist** link to silvestri@stcc.edu of your code by the due date and time.

## Java Homework 0

## Due Friday, Sept 7 11:59pm

Install Java 10 JDK and eclipse on your personal computers.

Note that lab is not required. I will be in my office during the lab times for at least the first 50 minutes.

## CSC-220 – Course Syllabi

## CSC-111 Course Syllabi

## Math – Silvestri’s Special Apps Center!

Check out: https://cs.stcc.edu/specialapps/

I have some ideas for apps to add to this website, so please visit every now and then.

If you have an idea for an app that you think would be useful, would benefit a student, or would make the world a better place, please share ( silvestri@stcc.edu ), and if it isn’t too involved, and I have the time, I’ll code the problem and make it a special app.

## Math – MathTV videos!

## Pre-Alg – MyMathLab Course ID and Syllabus

MAT-078-D07 Pre-Algebra Fall 2018 MWF 10:10AM Course ID: **silvestri83325**

## PreAlg – Welcome to Professor Silvestri’s Pre-Algebra Course

- There are math lecture videos based on our textbook. You can access them here: Pre-Algebra Videos (This is STCC’s portal website. You’ll need to login with your Webadvisor credentials.) If you miss a class or need another prospective on the material, give these videos a try.
- To take these courses, you
**must**have access to a computer as this will be a hybrid lecture / online study course. We will be using http://www.mymathlab.com/. So you**must**purchase the Student Access Code package and register using the appropriate Course Code (ID) shown above. **(Free Textbook) Bedinelli Basic Mathematics Text Book**

## Algebra – MyMathLab Course ID and Syllabus

MAT-097-D07 Algebra 2 Fall 2018 TTh 9:30AM Course ID: **silvestri87353**

## Algebra – Welcome to Professor Silvestri’s Algebra Courses

- There are math lecture videos based on our textbook. You can access them here: Algebra Videos (This is STCC’s portal website. You’ll need to login with your Webadvisor credentials.) If you miss a class or need another prospective on the material, give these videos a try.
- To take these courses, you
**must**have access to a computer as this will be a hybrid lecture / online study course. We will be using http://www.mymathlab.com/. So you**must**purchase the Student Access Code package and register using the appropriate Course Code (ID) shown above. **(Optional Textbook)**Introductory Algebra through Applications, 3rd Edition, Akst and Bragg, 2012, Pearson Education, ISBN: 9780321746696

## CSC-220 – Project Template

## CSC-111 – Counting Bytes

## CSC-220 – Supplemental Video Course Series

Optional resources, but highly suggested supplements for this course. I’ll be using these video series as a supplement to my lectures this semester:

- Udemy Course – Data Structures and Algorithms: Deep Dive Using Java
- Udemy Course – Multithreading, Java Generics, Collections & LamdaExpression

These courses can be purchased for as little as $9.99. Not bad!

## CSC-111 – Introduction to Java Programming for Online Learners

An optional resource but highly suggested supplement for this course. I’ll be using this video series to supplement my lectures. I’ll also be using the videos as the basis for an online Intro to Java course that will hopefully be running Spring 2019:

Udemy Course – Introduction to Java Programming for Online Learners

This course can be purchased for as little as $9.99. Not bad!

## Great Algebra 2 Course!

Thank you for your interest in my course.

Course is now fully enrolled, and the semester is underway.

I plan on teaching a section(s) of Algebra 2 this Spring 2019. Stay tuned for an announcement in your student email for this course.

Good Luck this semester.

## Required Textbook and Materials for CSC-111 and CSC-220 Classes

**Introduction to Java Programming and Data Structures, Comprehensive Version, 11/E
**Y. Daniel Liang

ISBN-10: 0134670949

ISBN-13: 9780134670942

Publisher: Pearson

Copyright: 2018

## Links and Resources for Java Courses

### Liang 11th Edition Resources

- Liang’s Textbook 11th Edition Website
- Prentice Hall Companion Website
- Liang PowerPoint Slides
- Liang Source Code with Images and other Resources
- Liang Source Code Arranged By Chapters

### Common Resources

- CSC-111 Liang Textbook Videos
- CSC-112 Liang Textbook Videos
- CSC-220 Liang Textbook Videos
- Getting Familiar with Linux for Java Programmers
- Java Development Kit Downloads Select latest Version 10 to get all the latest language features and utilities. For maximum compatibility with the textbook, select the latest Version 8)
- Eclipse IDE Installer (Choose Eclipse IDE for Java Developers)
- Eclipse IDE Package Download (Choose Eclipse IDE for Java Developers)
- How to install Java and Eclipse Video Installing Eclipse is even easier now as there is an installer that you run.
- Java Platform SW 10 Documentation
- Java Platform SE 8 Documentation
- SetJavaPathV5.vbs — This utility will set the Environment PATH variable to include the directory where the JDK is located. This utility is handy when running the JDK tools from the command line. Just download it, unzip the vbs file, and click it. It will probably take awhile for the program to find the JDK, so be patient!

## Sign up for a GitHub Account

If you going to be a programmer, then github is a site you’ll need to use.

Go here: https://github.com/ and create an account for yourself. We will be using github for homework submissions.

In particular the part of github we’ll be using is the **gist** function located here:

You can submit multi-file projects under just one URL! You also have a record of all your work in one convenient location.

## Welcome to Fall 2018 – Prof. Silvestri’s Programming Courses

All course announcements and correspondence will be done through this page. It is your responsibility to visit this course page at least once every two days to view the latest course announcements, homework, and news. It is unacceptable to say that you are not aware of something happening in the course.