NumberAnalysis

Write a program that simulates a lottery.

    The program shall have an array of five integers named lottery and should generate a random number in the range of 0 through 9 for each element in the array.
    The user shall enter five digits, which are stored in an integer array named user.
    The program is to compare the corresponding elements in the two arrays and keep a count of the digits that match.
    For example, the following shows the lottery array and the user array with sample numbers stored in each. There are two matching digits (elements 2 and 4).
    lottery array:
    7     4     9     1     3
    user array:
    4     2     9     7     3
    The program shall display the random numbers stored in the lottery array and the number of matching digits. If all of the digits match, display a message proclaiming the user as a grand prize winner.

Level 1 Activity 5

For this activity, you will be creating a questionnaire (the list of questions used for a survey). The ASU PR team has asked you to create this questionnaire to evaluate an upcoming campaign they are planning. The overall goal of the campaign is to increase the number and dollar amount of donations for ASU research from major donors. Remember, they plan to conduct this survey to evaluate the success of their campaign so it is different from initial formative research. For the purposes of the activity, you can write the questionnaire for the final evaluation and assume any relevant items needed for benchmarking will be included in a pre-campaign survey. The team has already created an email list of all the potential major donors – your questionnaire will be sent to that list.

Here is what needs to be measured:

They had several attitudinal objectives related to the campaign that need to be evaluated:
increase perceived prestige of ASU
increase perceived importance of research done at ASU
increase perceptions that ASU will competently manage donations
They would also like to measure the final goal of donating. They have donation statistics but would like to be able to see how the attitudes above actually correlate with donating behavior.
In order to link their actions with the outcomes, they want to measure whether each donor was exposed to the campaign tactics. The tactics are email, social media (Facebook and Twitter), and a special event potential donors were invited to (you can call it the annual gala).
They would also like to include demographic information so they know who they were successful in reaching.
You are welcome to include additional items but you need to write questions that address everything above. Questions should be multiple choice or have a number-based answer so statistical analyses can be conducted. I know we haven’t actually discussed writing survey questions so refer to this article for some good tips: https://www.qualtrics.com/blog/good-survey-questions/

heap

Imagine a university wants to keep track of the following data about each student:

First name
Last name
address line 1
address line 2
city
state
zip code
date of birth month
date of birth day
date of birth year
anticipated completion month
anticipated completion day
anticipated completion year
gpa
credit hours completed
It is obvious that we will need a student class to contain all this data. However, the principles of data design indicate that the address should be its own class, as should the date. Your program should then have at least three classes: address, date, and student. Student will have two instances of date and one of address among its data members.

Process
Build all the classes you will need for this project. Each class should have a separate header file. This file contains only the class definition. Ensure your headers use the #ifndef structure described in lecture, and include whatever other headers they need.

Build a cpp file for each class which contains the code implementation of the class. This code file will include the class header file and any other headers and libraries needed.

Build a main program that imports all the needed classes and tests them. You’ll then modify this program.

Create a makefile to control the compilation process. The instructor will test the program by running the make utility, so be sure your makefile works. If you use a visual editor like code::blocks, you’ll still need to create and test a makefile for your project. Note IDE’s have tools to build make files automatically, but they are often terrible. Make your own. It’s must include to include clean and run builds in your makefile along with a command to run Valgrind. Look at Andy’s example for guidance on how to create it, but the command should be called valgrind.

Use git to manage your versions. There is no way you can prove you used git, but learn how to use it now. It’s ideal for a larger project like this with multiple files.

All instances of your classes should be stored separately on the heap.  That is to say, all should make use of the ‘new’ keyword.  Your program will be tested using the Valgrind tool to ensure you have responsibly deallocated memory when your are done with it.

The complete project
When the classes are done, create a main program which does the following:

