Week 5 D2

 This week we also discuss the concepts in chapter seven, which deals with the basic concepts and algorithms of cluster analysis.  After reading chapter seven answer the following questions:

  1. What is K-means from a basic standpoint?
  2. What are the various types of clusters and why is the distinction important?
  3. What are the strengths and weaknesses of K-means?
  4. What is a cluster evaluation?

 Read:

  1. ch. 6 & 7 in textbook: Association Analysis: Advanced Concepts and Cluster Analysis: Basic Concepts and Algorithms
  2. Križanić, S. (2020). Educational data mining using cluster analysis and decision tree technique: A case study. International Journal of Engineering Business Management, 12, 184797902090867–.

Assignment

 

Do a bit of research on JSON and AJAX.

How do they relate to the the Same-Origin policy?

Using WORD, write several short paragraphs on each. A  total of 200-300 words

quiz

This quiz is based on the material in Chapter 7 of the text. 

Answer each these questions in a paragraph with at least five sentences: Include the question and number your responses accordingly. Provide a citation for each answer.

1. Describe Digital Literacy (how to know what is real on the web). 

2.  None of these people exist. What does this mean to you?

3. Why is Wikipedia more reliable than a paper encyclopedia?

4. How useful are crowd sources answers?

5. What are some drawbacks to crowd sourced answers?

6. Do people generally utilize the diversity of sources on the Internet effectively?

7. How reliant are we and how reliant should we be on getting our news from social media?

8. How do humans remain vigilant when we turn over authority to computers? Have you tried to navigate without gps?

9. If models are simplifications or reality, why do we rely on them?

10. Why was this model, used by Amazon for hiring, wrong?

11. Why did Skynet declare war on the human race?

Cybersecurity

 

Discuss how Microsoft Windows User Account Control (UAC) provides a higher level of security for users. Research UAC using the Internet. What were its design goals? Were they achieved? How secure is UAC? What are its strengths? What are its weaknesses?

Explain what MS Group policies are, how they can be used, and what their strengths and weaknesses are.

Lastly, Search the Internet for one instance of a security breach that occurred for each of the four best practices of access control (separation of duties, job rotation, mandatory vacations, and clean desk). Write a short summary of that breach. Then rank these four best practices from most effective to least effective. Give an explanation of your rankings.

Write at least a one page document outlining the findings above for UAC, MS Groups, and the best practices of access control.

Guessing game

 

The programming assignment for the final week, due on the final day of the course, if not before, has been modified in an attempt to allow for more creativity in the coding process.  An outline of the new assignment will follow as I do not have the ability to modify the template of the course.  I’d begin looking at it now and ask questions as you move forward. 

Programming Assignment #3 (25 points) *modified at the end*

This assignment will give you practice with while loops and pseudorandom numbers. You are
going to write a program that allows the user to play a simple game in which your program thinks
up an integer and allows the user to try to determine the number with a minimum number of tries.
For each incorrect try you will tell the user whether the right answer is higher or lower. Your
program is required to exactly reproduce the format and behavior of the log of execution at the end
of this write-up, so you may want to look that over first.

At a minimum, your program should have the following static methods in addition to method
main:
a method to give instructions to the user

a method to report overall results to the user

You may define more methods than this if you find it helpful, although you will find that the
limitation that methods can return only one value will tend to limit how much you can
decompose this problem.

You are to define a class constant for the maximum number used in the game. The sample below
selects a number from 1 to 100, but the choice of 100 is arbitrary. By introducing a constant for
100, you should be able to change just the value of the constant to make the program play the
game with a range of 1 to 50 or a range of 1 to 250 or some other range starting with 1.

When you ask the user whether or not to play again, you should use the “next()” method of the
Scanner class to read a one-word answer from the user. You should continue playing if this
answer begins with the letter “y” or the letter “Y”. Notice that the user is allowed to type words
like “yes”. You are to look just at the first letter of the user’s response and see whether it begins
with a “y” or “n” (either capitalized or not) to determine whether to play again.

Assume that the user always types an integer when trying, that the integer is always in an
appropriate range and that the user gives you a one-word answer beginning with “y”, “Y”, “n” or
“N” when asked whether to play again.

You will notice at the end of the log that you are to report various statistics about the series of
games played by the user. You are to report the total number of games played, the total number of
tries made (all games included), the average number of tries per game and the maximum number
of tries used in any single game. You should also report the user’s best game(s) indicating which
game(s) had the minimum number of tries and what that minimum was.

Here are a few helpful hints to keep in mind:

