CSC-111 HW9 Lucky for Life Lottery Number Generator with Solution

Due: Saturday, Dec 1, 11:59pm


Write an application to help choose the Lucky for Life lottery numbers.

The Lucky Numbers follow these rules:

  • Pick a group of 5 numbers from the numbers 1 to 43, inclusive (NO DUPLICATES!)
  • Pick 1 number (the LUCKY BALL number) out of the numbers 1 to 43.  This one number can duplicate one of the 5 already picked above.  This Lucky Ball number is totally independent of the group of 5 picked above.

Your application should print the message “Your Lucky For Life Cash numbers are: ” followed by 5 random numbers in the range 1-43. These 5 numbers must be sorted. Also, remember: THERE ARE NO DUPLICATES IN THESE 5.  ALSO, this group of 5 numbers must be sorted on output!  Then on a separate line print: “Your Lucky Ball Number is: ” followed by the lucky ball number.

Make sure your generator program keeps generating these numbers by asking the user if they would like to run the generator again.  Use the Project Template.  In fact, use this template for all future assignments as well.

Your grade will be based on the following criteria:

  • if you coded methods
  • the number of methods
  • if you formatted the output values using the printf method
  • if you followed instructions
  • if the output is correct.
  • if you followed, Java identifier naming conventions

Happy Computing!

CSC-111 Exam #4 on Thursday, Dec 6

Dated changed from Dec 4 to Dec 6.

Let’s have our next exam covering just chapters 7 and 8 on Thursday,  Dec. 6.  It is a multiple choice exam so come early to class and bring a pencil.

Go here for sample quizzes:

CSC-111 HW8 Computing Deviation with Solution

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



CSC-111 HW10 Two Dimensional Array Assignment

Due: Tuesday, December 11, 11:59pm

Watch the video on this page: CSC-111 Videos titled “LiangCh08 – Even Number Of Ones“.  You’ll notice the author was struggling on finding a matrix that satisfied the condition that all rows and all columns in a matrix have an even number of ones.

Let’s help him out by creating a program that will print out such a matrix.  The matrix will consist of random ones and zeros.

Use our template to ask the user repeatedly whether they would like to display another such matrix.  With each run, you will ask the user for the number of rows and the number of columns in the matrix.  You’ll then repeatedly randomly generate a matrix of ones and zeros with those dimensions until the required condition of all rows and all columns have an even number of ones is met.

Upon finding this matrix, you’ll of course print it out.

Happy Computing!

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


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.


Go here for sample quizzes:

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