Load up student data from a text file. All the needed information for the students should be in a text file, with each student’s information on one line. We will provide you with a file with student data. There will be 50 students.  The file is available here:  students.dat (Links to an external site.)
Store all instances of your classes on the heap As stated above, all instances of your custom classes should be created on the heap.
Store student data on the heap Student data will be a large array, so it should be stored on the heap. Ensure you’ve also removed heap data when necessary.
List all data for all students in a report format Create a method of the Student class to print a report about every student into a separate text file called “fullReport.txt”.
Create a simpler list that prints only the last and first name of each student into a separate text file called “shortReport.txt”.
Output a list of student names in alphabetical order Print the list in alphabetical order  into a separate text file called “alphaReport.txt”. You can use your own sort algorithm, or the one from std::sort for this.
Note: You may not use any pre-constructed classes from the c++ standard template library (vectors, sets, etc).  You MAY construct your own (if you reallllly wanna go there).  Additionally, any instances of the classes you write need to be stored separately on the heap by utilizing the keyword new.
Your program needs to test for memory leaks using Valgrind. We won’t use your valgrind file, but the program will be tested for memory leaks so check your Valgrind
Use C++98 for the base assignment, smart pointers and other features of C++11 are great, but they are not the point of the assignment. Use them in the blackbelt or future classes.
Use a standard c array not a vector in this program.

Here is the format you may use for a line of student data in your text file:

Surname,GivenName,StreetAddress,Address2,City,State,ZipCode,Birthday,Graduation,GPA,Credit Hours Complete<end of line>
Note that the text file provided by your recitation leader might be slightly different. Use the data you’re given.

Here is an example of what it may look like:

Fry,Lock,123 Hillside Drive,,North Brunswick,NJ,57237,08/22/1970,05/15/2012,4.00,90

Programming

Imagine a “black box” data structure you can push data into it and pop data out, but you cannot look at the implementation. Write a program to consider a series of push commands and expected pop values, then report on the nature of the black box structure. It might be:

how the internet works website

The objective of this assignment is to get you familiarized with how the Internet works. You need to work individually for this assignment. You need to create a website (like one in the History of the Internet assignment) and explain some of the following topics:

Domain names and ICANN
IP Addresses, Packets and Routing
DNS
HTTP and HTTPS protocols
W3C and HTML and CSS
Assignment Requirements:
Create an index page with a nice introduction to these topics along with the links to all the other pages.
Create an ABOUT page, discussing about this assignment, along with few lines about yourself.
Create one page for each of the topics.
Make sure to use Bootstrap (Links to an external site.) for your website. Your website should have a navigation bar (Links to an external site.) containing the links to different pages.
Host this website on Github Pages or AFS
The README file of the Github repository for this assignment should clearly mention the URL of the website.
Each topic should be introduced with the concept/definition, followed by some examples and a section explaining why we use them.
Add at least 1 image for each topic and explain them.
You should have at least 10  feature commits.

Video and Reading Materials:

How the Internet Works
What is the Internet Part 1
The Internet- Wires, Cables, Wifi Part 2
The Internet- IP Addresses and DNS Part 3
The Internet- Packets, Routing and Reliability Part 4
The Internet- HTTP and HTML Part 5
The Internet- Encryption Public Keys Part 6
Bootstrap Grid System
Bootstrap Tutorial
(Available on the Homepage)

Submission
Put a link of the website hosted on Github Pages or AFS in the Readme file of the project repository and submit the link to this Github repository in Canvas.

history of the internet

With your partner your need to make a website about the history of the Internet based on the videos in this unit.

Your website needs a homepage, team page (about you and your partner with a link to linkedin), an about page that describes that this is an assignment for the course, it needs a page for each video in the unit and all of the pages need to be linked to the main menu.  You need to write the text for each page in word, which is approx 1-2 pages double spaced for each video.  You can use bullet points and photos or create a create a timeline graphic, it doesn’t need to be all text.  Your need to use Bootstrap and can use the code from class that is here to start:

Repository

https://github.com/kaw393939/IS117HistoryOfInternet (Links to an external site.)

Live Site Example:

https://kaw393939.github.io/IS117HistoryOfInternet/invention.html (Links to an external site.)

Do not FORK or CLONE my repo, it is only for reference and yours should look better than mine.

Required Pages:

1.  History Channel – The Invention of the Internet (44:44)

2. The True Story of the Internet- Browser Wars Part 1 (43:40)

3.  The True Story of the Internet- Internet Search Part 2 (43:19)

4.  The True Story of the Internet- Dot Com Bubble Part 3 (43:45)

5.  The True Story of the Internet- People Part 4 (43:46)

Submission Requirements

1.  At least 20 commits and 9 Branches (Approx 1 branch per page)