this program needs to generate pseudorandom numbers

To deal with the yes/no response from the user, you might want to use some of the String class
methods. You will want to use the next() method of the Scanner class to read a word from the
console.

Because this program uses pseudorandom numbers you won’t be able to recreate this exact
log. The key requirement is that you reproduce the format of this log and that your calculations
for overall statistics are correct for your log.

It’s a good idea to change the value of your class constant and run the program to make sure
that everything works right with the new value of the constant. For example, turn it into a
game for numbers between 1 and 5.

This program is more difficult than most to decompose into methods, so you may end up having
methods that are longer than 15 lines. You are required to have a while loop in main that plays
multiple games and prompts the user for whether or not to play another game. You shouldn’t
have all the code in main because you are required to have the methods described at the
beginning of this write-up.

You are expected to make appropriate choices about when to store values as int versus double,
which if/else constructs to use, what parameters to pass, and so on.

Your program should be stored in a file called Guess.java.

Include a comment at the beginning of your program with basic information and a description of
the program. This includes having an adequate comment header, commenting every line, and the
integrity statement.   The integrity statement must be included or the max score will be cut in half.

Turn in your screenshot in Word of the output with filename
JonBrownCIS1501ScreenShotsProgrammingAssignment3Jan122017 (your name, the course
name, the content of the file, and the date), Guess.java and Guess.class (Please make sure to
name your files exactly, including identical capitalization.) Then put all three files in one zip file.
The zip file should be named: your name, the course name, the content of the file, and the date
and then submit to the Assignments link on the course web page.

Log of execution (user input underlined)

This program allows you to play a game.
I will think of a number between 1 and 100
and will allow you to try to determine it.

For each try, I will tell you whether the
right answer is higher or lower than your
try.
I’m thinking of a number…

Your try? 20
higher

Your try? 40
higher

Your try? 60
higher

Your try? 80
higher

Your try? 100
lower

Your try? 90
lower

Your try? 88
lower

Your try? 86

Game #1: You got it right in 8 tries

Do you want to play again? Yes
I’m thinking of a number…

Your try? 20
higher

Your try? 40
higher

Your try? 60
higher

Your try? 80
higher

Your try? 82
higher

Your try? 84
higher

Your try? 86
higher

Your try? 88
higher

Your try? 90
higher

Your try? 92
higher

Your try? 94
lower

Your try? 93

Game #2: You got it right in 12 tries
Do you want to play again? YES
I’m thinking of a number…

Your try? 20
higher

Your try? 40
higher

Your try? 60
lower

Your try? 58
lower

Your try? 56

Game #3: You got it right in 5 tries
Do you want to play again? No
Overall results:

total games = 3
total tries = 25

tries/game = 8.333333333333334
max tries = 12

Your best game was Game#3 in 5 tries

Here are the modifications for this term.

  1. user must play at least 3 games and no more than 5
  2. you must ask the user how many games they wish to play right from the start; if they say less than 3 or more than 5, you must prompt them again, this time with instructions on the limits
  3. now you must capture the maximum value for each game offering a choice of 50, 100, 200 or 500 (other entries are not allowed)
  4. you must keep track of the number of guesses AND accumulate how far off each guess was from the given number (25 is 10 off from 35 and so is 45 (no negative values))

Sample output:

Let’s play a number guessing game.

How many games do you want to play?

6

I’m sorry.  We must play between 3 and 5 games.

How many do you want to play?

3

For these 3 games, what is the range of numbers we are going to use?  1 to __?

75

Acceptable answers are 50, 100, 200 or 500.  Please respond:

100

Good luck!

Game 1:

This program allows you to play a game.
I will think of a number between 1 and 100 <- display the user’s entered range max
and will allow you to try to determine it.

For each try, I will tell you whether the
right answer is higher or lower than your
try.
I’m thinking of a number…

(back and forth until the user gets the correct answer)

Your try? 20
higher

Your try? 40
higher

Your try? 60
higher

Your try? 80
higher

Your try? 82
higher

Game 1:

You got it right 5 guesses.

You were off by an average of 25.6 per guess.

(note: the answer was 82 and the guesses were off by 62, 42, 22, 2 and 0 which total 128/5 guesses = 25.6) **don’t print this

Good luck!

Game 2 begins now:

repeat the process

reset (or renew?) the counter for the number of tries/guesses

reset (or renew?) the counter for tracking the average amount off

Game 2:

output for the # of guesses and the off by an average of

repeat the process for the 3rd game and possibly the 4th and the 5th

