CSC-111 HW8 Computing Deviation

Due: Tuesday, November 27 11:59pm

Problem 7.11 (Computing Deviation) page 278.  Write your program to read a data file. You’ll prompt for a filename and you’ll use that name to open and read a data file.  Assume the data file has an integer as its first number that indicates the number of data points that follow in the file.

Make sure you use the Application Template so you can process multiple data files.  Code as many methods as you can that make sense to create this application.

Here are 3 different data files:

These data files were generated from a website: https://random.org/

problem7-11

 

Last Day to Withdraw From Classes

Tuesday, November 27.

If you haven’t been keeping up with the work, have a low grade average, or have missed a multitude of classes, please drop the class. I will issue a failing grade if your average is below a 60.

If the course has an associated lab, please drop that as well.

Unless you have a medical issue that can be verified by the Dean of Students, there are no extensions, extra work, or any other way for you to extend this semester.

CSC-111 HW7 Calculate sin(x) using loops and methods with Solution

Solution by A.C. Silvestri

Due: Tuesday, Nov. 13, 2018 11:59pm

Write an application that calculates the sin(x).  The sin(x) can be calculated using the following series:

A program consisting of only a main method will not get you a passing grade.  You must break up your logic into as many methods as necessary to solve this problem.  The more methods, the better the grade.

At the very minimum, for each run of the logic, you will prompt the user for x (in degrees).  Remember, the series requires x to be in radians.  (Use Math.PI / 180 as your conversion factor.)  You will also prompt the user for the number of terms to calculate in the series.  You’ll output your series calculation, as well as Math.sin(x), and the difference between the two values to see how close your calculation is.

At the end of your logic, you’ll ask the user if they want to repeat the calculations.

Your grade will be based on the following criteria:

  • how much of the application is finished
  • whether it works
  • if you coded methods
  • the number of methods
  • if you formatted the output values using the printf method (assume just 6 decimal places for the output display)

CSC-111 HW5 Check SSN Problem with Solution

Due: Tuesday, Oct 23 11:59pm

Solutions

checkssnSome additional requirements:

  • Enter the SSN as a String.
  • An SSN can have OPTIONAL HYPHENS!  But if they are there, they both need to be in their proper spots. So 123456789 and 123-45-6789 are both valid SSNs.
  • DO NOT USE LOOPS.  We haven’t studied them yet.  If you know loops, this problem will give you an appreciation for them.
  • Use the methods discussed in Chapter 4 as much as possible!
  • To avoid deep nesting of if statements, use a boolean variable and  expressions that look like:
boolean isValid = true;
isValid = isValid && character1 is a digit;
isValid = isValid && character2 is a digit;
. . .
  • Just to give yourself confidence in the expressions involving isValid, write the program assuming an SSN only has 2 digits.  Extending to 9 digits would be trivial.  Adding optional hypen logic would then be marginally harder.

Happy Coding!

CSC-111 Authentication System In-Class Exercise

Prompt for a Username and Password.

The credentials to check for proper access is:

Username: CSC-111
Password: JavaIsGood

Typically a username is checked with case insensitivity. Capital-A and lowercase-a are the same.  Passwords are always case sensitive.

If the user enters the proper info, they are allowed access to the system and you will print out: “Access Allowed”.

If not, you’ll print: “Credentials Not Correct.  Access Denied!!!”

Enjoy

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 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

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.

prob1-11

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.

 

 

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!

Links and Resources for Java Courses

Liang 11th Edition Resources

Common Resources

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:

https://gist.github.com/

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