2.  Commits labeled Bug, Feature, Task i.e. Feature: New Page, Bug: fixed header, Task: created gitignore

3.  Both partners need to submit

4.  At least 1 picture per page from a legal online source: https://www.pexels.com/ (Links to an external site.) or https://unsplash.com/ (Links to an external site.)

5.  You need about 1-2 pages of text per page about each of the videos, so you are required to submit a word document that includes the text.  You should basically create a mockup of your page in word and then complete it in Bootstrap.

Suggested Steps

1.  Watch Videos

2. take notes for the word doc that will be website content – SUBMIT THIS TOO

3.  1 partner will make the general structure of the website with lorem ipsum text and this partner will be in charge of managing the pull requests to merge pages from other people

4.  the other partner goes and creates a branch for each page and puts the content for the page in and commits, pushes, creates a pull request and submits it

5.  the manager partner will merge the pull requests into the website

6.  done  –  YOU BOTH NEED TO SUMIT AND HAVE COMMITS ON THE REPOSITORY

Create a README.MD file and put you and your partners name on it, so we know who did the website.

Please Both Partners Need to Submit

1.  Word Document

2.  Link to Website

Rubric
Rubric of History of the Internet Website
Rubric of History of the Internet Website
Criteria    Ratings    Pts
This criterion is linked to a Learning OutcomeWord Doc
1. approx 1-2 pages double spaced for each video
2. Bullet points and photos
20.0 pts
Full Marks
0.0 pts
No Marks
20.0 pts
This criterion is linked to a Learning OutcomeWebsite
1. Webpages: Home, Team(member Linkedin links), About, links back to Home.
2. Video pages: Invention, Browser, Search, Bubble, People, links back to Home.
3. Picture: legal online source: https://www.pexels.com/Links to an external site.
(Links to an external site.) or https://unsplash.com/Links to an external site.
60.0 pts
Full Marks
0.0 pts
No Marks
60.0 pts
This criterion is linked to a Learning OutcomeGithub
1. 20 commits, 9 branches, readme with partners’ names.
2. Commit labels: Bug: fixed header, Feature: New Page, , Task: create gitignore
20.0 pts
Full Marks
0.0 pts
No Marks
20.0 pts
Total Points: 100.

Subject Selection By Greedy Optimization

The Institute hired you to implement the program. They asked you to implement a greedy method (greedyAdvisor) to formulate
a list of subjects that satisfies each students constraint (the amount of work student is willing to do).
The algorithm should pick the best subjects first. The notion of best is determined by the use of the comparator. The
comparator is a function that takes two argumentseach of which is a (value, work) tupleand returns a boolean indicating
whether the first argument is better than the second. Here, the definition of better can be altered by passing in different
comparators.
Weve provided three comparators for you to pass in:
cmpValue, which compares the values of the subjects
cmpWork, which compares the workload of the subjects
cmpRatio, which compares the value/work ratios of the subjects

Prog1

The implementation of a simple but efficient randomized algorithm
for finding the ith order statistic, using divide and conquer.
Definition 1. The ith order statistic of an array A of n numbers is (1) the ith smallest number
in A, if i n; or (2) not defined, otherwise.
Note that the given array A is arbitrary and may not be sorted. Also, array A may or may not
have duplicates in its member elements. Below are a few examples:
The first order statistic of A[5, 4, 2, 7] is 2, because 2 the smallest number in the array A.
Obviously the first order statistic is just the minimum of all the array elements.
The nth order statistic of an array A[0..n 1] is just the maximum of all the array elements.
Both the third and the fourth order statistics of A[5, 2, 4, 7, 4, 1] are the number 4, because 4
the third as well as the fourth smallest number in the array A.
The seventh order statistic of A[5, 2, 4, 7, 4, 1] does not exist, because array A has only 6
numbers.

Long Integer Addition

Can you please type this out and in java? thank you!

For this assignment you are to write a class that supports the addition of extra long integers, by using linked-lists. Longer than what is supported by Java’s built-in data type, called long.

Your program will take in two strings, consisting of only digits, covert each of them to a linked-list that represents an integer version on that string. Then it will create a third linked-list that represents the sum of both of the linked lists. Lastly, it will print out the result of the sum.

Conceptual Example
For the string: “12”, create a list: head->1->2->null
For the string: “34”, create a list: head->3->4->null
Add the two lists to create a third list: head->4->6->null
print the resulting linked list as “46”
Where “->” represents a link.