output as well

For the final output:

Your best game in terms of lowest guesses was Game # (insert the number of the game with the least number of guesses) when you solved the game in ___ guesses.

Your best game in terms of closest guesses was Game # (insert the number of the game with the lowest average “off guess”) when you were off by an average of ___.

IF the #s of the best games match, the user should receive some special message from you.  For example, if your best game in terms of lowest guesses and closest guesses was, let’s say game #2, the user should see some sort of special message noting how well game #2 was played.

PROJECT 1: RESUME & COVER LETTER

 

PROJECT 1: RESUME & COVER LETTER

OBJECTIVE
The purpose of this project is to demonstrate your understanding of the following course concepts:

1. Create and save documents.
2. Format documents.
3. Insert text and paragraphs.
4. Format texts and paragraphs.
5. Apply styles.
6. Create and configure document sections.

PROJECT DESCRIPTION
Apply for a job. To apply for the new job, you will need to create two items: (a) a resume and (b) a cover letter. You may use the templates that are built into Word for your resume or you can create the resume from scratch. Whichever way you choose the document must look professional. The second item, the cover letter, should be a letter to the Human Resources Director at the company you are applying to. This letter should be written in a formal style and should follow the guidelines for a resume cover letter. Review these websites to walk you through writing a resume and cover letter.

Your resume and cover letter must follow these restrictions:

1. Each item must be no more than one page.
2. Both items must have correct spelling and grammar.
3. The job you are applying for must be real (the company does not need to be hiring, but the job you are applying for must be real).
4. The job you are applying for must be realistic for someone of your age and experience (you may not be able to apply to be President of a company, but you can apply for a lower level position). If you are presently working, you may apply for that same position.
5. The information you provide in the resume and cover letter should be real information, correct for you and the job you are applying to.
6. The resume must include the following:

a. Full name, address, and contact information (phone and email).
b. Objective or desired job statement.
c. Education.

7. The resume must include at least 2 of the following 3 categories:

a. Experience (does not have to be a job you previously had, it can be experience doing similar items or items that would help you in this job).
b. Volunteer work.
c. Awards and accomplishments.

8. The cover letter must include the following:

a. Full name, address, and contact information (phone and email) somewhere within the document.
b. Address of Human Resources or Hiring Personnel at the company you are applying to.
c. Paragraph 1 – why you are writing this letter and what job you are applying for.
d. Paragraph 2 – experiences which make you qualified for this job.
e. Paragraph 3 – information about meeting or contacting you for further information.
f. Closing remark including your signature and name.
g. Current date via “Insert date and time.”

You will be graded on including the above items and that you follow these formatting rules:

1. Use easy to read and professional font (such as Times New Roman, Arial, 12 point).
2. Appropriate document theme. No use of colors (except a link to an email address).
3. Proper indentation and alignment of text.
4. Correct use of bold, italics, and underline where necessary.
5. Use heading styles and bullets to organize your information.

SUBMISSION REQUIREMENTS
Please submit the following to your Assignments Folder:

1. The completed Word file.
2. Submit a Project Reflection (see below)

PROJECT REFLECTION
Answer the following questions when you submit your assignments files. 

To complete the assignment, you had to use many different things that you learned both about writing a Resume (Content) and about using the Microsoft Word commands and functions (Formatting).

1. (Content) What elements of a good resume did you use from the Purdue Online Writing lab?
2. (Formatting) What were some of the Microsoft Word commands and functions that you used to make your resume more organized or sophisticated? Some examples of MS Word commands are: headings, margins, bullets/numbering -indenting, etc.

To write java program of prime numbers

you will generate a NON THREADED, SEQUENTIAL program.  This sequential program will take some input (you can grab this input from the user, or from a command line argument) that it will store in an integer.  (Therefore, there needs to be checks in place to make sure that the number being given can be stored adequately in an integer.  You do not need to use BigInteger or long for this, regular integersis fine.  This is more about design than about function).

Now that you have this number, you want to compute all the prime numbers that exist between 2 and that number (inclusive).

If a number is not prime, you will store that number and a List of its factors in a Map

If a number is prime you will store it in a List.  So, at the conclusion, we have a Map of non primes that contain factors of numbers and a list of primes.

You will time the runtime of your application so that we know how long it will take to build these two structures.  To time your application, simply generate a starting time as soon as you retrieve the number you want to use as the base of your iteration and then stop the timer when you are finished generating your structures.  Report back what the difference is. You can use System.currentTimeMillis(); to do this.