Keep in mind that the conceptual example above is conceptual. It does suggest a certain implementation. However as you read on you will see that you have several options for implementing your solution. You need not use the suggested implementation above.

For this class you are to implement a minimum of three methods. They are:

A method called makeSDList() that takes in a string, consisting only of digits, as an argument, and creates and returns a linked-link representation of the argument string.

The method has the following header:

SDList makeSDList(String s) { }

where s is a string, and SDList is the class name of the linked list. 

A method called addLists() that takes takes two lists, adds them together, and creates and returns a list that represents the sum of both argument lists.

The method has the following header:

SDList addLists(SDList c) { }

wherec  linked-list of type SDList .

A method called displayList() that takes takes a list, prints the value of each digit of the list. 

The method has the following header:

void displayList() { }

Programming Notes

You need not add any methods you don’t need.
You can add any methods use wish.
You can use any type of linked list like: singly-linked, doubly-linked, circular, etc.
You can choose you own list implementation such-as with or without sentinels, with head and/or tail points, etc.
Do not assume any maximum length for either addend.
You can assume that an each addend is a least one digit long.
You need not test for the null or empty string (“”) cases.
The addends need not be the same length.
Programming Rules:

You are not allowed to change the signature of the three methods above.
You are not allowed to use arrays or ArrayLists anywhere in your solution.
You are not allowed to use any Java built-in (ADTs), such as Lists, Sets, Maps, Stacks, Queues, Deques, Trees, Graphs, Heaps, etc. Or make any class that inherits any of those ADTs.
You are to create your own node and list class. For your node and list class you can use the code that was used in the book, video and lecture notes related to the node and lists class examples.
You are only allowed to have one class for your nodes and one class for your lists.
You are not allowed to use Java Generics.
You can use any data type to represent the digits (in the node). However, each node must represent one and only one digit.
If hard-coding detected in any part of your solution your score will be zero for the whole assignment.
Submission Rules:

1. Submit only one Homework5.java file for all test cases. The starter file is names Homework5a.java so you will need rename the file before you begin submitting your solution.

2. Anything submitted to Mimir is considered to be officially submitted to me and is considered to be 100% your work. Even if it is not your last planned submission.

3. Any extra testing code that you wrote and used to do your own testing should be deleted from the file that gets used in the final grading. I emphasize the word deleted. Commenting out code is not sufficient and not considered deleted. It must be completely removed. English comments written to explain your code are perfectly fine.

Please use starter code:

import java.util.Scanner; // Import the Scanner class

public class Homework5a {
 
public static void main(String[] args) {
SDList x, y, z;
String a, b;
Scanner input = new Scanner(System.in); // Create a Scanner object
System.out.print(“A: “);
a = input.nextLine();
x = makeSDList(a); // convert first string to a linked list
x.displayList(); // call function that displays list x
System.out.print(“B: “); 
b = input.nextLine();
y = makeSDList(b); // convert second string to a linked list
y.displayList(); // call function that displays list z
z = x.addLists(y); // add lists x & y and store result in list y
System.out.print(“A+B: “);
z.displayList(); // call function that displays list z
}

public static SDList makeSDList(String s) {
// put your solution here
return null;
}
}

class SDList {
// put your solution here
 
public SDList addLists(SDList c) { 
// put your solution here
return null; //replace if necessary
}
 
public void displayList() {
// put your solution here
}
}

Watch a Video titled “Reasons for Writing”

Watch a video titled, “Reasons for writing” it is approximately 28 minutes long and answer  5 questions in  its entirely.  I will upload the video and the questions.

Required Video:

https://www.learner.org/series/inside-writing-communities-grade-3-5/program-3-reasons-for-writing/program-3-reasons-for-writing/

Attention!

Using this service is LEGAL and IS NOT prohibited by any university/college policies.

You are allowed to use the original model paper you will receive in the following ways:

  1. As a source for additional understanding of the subject
  2. As a source of ideas / reasoning for your own research (if properly referenced)
  3. For proper paraphrasing (see your educational institution's definition of plagiarism and acceptable paraphrase)
  4. Direct citing (if referenced properly)

Thank you very much for respecting our authors' copyrights.

Site Management