Western Oregon University Page 1 of 2
CS-161 Assignment #7
General
Submit this lab using the Moodle system by the beginning of lab on the due date.
Use the Attach File tool to attach your .cpp file with your solution.
Each code file should have the standard comment at the top (see Assignment 1).
Read information into all programs in the specified order. Do not ask for extra input.
If a program says something like “ask the user for their name and the number of hours they worked”
you MUST read in the name first, then the number of hours and not prompt for any other input.
Readability and maintainability of your code counts. Poor formatting, confusing variable names,
unnecessarily complex code, etc… will all result in deductions to your score.
Climb Stats
Filename : assign7.cpp
Elevation information about a hike is recorded like the table shown below indicating that the
hike starts at 1200 feet, after 1 mile is at 3000 feet, etc… This hike is 8 miles and consists of 9
data points:
Mile 0 1 2 3 4 5 6 7 8
Elevation 1200 3000 3450 2800 2900 1550 1750 1110 1200
Write a program that declares in main:
const int HIKE_LENGTH = 9;
This will represent the number of data points in the hike (not the number of miles). Then
declares an array of ints of size HIKE_LENGTH. (I should be able to change the number of
elevation points your code is working with by changing that one const.)
You should then read in HIKE_LENGTH elevations into the array (assume we always input the
data in order: mile 0, then 1, then 2…). After doing so, print:
The highest point in the first half of the hike, the highest point in the second half of the
hike and the highest point overall in the hike. (If there are an odd number of elevation
readings, count the middle point as being in the first half).
The average elevation of the hike to two decimal places.
The number peaks - mile markers higher than the markers before and after it. (The first
and last markers will never be considered peaks).
The number of difficult segments of the hike - ones with an elevation change over 1000
ft (going up or down)
The total vertical feet covered in the hike. (Add up the change between each marker
and the next. Note that both up and down count as elevation change here: going up 800
ft and then down 300 ft would be a total change of 1100 ft.)
Sample run:
Enter elevations: 1200 3000 3450 2800 2900 1550 1750 1110 1200
Highest points:
First half: 3450
Second half: 1750
Overall: 3450
Average elevation: 2106.67
Peaks: 3
Difficult segments: 2
Elevation change: 5280
Make sure to read the
required functions
below.
Western Oregon University Page 2 of 2
CS-161 Assignment #7
You should write and use the following functions to help do your work. You can add
others as you see fit.
a) void getData(int heights[], int size)
Read elevation data into the array from ...
The document provides examples of programming exercises of increasing complexity that require mastery of specific programming concepts. It includes exercises to practice variables, input/output, conditional statements, loops, arrays, functions, strings, object-oriented programming concepts like classes and inheritance, file input/output, pointers, sorting, linked lists, and recursion. Many exercises ask the programmer to modify an initial program by adding additional requirements or complexity. The last exercise provided asks the programmer to create a linked list of bunny objects with various attributes and behaviors to simulate bunny aging, breeding, and the introduction of radioactive mutant vampire bunnies.
Lab7: More Arrays, Strings, Vectors, and Pointersenidcruz
This document contains instructions for 4 homework problems involving arrays, strings, vectors and pointers in C++. Problem 1 involves assigning airplane seats to passengers from a 2D array representing the seating chart. Problem 2 involves implementing Conway's Game of Life, which simulates cellular automata. Problem 3 involves converting names to pig latin. Problem 4 involves tracking which users are logged into different computer stations across multiple computer labs using arrays and pointers. Problem 5 involves creating functions to dynamically add and remove entries from an array to emulate a vector.
This document provides instructions for Programming Assignment 4, which involves writing Python functions to solve 6 problems using while loops. The problems involve summing odd numbers, calculating products of powers of 2, printing patterns of asterisks and triangles, and calculating sums and averages involving user-entered numbers. Students are instructed to write the functions in a file called "prog4.py" and submit it on SmartSite.
This document discusses conditional statements in Python. It introduces if, if-else, and if-elif-else constructs for decision making. Logical operators like and and or are also covered. The ternary operator provides another way to write conditional expressions. The get construct allows implementing conditional logic similar to a switch statement using dictionaries. Examples demonstrate taking input from the user and validating it, finding the greatest of three numbers, and conditionally executing code based on dictionary lookups. Proper indentation is emphasized as it determines code blocks in Python.
This document outlines 5 problems for a homework assignment on input/output (I/O) and arrays in C++. Problem 1 involves reading a data file and calculating the median and quartiles. Problem 2 calculates the average and standard deviation of numbers in a file. Problem 3 merges two sorted files of numbers into a third file. Problem 4 performs hexadecimal addition with overflow checking. Problem 5 defines a function to remove repeated characters from a partially filled array.
1 Computer Assignment 3 --- Hypothesis tests about m.docxmercysuttle
1
Computer Assignment 3 --- Hypothesis tests about means
Statistics, Fall 2014, Singleton
Microsoft Excel has two data analysis tools that are very useful for hypothesis testing about
population means as done in the textbook, chapters 9 and 10. These are
1) t-Test: Two-Sample Assuming Equal Variances
2) t-Test: Two-Sample Assuming Unequal Variances
These tools utilize the two sets of equations in Chapter 10 of the text, namely (1) on page 368
assuming equal variances, and (2) on page 369 assuming unequal variances.
Number 1 tool (equal variances) is strictly for Chapter 10 problems with two samples, each
from its own population, and you are attempting to compare the two population means,
and by hypothesis tests involving .
Number 2 tool (unequal variances) can be used for Chapter 9 or Chapter 10 problems. In
previous online classes taught by Dr Revere, she had students use a combination of various Excel
functions to do Chapter 9 t-tests about . It seems to me that using the unequal-variance tool is
easier. On page 353 of the text there is an almost-correct description of how to use the Chapter-
10-style t-test for Chapter 9. In using a Chapter 10 test for Chapter 9, instead of comparing 2
sets of data, the second set of data is replaced with a fixed hypothesized value (which has zero
variation).
Steps are (for Ch 9 problems)
---Enter a column of your n values of experimental data to be tested.
---Enter another column of at least two of the hypothesized value being tested against (if the null
hypothesis has =1.84 or ≤1.84 or ≥1.84 enter at a column of at least two 1.84’s (contrary to
what the book says, you do not have to use n 1.84’s).
---With menus open the “t-Test: Two-Sample Assuming Unequal Variances” analysis tool.
---Select the “Variable 1 Range” to contain the experimental data.
---Select the “Variable 2 Range” to contain at least two identical values of the number in the
null hypothesis (see the example below which has 1.84). (The book says enter n of them.)
2
---Enter 0 for the “Hypothesized Mean Difference”
---Set the “Labels” checkbox using the rules you obeyed for data in Computer Assignment 1.
In many of the problems the data are set up NOT to use labels.
---Make sure you set “Alpha” to your specified value. Also typing it on the worksheet is helpful
as a reminder.
---The output is going to be compact and I suggest that you set “Output Range” to a cell near the
data.
---Click OK
When you do a Chapter 9 problem this way you are comparing your sample data, which has a
variance that is calculated by Excel, with your hypothesized value, which has a variance of zero
since you entered 2 or more identical values for it. Your “Hypothesized Mean Difference”
must always be zero. Of course this requires the “t-Test: Two-Sample Assuming Unequal
Variances” tool.
Why does this work?
If s22 and are both zero in the equat ...
Python Exam (Questions with Solutions Done By Live Exam Helper Experts)Live Exam Helper
This is done by Python exam experts. This is the sample Python exam paper. If you have any query or doubt, you can visit Live Exam Helper. Our customer support is available 24x7 to assist you. If you need professional python exam help experts for your exam then you are at the right place. We have professional and experienced experts for all subjects. Our experts will help you ace your exams and get you the highest grades.
✅ Services that give priorities to deadlines
✅ Guarantee of money back
✅ The Clock or 24×7 hour services
✅ Security of good grades
De vry math 399 all ilabs latest 2016 novemberlenasour
This document provides information about obtaining assistance with coursework from an online service called ACEHOMEWORK.NET. It lists various courses and assignments they can help with, such as accounting, marketing, finance, economics, mathematics, statistics, programming, and more. It emphasizes they can help students get an A grade and provide original, plagiarism-free work by the deadline. Contact information is provided to obtain more details and pricing information.
The document provides examples of programming exercises of increasing complexity that require mastery of specific programming concepts. It includes exercises to practice variables, input/output, conditional statements, loops, arrays, functions, strings, object-oriented programming concepts like classes and inheritance, file input/output, pointers, sorting, linked lists, and recursion. Many exercises ask the programmer to modify an initial program by adding additional requirements or complexity. The last exercise provided asks the programmer to create a linked list of bunny objects with various attributes and behaviors to simulate bunny aging, breeding, and the introduction of radioactive mutant vampire bunnies.
Lab7: More Arrays, Strings, Vectors, and Pointersenidcruz
This document contains instructions for 4 homework problems involving arrays, strings, vectors and pointers in C++. Problem 1 involves assigning airplane seats to passengers from a 2D array representing the seating chart. Problem 2 involves implementing Conway's Game of Life, which simulates cellular automata. Problem 3 involves converting names to pig latin. Problem 4 involves tracking which users are logged into different computer stations across multiple computer labs using arrays and pointers. Problem 5 involves creating functions to dynamically add and remove entries from an array to emulate a vector.
This document provides instructions for Programming Assignment 4, which involves writing Python functions to solve 6 problems using while loops. The problems involve summing odd numbers, calculating products of powers of 2, printing patterns of asterisks and triangles, and calculating sums and averages involving user-entered numbers. Students are instructed to write the functions in a file called "prog4.py" and submit it on SmartSite.
This document discusses conditional statements in Python. It introduces if, if-else, and if-elif-else constructs for decision making. Logical operators like and and or are also covered. The ternary operator provides another way to write conditional expressions. The get construct allows implementing conditional logic similar to a switch statement using dictionaries. Examples demonstrate taking input from the user and validating it, finding the greatest of three numbers, and conditionally executing code based on dictionary lookups. Proper indentation is emphasized as it determines code blocks in Python.
This document outlines 5 problems for a homework assignment on input/output (I/O) and arrays in C++. Problem 1 involves reading a data file and calculating the median and quartiles. Problem 2 calculates the average and standard deviation of numbers in a file. Problem 3 merges two sorted files of numbers into a third file. Problem 4 performs hexadecimal addition with overflow checking. Problem 5 defines a function to remove repeated characters from a partially filled array.
1 Computer Assignment 3 --- Hypothesis tests about m.docxmercysuttle
1
Computer Assignment 3 --- Hypothesis tests about means
Statistics, Fall 2014, Singleton
Microsoft Excel has two data analysis tools that are very useful for hypothesis testing about
population means as done in the textbook, chapters 9 and 10. These are
1) t-Test: Two-Sample Assuming Equal Variances
2) t-Test: Two-Sample Assuming Unequal Variances
These tools utilize the two sets of equations in Chapter 10 of the text, namely (1) on page 368
assuming equal variances, and (2) on page 369 assuming unequal variances.
Number 1 tool (equal variances) is strictly for Chapter 10 problems with two samples, each
from its own population, and you are attempting to compare the two population means,
and by hypothesis tests involving .
Number 2 tool (unequal variances) can be used for Chapter 9 or Chapter 10 problems. In
previous online classes taught by Dr Revere, she had students use a combination of various Excel
functions to do Chapter 9 t-tests about . It seems to me that using the unequal-variance tool is
easier. On page 353 of the text there is an almost-correct description of how to use the Chapter-
10-style t-test for Chapter 9. In using a Chapter 10 test for Chapter 9, instead of comparing 2
sets of data, the second set of data is replaced with a fixed hypothesized value (which has zero
variation).
Steps are (for Ch 9 problems)
---Enter a column of your n values of experimental data to be tested.
---Enter another column of at least two of the hypothesized value being tested against (if the null
hypothesis has =1.84 or ≤1.84 or ≥1.84 enter at a column of at least two 1.84’s (contrary to
what the book says, you do not have to use n 1.84’s).
---With menus open the “t-Test: Two-Sample Assuming Unequal Variances” analysis tool.
---Select the “Variable 1 Range” to contain the experimental data.
---Select the “Variable 2 Range” to contain at least two identical values of the number in the
null hypothesis (see the example below which has 1.84). (The book says enter n of them.)
2
---Enter 0 for the “Hypothesized Mean Difference”
---Set the “Labels” checkbox using the rules you obeyed for data in Computer Assignment 1.
In many of the problems the data are set up NOT to use labels.
---Make sure you set “Alpha” to your specified value. Also typing it on the worksheet is helpful
as a reminder.
---The output is going to be compact and I suggest that you set “Output Range” to a cell near the
data.
---Click OK
When you do a Chapter 9 problem this way you are comparing your sample data, which has a
variance that is calculated by Excel, with your hypothesized value, which has a variance of zero
since you entered 2 or more identical values for it. Your “Hypothesized Mean Difference”
must always be zero. Of course this requires the “t-Test: Two-Sample Assuming Unequal
Variances” tool.
Why does this work?
If s22 and are both zero in the equat ...
Python Exam (Questions with Solutions Done By Live Exam Helper Experts)Live Exam Helper
This is done by Python exam experts. This is the sample Python exam paper. If you have any query or doubt, you can visit Live Exam Helper. Our customer support is available 24x7 to assist you. If you need professional python exam help experts for your exam then you are at the right place. We have professional and experienced experts for all subjects. Our experts will help you ace your exams and get you the highest grades.
✅ Services that give priorities to deadlines
✅ Guarantee of money back
✅ The Clock or 24×7 hour services
✅ Security of good grades
De vry math 399 all ilabs latest 2016 novemberlenasour
This document provides information about obtaining assistance with coursework from an online service called ACEHOMEWORK.NET. It lists various courses and assignments they can help with, such as accounting, marketing, finance, economics, mathematics, statistics, programming, and more. It emphasizes they can help students get an A grade and provide original, plagiarism-free work by the deadline. Contact information is provided to obtain more details and pricing information.
I am Justin R. I am a Python Homework Expert at pythonhomeworkhelp.com. I hold a Master's in Python Programming from, Durham University, UK. I have been helping students with their homework for the past 12 years. I solve homework related to Python.
Visit pythonhomeworkhelp.com or email support@pythonhomeworkhelp.com.
You can also call on +1 678 648 4277 for any assistance with Python Homework.
CS10 Python Programming Homework 4
40 points
Lists, Tuples, Sets, and Files
1. You must turn in your program listing and output for each program set. Start a new sheet or sheets of paper
for each program set. Each program set must have your student name, student ID, and program set
number/description. All the program sets must be printed and submitted together with your Exam 4. Once
you complete your Exam 4 and leave the classroom you will not be able to submit Homework 4. Late
homework will not be accepted for whatever reasons you may have.
********************************************************************************************************************************
for this homework, you are also to submit All Program Sets to Canvas under Homework 4 link
********************************************************************************************************************************
a. Name your file : PS1_firstinitial_lastname.py for Program Set 1. PS means program set
b. You still have to submit the paper copy together with the rest of the Homework 4.
c. You have till 11:59pm the night before the day of Exam 4 to submit all Program Sets to Canvas.
If the deadline is past, Program Sets will not be graded even if you submit the paper copy on
time.
d. You must submit both hardcopy and upload the Program Sets to Canvas to be graded. If you
only submit the hardcopy or only upload to Canvas you will receive a zero for the Program Sets.
You must submit all the hardcopies of all Program Sets of Homework 4.
e. if you do not follow instructions on file naming provided in this section you will receive a zero for
the whole of Homework 4.
2. You must STAPLE (not stapled assignments will not be graded resulting in a zero score) your programming
assignment and collate them accordingly. Example Program set 1 listing and then output, followed by
Program Set 2 listing and output and so on.
3. Please format you output properly, for example all dollar amounts should be printed with 2 decimal places.
Make sure that your output values are correct (check the calculations).
4. Each student is expected to do their own work. IF IDENTICAL PROGRAMS ARE SUBMITTED, EACH
IDENTICAL PROGRAM WILL RECEIVE A SCORE OF ZERO.
Grading:
Each program set must run correctly syntactically, logically, and display the correct output as specified. If
the program set does not run correctly, a zero will be given. For each Program set, if the program executes
properly with proper syntax, logic, and displays the correct output, then points will be deducted for not having
proper:
a. Comments (1 pt deducted for each occurrence)
- Your name, description at the beginning of each program set. Short description of the what
each section of your codes do.
b. Consistency/Readability (2 pts deducted for each occurrence)
- Spacing(separate each section of codes with a blank line
- Indentation
- Style (proper naming of .
This document provides instructions for using a graphing calculator to perform linear regression on a dataset and find the line of best fit. It describes entering paired x and y data values into separate lists, using the LinReg(ax+b) function to determine the regression equation, optionally creating a scatter plot of the original data and regression line, and using the line equation to forecast values. As an example, it analyzes a dataset of alternative-fueled vehicles in the US from 1997 to predict the number in 2014.
The document discusses loops and iterations in Python programming. It introduces while and for loops. While loops repeat a block of code until a test condition is false. For loops are generally used to iterate over lists, tuples, strings, etc. The document provides examples of using while loops to calculate factorial, exponentiation, and the terms of arithmetic and geometric progressions. It also discusses using loops to generate patterns by nesting for loops, with the outer loop iterating over rows and the inner loop producing a variable number of stars in each row based on the row number.
You must implement the following functions- Name the functions exactly.docxSebastian6SWSlaterb
The document provides instructions to write 6 functions to analyze FASTA sequence data and output statistics. The functions are:
1. get_filehandle to open files
2. get_fasta_lists to read sequences and headers into lists
3. _verify_lists to check lists are same length
4. output_seq_statistics to output statistics calling other functions
5. _get_num_nucleotides to count nucleotides
6. _get_ncbi_accession to extract accession from header
It describes what each function should do, how to call them, and provides examples of running the program and expected output. Tests for the functions are also to be written.
MS Excel is one of the most popular data analytics software in the world. There are many uses of MS Excel. Here in this PPT we are going to share with you the widely used top 10 Excel formula to perform hundreds of tasks in excel. Watch the PPT till the end to explore all these formulas.
This document discusses structured programming and arrays. It begins by introducing arrays as a way to store multiple values in a structured manner using indices, rather than individual variables. It then discusses how to input and output values from arrays using loops. It also covers multidimensional arrays and declaring arrays. The document provides examples of using arrays to store and manipulate data, such as finding averages and min/max values. It concludes by introducing bubble sort as a way to sort arrays into order.
This document provides an introduction to computer programming and mathematics through explaining a basic "Hello World" program written in C++. It discusses the structure of the program, including comments, functions, variables, arithmetic operations on integers, and printing output. It explains how to declare integer variables, assign values, perform basic math, and print values. The document aims to give the reader a foundation for writing their own simple mathematical programs.
Program 1 – CS 344This assignment asks you to write a bash.docxwkyra78
Program 1 – CS 344
This assignment asks you to write a bash shell script to compute statistics. The purpose
is to get you familiar with the Unix shell, shell programming, Unix utilities, standard
input, output, and error, pipelines, process ids, exit values, and signals.
What you’re going to submit is your script, called stats.
Overview
NOTE: For this assignment, make sure that you are using Bash as your shell (on Linux,
/bin/sh is Bash, but on other Unix O/S, it is not). This is because the Solaris version of
Bourne shell has some annoying bugs that are really brought out by this script. Bash can
execute any /bin/sh script.
In this assignment you will write a Bourne shell script to calculate averages and medians
from an input file of numbers. This is the sort of calculation I might do when figuring
out the grades for this course. The input file will have whole number values separated by
tabs, and each line of this file will have the same number of values. (For example, each
row might be the scores of a student on assignments.) Your script should be able to
calculate the average and median across the rows (like I might do to calculate an
individual student's course grade) or down the columns (like I might do to find the
average score on an assignment).
You will probably need commands like these, so please read up on them: sh, read, expr,
cut, head, tail, wc, and sort.
Your script will be called stats. The general format of the stats command is
stats {-rows|-cols} [input_file]
Note that when things are in curly braces separated by a vertical bar, it means you should
choose one of the things; here for example, you must choose either -rows or -cols. The
option -rows calculates the average and median across the rows; the option -cols
calculates the average and median down the columns. When things are in square braces
it means they are optional; you can include them or not, as you choose. If you specify an
input_file the data is read from that file; otherwise, it is read from standard input.
Here is a sample run of what your script might return, using an input file called test_file
(this particular one can be downloaded here , note that in Windows, the newline
characters may not display as newlines. Move this to your UNIX account, without
opening and saving it in Windows, and then cat it out: you'll see the newlines there):
% cat test_file
1 1 1 1 1
9 3 4 5 5
6 7 8 9 7
3 6 8 9 1
3 4 2 1 4
6 4 4 7 7
% stats -rows test_file
Average Median
1 1
5 5
7 7
5 6
3 3
6 6
% cat test_file | stats –c
Averages:
5 4 5 5 4
Medians:
6 4 4 7 5
% echo $?
0
% stats
Usage: stats {-rows|-cols} [file]
% stats -r test_file nya-nya-nya
Usage: stats {-rows|-cols} [file]
% stats -both test_file
Usage: stats {-rows|-cols} [file]
% chmod -r test_file
% stats -columns test_file
stats: cannot read test_file
% stats -columns no_such_file
stats: cannot read no_such_file
% echo $?
1
Specifications
You must ch ...
The document discusses statistical analysis and Excel functions for organizing and summarizing data. It provides information on entering data into Excel sheets, describes functions like SUM, AVERAGE, COUNT, and STDEV that calculate values like sums, means, numbers of data points, and standard deviations. It also discusses using Excel to group data using functions like FREQUENCY and analyzing descriptive statistics using the Data Analysis ToolPak.
1.MATH 221 Statistics for Decision MakingWeek 2 iLabName.docxAlyciaGold776
This document provides instructions for a statistics lab assignment. Students are asked to analyze survey data provided in an Excel spreadsheet. The assignment involves creating graphs in Excel, including a pie chart for car color, a histogram for heights, and a stem-and-leaf plot for money. Students then calculate descriptive statistics for heights by gender and answer questions interpreting the graphs and statistics.
This document contains a series of exercises to assess conceptual learning of the Java programming language. It includes exercises on primitive data types like short, int, double, and char. Exercises explore assigning values, arithmetic operators, trigonometry functions, converting between degrees and radians, creating and using String objects, and computing string lengths. The exercises are meant to test understanding of basic Java concepts and to find errors in programs by compiling code with invalid values or missing elements.
This document contains instructions for a series of programming exercises to practice loops and nested loops in Python. The exercises include printing names and patterns multiple times using for and while loops, allowing user input to control loop behavior, validating user input, and performing calculations on data structures like lists of numbers. The goal is to familiarize students with common loop techniques and applications in Python.
import java.util.Scanner;Henry Cutler ID 1234 7202.docxwilcockiris
import java.util.Scanner;
/*
Henry Cutler ID 1234 7/20/2015
Assignment #5, 3 features in 1 program
Solution
for Assignment#5 COP2800
Pseudocode:
Program has three features, all in a single program that are user selectable.
Prompt with options and get user choice inside a while statement ( true )
If 1 is entered:
Using a while and for loop, print out the ASCII table from ! to ~.
If 2 is entered:
Prompt the user for number of times to flip for head or tails using the random method. Count number of each and when the request times are done, print out the results.
If 3 is entered:
Prompt the user for a strings and print back the count of vowels and letters
Any other input entered program will exit using a break statement, otherwise loops back to prompt user for feature selection.
*/
public class Module5 {
public static void main(String[] args) {
// prompt the user
System.out.println("Welcome to Henry\'s 3 in 1 Programming Assignment for Module 5\n");
// create Scanner Object
Scanner input = new Scanner(System.in);
// loop until break
while(true){
// new lines for readability
System.out.print("\n");
// Prompt user for choices
System.out.print("Enter 1 for ASCII Table \nEnter 2 for Heads or Tails\nEnter 3 for Count Vowels & Letters\nAny other input will exit");
int choice = input.nextInt();
// Consume newline left-over
input.nextLine();
// first feature
if(choice == 1){
// start value is !
int value = (int) '!';
// newline for formating
System.out.println("You Selected ASCII Table!\n");
// start at ~ which is 33 decimal
while( value <= '~')
{
// print out 20 in a line
for( int count = 0; count < 20; count ++ ){
if( value <= '~'){
// print single value
System.out.print( (char) value++ );
}
else {
// break when we are at last char to print
break;
}
}
// New line every 10
System.out.print("\n");
}
// New line at exit
System.out.print("\n");
}
else if(choice == 2){
// Prompt user
System.out.println("You Selected Head or Tails!");
System.out.println("\nHow many flips would you like to try?");
// get value
int count = input.nextInt();
// clear
input.nextLine();
int headCount = 0;
int tailCount = 0;
// run for a count provided by user
for (int i = 0; i < count; i++) {
// get random number
if (Math.random() > 0.5){
// increment heads
headCount++;
}
else {
// increment tails
tailCount++;
}
}
System.out.println("Head count: " + headCount + " tail count: " + tailCount);
}
else if(choice == 3){
// Prompt user
Sys.
This document provides a summary of key Python concepts including data types, operators, functions, conditionals, loops, lists, and modules. It covers basic syntax and usage for common tasks like printing, taking user input, performing calculations, defining variables, and more. The cheat sheet acts as a reference guide for anyone looking to learn Python or needing a refresher on essential language basics.
Hi, I’m Dr. Jilesh !A professional spell caster,
– Expert in Hoodoo / conjure works, Angelic Healer (Academy of Ancient Magick)
-Tarot Reader, Psychotherapist, Reiki Grand Master 9th degree (Authorized instructor and trainer)
Check this link
According to the NASW Code of Ethics section 6.04 (NASW, 2008), .docxaryan532920
According to the NASW Code of Ethics section 6.04 (NASW, 2008), social workers are ethically bound to work for policies that support the healthy development of individuals, guarantee equal access to services, and promote social and economic justice.
For this Discussion
, review this week’s resources, including
Working with Survivors of Sexual Abuse and Trauma: The Case of Rita
and “The Johnson Family”. Consider what change you might make to the policies that affect the client in the case you chose. Finally, think about how you might evaluate the success of the policy changes.
By Day 3
Post
an explanation of one change you might make to the policies that affect the client in the case. Be sure to reference the case you selected in your post. Finally, explain how you might evaluate the success of the policy changes.
Working With Survivors of Sexual Abuse and Trauma: The Case of Rita
Rita is a 22-year-old, heterosexual, Latina female working in the hospitality industry at a resort. She is the youngest of five children and lives at home with her parents. Rita has dated in the past but never developed a serious relationship. She is close to her immediate and extended family as well as to her female friends in the Latino community. Although her parents and three of her siblings were born in the Dominican Republic, Rita was born in the United States.
A year ago, Rita was sexually assaulted by an acquaintance of a male coworker. Rita and a female coworker met Juan and Bob after work at a local bar for a light meal and a few drinks. Because Rita had to get up early to work her shift the next day, Bob offered to drive her home. Instead of taking Rita directly home, however, he drove to a desolate spot nearby and assaulted her. Afterward, Bob threatened to harm her family if she did not remain silent and proceeded to drive her home. Although Rita did not tell her family what happened, she did call our agency hotline the next day to discuss her options. Because Rita’s assault occurred within the 5-day window for forensic evidence collection of this kind, Rita consented to activation of the county’s sexual assault response team (SART). Although she agreed to have an advocate and the sexual assault nurse examiner (SANE) meet her at the hospital, Rita tearfully stated that she did not want to file a police report at that time because she did not want to upset her family. The nurse examiner interviewed Rita, collected evidence, recorded any injuries, administered antibiotics for possible sexually transmitted infections, and gave Rita emergency contraception in case of pregnancy. The advocate stayed with Rita during the procedure, supporting her and validating her experience, and gave her a referral for individual crisis counseling at our agency.
My treatment goals for Rita included alleviation of rape trauma syndrome symptoms that included shame and self-blame, validation of self-worth and empowerment, and processing how it would feel to discl.
According to the text, crime has been part of the human condition si.docxaryan532920
The document provides instructions for a 4-6 page paper on criminal law. It asks the student to:
1) Determine if the Ex Post Facto Clause can prohibit increased federal minimum sentencing guidelines and provide a rationale.
2) Explain the distinction between criminal, tort, and moral wrongs, and support or criticize the premise that moral laws have higher standards than criminal law.
3) Identify and discuss the differences between solicitation and conspiracy to commit a crime, and support or criticize the unilateral approach to conspiracy convictions.
4) Identify the four goals of criminal law and discuss how they effectuate protecting the public and preventing innocent convictions.
According to Ronald Story and Bruce Laurie, The dozen years between.docxaryan532920
Conservatives came to dominate American politics between 1968 and 1980 by capitalizing on social unrest and challenging the New Deal coalition. They embraced ideas and policies that emphasized free markets, deregulation, and tax cuts. These policies shaped American society into the 21st century by promoting economic growth while also increasing inequality.
More Related Content
Similar to Western Oregon University Page 1 of 2 CS-161.docx
I am Justin R. I am a Python Homework Expert at pythonhomeworkhelp.com. I hold a Master's in Python Programming from, Durham University, UK. I have been helping students with their homework for the past 12 years. I solve homework related to Python.
Visit pythonhomeworkhelp.com or email support@pythonhomeworkhelp.com.
You can also call on +1 678 648 4277 for any assistance with Python Homework.
CS10 Python Programming Homework 4
40 points
Lists, Tuples, Sets, and Files
1. You must turn in your program listing and output for each program set. Start a new sheet or sheets of paper
for each program set. Each program set must have your student name, student ID, and program set
number/description. All the program sets must be printed and submitted together with your Exam 4. Once
you complete your Exam 4 and leave the classroom you will not be able to submit Homework 4. Late
homework will not be accepted for whatever reasons you may have.
********************************************************************************************************************************
for this homework, you are also to submit All Program Sets to Canvas under Homework 4 link
********************************************************************************************************************************
a. Name your file : PS1_firstinitial_lastname.py for Program Set 1. PS means program set
b. You still have to submit the paper copy together with the rest of the Homework 4.
c. You have till 11:59pm the night before the day of Exam 4 to submit all Program Sets to Canvas.
If the deadline is past, Program Sets will not be graded even if you submit the paper copy on
time.
d. You must submit both hardcopy and upload the Program Sets to Canvas to be graded. If you
only submit the hardcopy or only upload to Canvas you will receive a zero for the Program Sets.
You must submit all the hardcopies of all Program Sets of Homework 4.
e. if you do not follow instructions on file naming provided in this section you will receive a zero for
the whole of Homework 4.
2. You must STAPLE (not stapled assignments will not be graded resulting in a zero score) your programming
assignment and collate them accordingly. Example Program set 1 listing and then output, followed by
Program Set 2 listing and output and so on.
3. Please format you output properly, for example all dollar amounts should be printed with 2 decimal places.
Make sure that your output values are correct (check the calculations).
4. Each student is expected to do their own work. IF IDENTICAL PROGRAMS ARE SUBMITTED, EACH
IDENTICAL PROGRAM WILL RECEIVE A SCORE OF ZERO.
Grading:
Each program set must run correctly syntactically, logically, and display the correct output as specified. If
the program set does not run correctly, a zero will be given. For each Program set, if the program executes
properly with proper syntax, logic, and displays the correct output, then points will be deducted for not having
proper:
a. Comments (1 pt deducted for each occurrence)
- Your name, description at the beginning of each program set. Short description of the what
each section of your codes do.
b. Consistency/Readability (2 pts deducted for each occurrence)
- Spacing(separate each section of codes with a blank line
- Indentation
- Style (proper naming of .
This document provides instructions for using a graphing calculator to perform linear regression on a dataset and find the line of best fit. It describes entering paired x and y data values into separate lists, using the LinReg(ax+b) function to determine the regression equation, optionally creating a scatter plot of the original data and regression line, and using the line equation to forecast values. As an example, it analyzes a dataset of alternative-fueled vehicles in the US from 1997 to predict the number in 2014.
The document discusses loops and iterations in Python programming. It introduces while and for loops. While loops repeat a block of code until a test condition is false. For loops are generally used to iterate over lists, tuples, strings, etc. The document provides examples of using while loops to calculate factorial, exponentiation, and the terms of arithmetic and geometric progressions. It also discusses using loops to generate patterns by nesting for loops, with the outer loop iterating over rows and the inner loop producing a variable number of stars in each row based on the row number.
You must implement the following functions- Name the functions exactly.docxSebastian6SWSlaterb
The document provides instructions to write 6 functions to analyze FASTA sequence data and output statistics. The functions are:
1. get_filehandle to open files
2. get_fasta_lists to read sequences and headers into lists
3. _verify_lists to check lists are same length
4. output_seq_statistics to output statistics calling other functions
5. _get_num_nucleotides to count nucleotides
6. _get_ncbi_accession to extract accession from header
It describes what each function should do, how to call them, and provides examples of running the program and expected output. Tests for the functions are also to be written.
MS Excel is one of the most popular data analytics software in the world. There are many uses of MS Excel. Here in this PPT we are going to share with you the widely used top 10 Excel formula to perform hundreds of tasks in excel. Watch the PPT till the end to explore all these formulas.
This document discusses structured programming and arrays. It begins by introducing arrays as a way to store multiple values in a structured manner using indices, rather than individual variables. It then discusses how to input and output values from arrays using loops. It also covers multidimensional arrays and declaring arrays. The document provides examples of using arrays to store and manipulate data, such as finding averages and min/max values. It concludes by introducing bubble sort as a way to sort arrays into order.
This document provides an introduction to computer programming and mathematics through explaining a basic "Hello World" program written in C++. It discusses the structure of the program, including comments, functions, variables, arithmetic operations on integers, and printing output. It explains how to declare integer variables, assign values, perform basic math, and print values. The document aims to give the reader a foundation for writing their own simple mathematical programs.
Program 1 – CS 344This assignment asks you to write a bash.docxwkyra78
Program 1 – CS 344
This assignment asks you to write a bash shell script to compute statistics. The purpose
is to get you familiar with the Unix shell, shell programming, Unix utilities, standard
input, output, and error, pipelines, process ids, exit values, and signals.
What you’re going to submit is your script, called stats.
Overview
NOTE: For this assignment, make sure that you are using Bash as your shell (on Linux,
/bin/sh is Bash, but on other Unix O/S, it is not). This is because the Solaris version of
Bourne shell has some annoying bugs that are really brought out by this script. Bash can
execute any /bin/sh script.
In this assignment you will write a Bourne shell script to calculate averages and medians
from an input file of numbers. This is the sort of calculation I might do when figuring
out the grades for this course. The input file will have whole number values separated by
tabs, and each line of this file will have the same number of values. (For example, each
row might be the scores of a student on assignments.) Your script should be able to
calculate the average and median across the rows (like I might do to calculate an
individual student's course grade) or down the columns (like I might do to find the
average score on an assignment).
You will probably need commands like these, so please read up on them: sh, read, expr,
cut, head, tail, wc, and sort.
Your script will be called stats. The general format of the stats command is
stats {-rows|-cols} [input_file]
Note that when things are in curly braces separated by a vertical bar, it means you should
choose one of the things; here for example, you must choose either -rows or -cols. The
option -rows calculates the average and median across the rows; the option -cols
calculates the average and median down the columns. When things are in square braces
it means they are optional; you can include them or not, as you choose. If you specify an
input_file the data is read from that file; otherwise, it is read from standard input.
Here is a sample run of what your script might return, using an input file called test_file
(this particular one can be downloaded here , note that in Windows, the newline
characters may not display as newlines. Move this to your UNIX account, without
opening and saving it in Windows, and then cat it out: you'll see the newlines there):
% cat test_file
1 1 1 1 1
9 3 4 5 5
6 7 8 9 7
3 6 8 9 1
3 4 2 1 4
6 4 4 7 7
% stats -rows test_file
Average Median
1 1
5 5
7 7
5 6
3 3
6 6
% cat test_file | stats –c
Averages:
5 4 5 5 4
Medians:
6 4 4 7 5
% echo $?
0
% stats
Usage: stats {-rows|-cols} [file]
% stats -r test_file nya-nya-nya
Usage: stats {-rows|-cols} [file]
% stats -both test_file
Usage: stats {-rows|-cols} [file]
% chmod -r test_file
% stats -columns test_file
stats: cannot read test_file
% stats -columns no_such_file
stats: cannot read no_such_file
% echo $?
1
Specifications
You must ch ...
The document discusses statistical analysis and Excel functions for organizing and summarizing data. It provides information on entering data into Excel sheets, describes functions like SUM, AVERAGE, COUNT, and STDEV that calculate values like sums, means, numbers of data points, and standard deviations. It also discusses using Excel to group data using functions like FREQUENCY and analyzing descriptive statistics using the Data Analysis ToolPak.
1.MATH 221 Statistics for Decision MakingWeek 2 iLabName.docxAlyciaGold776
This document provides instructions for a statistics lab assignment. Students are asked to analyze survey data provided in an Excel spreadsheet. The assignment involves creating graphs in Excel, including a pie chart for car color, a histogram for heights, and a stem-and-leaf plot for money. Students then calculate descriptive statistics for heights by gender and answer questions interpreting the graphs and statistics.
This document contains a series of exercises to assess conceptual learning of the Java programming language. It includes exercises on primitive data types like short, int, double, and char. Exercises explore assigning values, arithmetic operators, trigonometry functions, converting between degrees and radians, creating and using String objects, and computing string lengths. The exercises are meant to test understanding of basic Java concepts and to find errors in programs by compiling code with invalid values or missing elements.
This document contains instructions for a series of programming exercises to practice loops and nested loops in Python. The exercises include printing names and patterns multiple times using for and while loops, allowing user input to control loop behavior, validating user input, and performing calculations on data structures like lists of numbers. The goal is to familiarize students with common loop techniques and applications in Python.
import java.util.Scanner;Henry Cutler ID 1234 7202.docxwilcockiris
import java.util.Scanner;
/*
Henry Cutler ID 1234 7/20/2015
Assignment #5, 3 features in 1 program
Solution
for Assignment#5 COP2800
Pseudocode:
Program has three features, all in a single program that are user selectable.
Prompt with options and get user choice inside a while statement ( true )
If 1 is entered:
Using a while and for loop, print out the ASCII table from ! to ~.
If 2 is entered:
Prompt the user for number of times to flip for head or tails using the random method. Count number of each and when the request times are done, print out the results.
If 3 is entered:
Prompt the user for a strings and print back the count of vowels and letters
Any other input entered program will exit using a break statement, otherwise loops back to prompt user for feature selection.
*/
public class Module5 {
public static void main(String[] args) {
// prompt the user
System.out.println("Welcome to Henry\'s 3 in 1 Programming Assignment for Module 5\n");
// create Scanner Object
Scanner input = new Scanner(System.in);
// loop until break
while(true){
// new lines for readability
System.out.print("\n");
// Prompt user for choices
System.out.print("Enter 1 for ASCII Table \nEnter 2 for Heads or Tails\nEnter 3 for Count Vowels & Letters\nAny other input will exit");
int choice = input.nextInt();
// Consume newline left-over
input.nextLine();
// first feature
if(choice == 1){
// start value is !
int value = (int) '!';
// newline for formating
System.out.println("You Selected ASCII Table!\n");
// start at ~ which is 33 decimal
while( value <= '~')
{
// print out 20 in a line
for( int count = 0; count < 20; count ++ ){
if( value <= '~'){
// print single value
System.out.print( (char) value++ );
}
else {
// break when we are at last char to print
break;
}
}
// New line every 10
System.out.print("\n");
}
// New line at exit
System.out.print("\n");
}
else if(choice == 2){
// Prompt user
System.out.println("You Selected Head or Tails!");
System.out.println("\nHow many flips would you like to try?");
// get value
int count = input.nextInt();
// clear
input.nextLine();
int headCount = 0;
int tailCount = 0;
// run for a count provided by user
for (int i = 0; i < count; i++) {
// get random number
if (Math.random() > 0.5){
// increment heads
headCount++;
}
else {
// increment tails
tailCount++;
}
}
System.out.println("Head count: " + headCount + " tail count: " + tailCount);
}
else if(choice == 3){
// Prompt user
Sys.
This document provides a summary of key Python concepts including data types, operators, functions, conditionals, loops, lists, and modules. It covers basic syntax and usage for common tasks like printing, taking user input, performing calculations, defining variables, and more. The cheat sheet acts as a reference guide for anyone looking to learn Python or needing a refresher on essential language basics.
Hi, I’m Dr. Jilesh !A professional spell caster,
– Expert in Hoodoo / conjure works, Angelic Healer (Academy of Ancient Magick)
-Tarot Reader, Psychotherapist, Reiki Grand Master 9th degree (Authorized instructor and trainer)
Check this link
Similar to Western Oregon University Page 1 of 2 CS-161.docx (19)
According to the NASW Code of Ethics section 6.04 (NASW, 2008), .docxaryan532920
According to the NASW Code of Ethics section 6.04 (NASW, 2008), social workers are ethically bound to work for policies that support the healthy development of individuals, guarantee equal access to services, and promote social and economic justice.
For this Discussion
, review this week’s resources, including
Working with Survivors of Sexual Abuse and Trauma: The Case of Rita
and “The Johnson Family”. Consider what change you might make to the policies that affect the client in the case you chose. Finally, think about how you might evaluate the success of the policy changes.
By Day 3
Post
an explanation of one change you might make to the policies that affect the client in the case. Be sure to reference the case you selected in your post. Finally, explain how you might evaluate the success of the policy changes.
Working With Survivors of Sexual Abuse and Trauma: The Case of Rita
Rita is a 22-year-old, heterosexual, Latina female working in the hospitality industry at a resort. She is the youngest of five children and lives at home with her parents. Rita has dated in the past but never developed a serious relationship. She is close to her immediate and extended family as well as to her female friends in the Latino community. Although her parents and three of her siblings were born in the Dominican Republic, Rita was born in the United States.
A year ago, Rita was sexually assaulted by an acquaintance of a male coworker. Rita and a female coworker met Juan and Bob after work at a local bar for a light meal and a few drinks. Because Rita had to get up early to work her shift the next day, Bob offered to drive her home. Instead of taking Rita directly home, however, he drove to a desolate spot nearby and assaulted her. Afterward, Bob threatened to harm her family if she did not remain silent and proceeded to drive her home. Although Rita did not tell her family what happened, she did call our agency hotline the next day to discuss her options. Because Rita’s assault occurred within the 5-day window for forensic evidence collection of this kind, Rita consented to activation of the county’s sexual assault response team (SART). Although she agreed to have an advocate and the sexual assault nurse examiner (SANE) meet her at the hospital, Rita tearfully stated that she did not want to file a police report at that time because she did not want to upset her family. The nurse examiner interviewed Rita, collected evidence, recorded any injuries, administered antibiotics for possible sexually transmitted infections, and gave Rita emergency contraception in case of pregnancy. The advocate stayed with Rita during the procedure, supporting her and validating her experience, and gave her a referral for individual crisis counseling at our agency.
My treatment goals for Rita included alleviation of rape trauma syndrome symptoms that included shame and self-blame, validation of self-worth and empowerment, and processing how it would feel to discl.
According to the text, crime has been part of the human condition si.docxaryan532920
The document provides instructions for a 4-6 page paper on criminal law. It asks the student to:
1) Determine if the Ex Post Facto Clause can prohibit increased federal minimum sentencing guidelines and provide a rationale.
2) Explain the distinction between criminal, tort, and moral wrongs, and support or criticize the premise that moral laws have higher standards than criminal law.
3) Identify and discuss the differences between solicitation and conspiracy to commit a crime, and support or criticize the unilateral approach to conspiracy convictions.
4) Identify the four goals of criminal law and discuss how they effectuate protecting the public and preventing innocent convictions.
According to Ronald Story and Bruce Laurie, The dozen years between.docxaryan532920
Conservatives came to dominate American politics between 1968 and 1980 by capitalizing on social unrest and challenging the New Deal coalition. They embraced ideas and policies that emphasized free markets, deregulation, and tax cuts. These policies shaped American society into the 21st century by promoting economic growth while also increasing inequality.
According to Kirk (2016), most of your time will be spent work with .docxaryan532920
According to Kirk (2016), most of your time will be spent work with your data. The four following group actions were mentioned by Kirk (2016):
Data acquisition: Gathering the raw material
Data examination: Identifying physical properties and meaning
Data transformation: Enhancing your data through modification and consolidation
Data exploration: Using exploratory analysis and research techniques to learn
Select 1 data action and elaborate on the actions performed in that action group.
Reference: Kirk, A. (2016). Data Visualisation: A Handbook for Data Driven Design (p. 50). SAGE Publications.
.
According to the Council on Social Work Education, Competency 5 Eng.docxaryan532920
According to the Council on Social Work Education, Competency 5: Engage in Policy Practice:
Social workers understand that human rights and social justice, as well as social welfare and services, are mediated by policy and its implementation at the federal, state, and local levels. Social workers understand the history and current structures of social policies and services, the role of policy in service delivery, and the role of practice in policy development. Social workers understand their role in policy development and implementation within their practice settings at the micro, mezzo, and macro levels and they actively engage in policy practice to effect change within those settings. Social workers recognize and understand the historical, social, cultural, economic, organizational, environmental, and global influences that affect social policy. They are also knowledgeable about policy formulation, analysis, implementation, and evaluation.
Walden’s MSW program expects students in their specialization year to be able to:
Evaluate the implication of policies and policy change in the lives of clients/constituents.
Demonstrate critical thinking skills that can be used to inform policymakers and influence policies that impact clients/constituents and services.
This assignment is intended to help students demonstrate the behavioral components of this competency in their field education.
To prepare
: Working with your field instructor, identify a social problem that is common among the organization (or its clients) and research current policies at that state and federal levels that impact the social problem. Then, from a position of advocacy, identify methods to address the social problem (i.e., how you, as a social worker, and the agency advocate to change the problem). You are expected to specifically address how both you and the agency can effectively engage policy makers to make them aware of the social problem and the impact that the policies have on the agency and clients.
The Assignment (2-3 pages): Social Problems is Ex-cons finding Jobs Opportunities in State of California. The Agency is Called "Manifest" the website is Manifest.org
Identify the social problem
Explain rational for selecting social problem
Describe state and federal policies that impact the social problem
Identify specific methods to address the social problems
Explain how the agency and student can advocate to change the social problem
You are expected to present and discuss this assignment with your agency Field Instructor. Your field instructor will be evaluating your ability to demonstrate this competency in their field evaluation. In addition, you will submit this assignment for classroom credit. The Field Liaison will grade the assignment “PASS/FAIL,” see rubric for passing criteria.
.
According to Kirk (2016), most of our time will be spent working.docxaryan532920
According to Kirk (2016), most of our time will be spent working with our data. The four following group actions were mentioned by Kirk (2016):
Book: Kirk, A. (2016). Data visualisation a handbook for data driven design. Los Angeles, CA: Sage.
Data acquisition: Gathering the raw material
Data examination: Identifying physical properties and meaning
Data transformation: Enhancing your data through modification and consolidation
Data exploration: Using exploratory analysis and research techniques to learn
Select 1 data action and elaborate on the actions preformed in that action group.
.
According to Kirk (2016), most of your time will be spent working wi.docxaryan532920
According to Kirk (2016), most of your time will be spent working with your data. The four following group actions were mentioned by Kirk (2016):
Data acquisition: Gathering the raw material
Data examination: Identifying physical properties and meaning
Data transformation: Enhancing your data through modification and consolidation
Data exploration: Using exploratory analysis and research techniques to learn
Select 1 data action and elaborate on the actions preformed in that action group.
.
According to Davenport (2014) the organizational value of healthcare.docxaryan532920
According to Davenport (2014) the organizational value of healthcare analytics, both determination and importance, provide a potential increase in annual revenue and ROI based on the value and use of analytics. To complete this assignment, research and evaluate the challenges faced in the implementation of healthcare analytics in the Health Care Organization (HCO) or health care industry using the following tools:
The paper must also address the following:
Application of PICO (problem, intervention, comparison group, and outcomes) to the challenge identified in your research.
The paper:
Must be two to four double-spaced pages in length (not including title and references pages) and formatted according to APA style as outlined in the
Ashford Writing Center. (Links to an external site.)
Must include a separate title page with the following:
Title of paper
Student’s name
Course name and number
Instructor’s name
Date submitted
Must use at least three scholarly sources in addition to the course text.
Must document all sources in APA style as outlined in the Ashford Writing Center.
Must include a separate references page that is formatted according to APA style as outlined in the Ashford Writing Center.
.
According to the authors, privacy and security go hand in hand; .docxaryan532920
According to the authors, privacy and security go hand in hand; and hence, privacy cannot be protected without implementing proper security controls and technologies. Today, organizations must make not only reasonable efforts to offer protection of privacy of data, but also must go much further as privacy breaches are damaging to its customers, reputation, and potentially could put the company out of business. As we continue learning from our various professional areas of practice, its no doubt that breaches have become an increasing concern to many businesses and their future operations. Taking Cyberattacks proliferation of 2011 into context, security experts at Intel/McAfee discovered huge series of cyberattacks on the networks of 72 organizations globally, including the United Nations, governments and corporations.
Q: From this research revelation in our chapter 11, briefly state and name the countries and organizations identified as the targeted victims?
.
According to Gilbert and Troitzsch (2005), Foundations of Simula.docxaryan532920
According to Gilbert and Troitzsch (2005), Foundations of Simulation Modeling, a simulation model is a computer program that captures the behavior of a real-world system and its input and possible output processes.
Briefly explain what the simulation modeling relies upon?
-500 words at least.
-No Plagiarism.
-APA Format.
.
According to Klein (2016), using ethical absolutism and ethical .docxaryan532920
According to Klein (2016), using ethical absolutism and ethical relativism in ethical decision making can lead to different outcomes. How can moral reasoning about a specific situation differ based on relativism or absolutism? Can you provide an illustration or example of an accounting procedure/situation whose outcome may differ based on absolutism or relativism? Is ethical relativism a more suitable standard within a global IFRS Environment? Why or why not?
at least 250 words
.
According to Franks and Smallwood (2013), information has become.docxaryan532920
Social media differs from email in its functionality due to social media's immaturity compared to the stability of email. Specifically, social media allows for a greater volume of information to be shared and exchanged through newer tools like blogs, microblogs, and wikis which have increased the lifeblood of information for many businesses. Additionally, research has documented key differences in how social media is used compared to the more established email.
According to the Council on Social Work Education, Competency 5.docxaryan532920
According to the Council on Social Work Education, Competency 5: Engage in Policy Practice:
Social workers understand that human rights and social justice, as well as social welfare and services, are mediated by policy and its implementation at the federal, state, and local levels. Social workers understand the history and current structures of social policies and services, the role of policy in service delivery, and the role of practice in policy development. Social workers understand their role in policy development and implementation within their practice settings at the micro, mezzo, and macro levels and they actively engage in policy practice to effect change within those settings. Social workers recognize and understand the historical, social, cultural, economic, organizational, environmental, and global influences that affect social policy. They are also knowledgeable about policy formulation, analysis, implementation, and evaluation. Social workers:
Identify social policy at the local, state, and federal level that impacts well-being, service delivery, and access to social services;
Assess how social welfare and economic policies impact the delivery of and access to social services;
Apply critical thinking to analyze, formulate, and advocate for policies that advance human rights and social, economic, and environmental justice.
This assignment is intended to help students demonstrate the behavioral components of this competency in their field education.
To prepare: Working with your field instructor, identify, evaluate, and discuss policies established by the local, state, and federal government (within the last five years) that affect the day to day operations of the field placement agency.
The Assignment (1-2 pages): (In The States California. The Good Seed is a Drop-In center for 18-25 years!
Describe the policies and their impact on the field agency.
Propose specific recommendations regarding how you, as a social work intern, and the agency can advocate for policies pertaining to advancing social justice for the agency and the clients it serves.
.
According to the authors, privacy and security go hand in hand; and .docxaryan532920
According to the authors, privacy and security go hand in hand; and hence, privacy cannot be protected without implementing proper security controls and technologies. Today, organizations must make not only reasonable efforts to offer protection of privacy of data, but also must go much further as privacy breaches are damaging to its customers, reputation, and potentially could put the company out of business. As we continue learning from our various professional areas of practice, its no doubt that breaches have become an increasing concern to many businesses and their future operations. Taking Cyberattacks proliferation of 2011 into context, security experts at Intel/McAfee discovered huge series of cyberattacks on the networks of 72 organizations globally, including the United Nations, governments and corporations.
From this research revelation in our chapter 11, briefly state and name the countries and organizations identified as the targeted victims?
Use the APA format to include your references. Each paragraph should have different references and each para should have at least 4 sentences.
.
According to recent surveys, China, India, and the Philippines are t.docxaryan532920
According to recent surveys, China, India, and the Philippines are the three most popular countries for IT outsourcing. Write a short paper (4 paragraphs) explaining what the appeal would be for US companies to outsource IT functions to these countries. You may discuss cost, labor pool, language, or possibly government support as your reasons. There are many other reasons you may choose to highlight in your paper. Be sure to use your own words.
Must be in APA format with references and citations.
.
According to the authors, countries that lag behind the rest of the .docxaryan532920
According to the authors, countries that lag behind the rest of the world’s ICT capabilities encounter difficulties at various levels. Discuss specific areas, both within and outside, eGovernance, in which citizens living in a country that lags behind the rest of the world in ICT capacity are lacking. Include in your discussion quality of life, sustainability, safety, affluence, and any other areas that you find of interest. Use at least 8-10 sentences to discuss this topic.
.
According to Peskin et al. (2013) in our course reader, Studies on .docxaryan532920
According to Peskin et al. (2013) in our course reader, "Studies on early health risk factors, including prenatal nicotine/alcohol exposure, birth complications, and minor physical anomalies have found that these risk factors significantly increase the likelihood of anti-social and criminal behavior throughout life." What policy changes might you suggest to help curtail the occurrence or effects of these risk factors? Remember to think about public health policy, not just criminal policy.
.
According to Franks and Smallwood (2013), information has become the.docxaryan532920
According to Franks and Smallwood (2013), information has become the lifeblood of every business organization, and that an increasing volume of information today has increased and exchanged through the use of social networks and Web2.0 tools like blogs, microblogs, and wikis. When looking at social media in the enterprise, there is a notable difference in functionality between e-mail and social media, and has been documented by research – “…that social media differ greatly from e-mail use due to its maturity and stability.” (Franks & Smallwood, 2013).
Q: Please identify and clearly state what the difference is?
Use the APA format to include your references. Each paragraph should have different references and each para should have at least 4 sentences.
.
According to Ang (2011), how is Social Media management differen.docxaryan532920
According to Ang (2011), how is Social Media management different than traditional Customer Relationship Management (CRM)? Define the four pillars of social media (connectivity, conversations, content creation and collaboration) and analyze how each pillar can be used to aid Social Media management. Identify the benefits Social Media management. Provide examples to illustrate each point.
The paper must be 1-2 pages in length (excluding title and reference page) and in APA (6th edition) format. The paper must include the Ang (2011) article in correct APA format.
.
According to (Alsaidi & Kausar (2018), It is expected that by 2020,.docxaryan532920
According to (Alsaidi & Kausar (2018), "It is expected that by 2020, around 25 billion objects will become the part of global IoT network, which will pose new challenges in securing IoT systems. It will become an easy target for hackers as these systems are often deployed in an uncontrolled and hostile environment. The main security challenges in IoT environment are authorization, privacy, authentication, admission control, system conformation, storage, and administration" (p. 213).
Discuss and describe the difference between a black hole attack and a wormhole attack.
.
Chapter wise All Notes of First year Basic Civil Engineering.pptxDenish Jangid
Chapter wise All Notes of First year Basic Civil Engineering
Syllabus
Chapter-1
Introduction to objective, scope and outcome the subject
Chapter 2
Introduction: Scope and Specialization of Civil Engineering, Role of civil Engineer in Society, Impact of infrastructural development on economy of country.
Chapter 3
Surveying: Object Principles & Types of Surveying; Site Plans, Plans & Maps; Scales & Unit of different Measurements.
Linear Measurements: Instruments used. Linear Measurement by Tape, Ranging out Survey Lines and overcoming Obstructions; Measurements on sloping ground; Tape corrections, conventional symbols. Angular Measurements: Instruments used; Introduction to Compass Surveying, Bearings and Longitude & Latitude of a Line, Introduction to total station.
Levelling: Instrument used Object of levelling, Methods of levelling in brief, and Contour maps.
Chapter 4
Buildings: Selection of site for Buildings, Layout of Building Plan, Types of buildings, Plinth area, carpet area, floor space index, Introduction to building byelaws, concept of sun light & ventilation. Components of Buildings & their functions, Basic concept of R.C.C., Introduction to types of foundation
Chapter 5
Transportation: Introduction to Transportation Engineering; Traffic and Road Safety: Types and Characteristics of Various Modes of Transportation; Various Road Traffic Signs, Causes of Accidents and Road Safety Measures.
Chapter 6
Environmental Engineering: Environmental Pollution, Environmental Acts and Regulations, Functional Concepts of Ecology, Basics of Species, Biodiversity, Ecosystem, Hydrological Cycle; Chemical Cycles: Carbon, Nitrogen & Phosphorus; Energy Flow in Ecosystems.
Water Pollution: Water Quality standards, Introduction to Treatment & Disposal of Waste Water. Reuse and Saving of Water, Rain Water Harvesting. Solid Waste Management: Classification of Solid Waste, Collection, Transportation and Disposal of Solid. Recycling of Solid Waste: Energy Recovery, Sanitary Landfill, On-Site Sanitation. Air & Noise Pollution: Primary and Secondary air pollutants, Harmful effects of Air Pollution, Control of Air Pollution. . Noise Pollution Harmful Effects of noise pollution, control of noise pollution, Global warming & Climate Change, Ozone depletion, Greenhouse effect
Text Books:
1. Palancharmy, Basic Civil Engineering, McGraw Hill publishers.
2. Satheesh Gopi, Basic Civil Engineering, Pearson Publishers.
3. Ketki Rangwala Dalal, Essentials of Civil Engineering, Charotar Publishing House.
4. BCP, Surveying volume 1
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
How to Manage Your Lost Opportunities in Odoo 17 CRMCeline George
Odoo 17 CRM allows us to track why we lose sales opportunities with "Lost Reasons." This helps analyze our sales process and identify areas for improvement. Here's how to configure lost reasons in Odoo 17 CRM
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
1. Western Oregon University Page 1 of 2
CS-161 Assignment #7
General
Submit this lab using the Moodle system by the beginning of lab
on the due date.
solution.
(see Assignment 1).
not ask for extra input.
If a program says something like “ask the user for their name
and the number of hours they worked”
you MUST read in the name first, then the number of hours and
not prompt for any other input.
formatting, confusing variable names,
unnecessarily complex code, etc… will all result in deductions
to your score.
Climb Stats
Filename : assign7.cpp
2. Elevation information about a hike is recorded like the table
shown below indicating that the
hike starts at 1200 feet, after 1 mile is at 3000 feet, etc… This
hike is 8 miles and consists of 9
data points:
Mile 0 1 2 3 4 5 6 7 8
Elevation 1200 3000 3450 2800 2900 1550 1750 1110 1200
Write a program that declares in main:
const int HIKE_LENGTH = 9;
This will represent the number of data points in the hike (not
the number of miles). Then
declares an array of ints of size HIKE_LENGTH. (I should be
able to change the number of
elevation points your code is working with by changing that one
const.)
You should then read in HIKE_LENGTH elevations into the
array (assume we always input the
data in order: mile 0, then 1, then 2…). After doing so, print:
point in the second half of the
hike and the highest point overall in the hike. (If there are an
odd number of elevation
readings, count the middle point as being in the first half).
- mile markers higher than the markers
before and after it. (The first
and last markers will never be considered peaks).
3. - ones with an
elevation change over 1000
ft (going up or down)
change between each marker
and the next. Note that both up and down count as elevation
change here: going up 800
ft and then down 300 ft would be a total change of 1100 ft.)
Sample run:
Enter elevations: 1200 3000 3450 2800 2900 1550 1750 1110
1200
Highest points:
First half: 3450
Second half: 1750
Overall: 3450
Average elevation: 2106.67
Peaks: 3
Difficult segments: 2
Elevation change: 5280
Make sure to read the
required functions
below.
Western Oregon University Page 2 of 2
4. CS-161 Assignment #7
You should write and use the following functions to help do
your work. You can add
others as you see fit.
a) void getData(int heights[], int size)
Read elevation data into the array from the console.
Hint… while testing you might want to not use this function and
just hard code
some numbers into main:
int elevations[] = {1200, 3000, 3450, 2800, 2900, 1550, 1750,
1110,
1200};
Once you are done with the other functions or about to turn in
the assignment,
remove the hard coded array and call this function instead.
b) int getHighestPointBetween(const int heights[], int startMile,
int endMile)
Return the highest elevation between the two mile markers
(inclusive).
For the data shown above, asking for highest between 3 and 5
should result in
2900. Asking for the highest between 0 and 8 should result in
3450.
c) double getAverage (const int heights[], int size)
Return the average elevation.
d) int getNumPeaks(const int heights[], int size)
Return the number of peaks in the hike
5. e) int getNumSteepSegments(const int heights[], int size)
Return the number of segments that end with a change of more
than 1000 feet.
For the numbers shown above, there would be 2 steep segments
(from 0-1 and
4-5).
f) int getTotalChange(const int heights[], int startMile, int
endMile)
Return the total elevation change over the range from startMile
to endMile
(inclusive). Note that any change (uphill or downhill) is
positive change.
For example, using the sample data from earlier in the
document,
getTotalChange(elevations, 1, 3) should return 1100
From 1 to 2 we go from 3000 up to 3450 : a change of 450
From 2 to 3 we go from 3450 to 2800 : a change of 650
A solution without
these functions will take
a significant penalty
even if it produces the
correct output.
Western Oregon University Page 1 of 5
6. CS-161 Assignment #8
General
Submit this lab using the Moodle system by the beginning of lab
on the due date.
s with your
solution. Each program should be in a
separate file - they MUST be named exactly as specified in each
problem. Do not attach any other
files.
(see Lab1 or 2).
into all programs in the specified order. Do
not ask for extra input.
If a program says something like “ask the user for their name
and the number of hours they worked”
you MUST read in the name first, then the number of hours and
not prompt for any other input.
formatting, confusing variable names,
unnecessarily complex code, etc… will all result in deductions
to your score.
Concepts
Upon completion of this lab the student will be able to use
multidimensional arrays.
Assignment Instructions
7. WordSearch
Filename : assign8.cpp (This is the file name you MUST use
for the file you submit for this problem.)
OR
assign8.cpp, WordSearch.cpp, WordSearch.h (main in assign8
and helper functions in other files)
A word search is a puzzle where you try to find words hidden in
a large grid of characters like the one
below. The hidden words below are: double, heap, int, main,
program, stack, void
H B G Q W R G X X I
E Y U A S L J A W J
A X D V A B I N T H
P R O G R A M H A A
K L U O B M F J L W
P M B O M O M V T Q
J Z L V D N A Z H D
G Y E D V O I D F D
X L D M N M N O P A
S T A C K U V M J P
Write a menu driven program to help build a word search. Your
program should start with an empty
8. character grid and allow the user to build a puzzle. It should
have a menu with the following options:
1: Print key
2: Print puzzle
3: Add horizontal word
4: Add vertical word
5: Check horizontal fit
6: Space count
8: Quit
(7 is reserved for the optional challenge).
You MUST use these menu
options. Do not change the
order.
Do not worry about bad
input.
Hint: You can get your
menu system working
without worrying about
the rest of the problem.
Western Oregon University Page 2 of 5
CS-161 Assignment #8
9. Your program should ask the user for a number representing an
option, then perform that option. After
performing any option (other than 8), the user should get to
enter a new option. Below are descriptions
of the options. Each menu item should be implemented as a
separate function. It is fine to add other
functions, but you must have at least one function per option.
If you do not get a particular option working, just print out a
message to that effect (“Sorry, option 3 is not
available”) and allow the user to choose a new option.
Option 1:
Print out the current puzzle grid in a format like (blank squares
are shown as _ here, you can just print
spaces if you want or some other special character to indicate
blanks):
H _ _ _ _ _ _ _ _ _
E _ _ _ _ _ _ _ _ _
A _ D _ _ _ I N T _
P R O G R A M _ _ _
_ _ U _ _ _ _ _ _ _
_ _ B _ _ _ M _ _ _
_ _ L _ _ _ A _ _ _
_ _ E _ V O I D _ _
_ _ _ _ _ _ N _ _ _
10. S T A C K _ _ _ _ _
Option 2:
Print out the current puzzle grid, but fill empty spaces with
random characters:
H B G Q W R G X X I
E Y U A S L J A W J
A X D V A B I N T H
P R O G R A M H A A
K L U O B M F J L W
P M B O M O M V T Q
J Z L V D N A Z H D
G Y E D V O I D F D
X L D M N M N O P A
S T A C K U V M J P
Continues…
Do not actually modify the
puzzle grid, just print out
random chars instead of
_’s
11. Note – your grid should
start with all _’s. This is
what a partially filled grid
should look like.
Western Oregon University Page 3 of 5
CS-161 Assignment #8
Option 3:
Ask the user for a starting row (1-10), column (1-10) and a
word. If the word is too long to fit, print an
error message and return to the main menu. Otherwise, place it
in the grid going to the right starting from
the indicated location. You do not have to worry about
overlapping words, if the user tries to place one
word on top of another, go ahead and add the word and assume
they know what they are doing.
Initial State:
H _ _ _ _ _ _ _ _ _
E _ _ _ _ _ _ _ _ _
A _ _ _ _ _ _ _ _ _
P _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
13. _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
Sample input 2:
Enter row: 1
Enter col: 5
Enter word: PARAMETER
Result:
Print “Error, does not fit”
“assume the user knows
what they are doing” is a
bad idea in the real world
Western Oregon University Page 4 of 5
CS-161 Assignment #8
Option 4:
Ask the user for a starting row (1-10), column (1-10) and a
word. This should work just like placing a
horizontal word, but should place it going down starting from
14. the indicated location. Once again, if the
word is too long to fit, just print an error message and return to
the main menu. Also, do not worry about
existing words, overwrite anything that is there.
Option 5:
Ask the user for a starting row (1-10), column (1-10) and a
word. Verify if the given word can fit
horizontally in the indicated location. To “fit” a word needs to
physically fit and all the letters in the word
need to not change existing words in the grid.
Print either “Fits” or “Does not fit”. Do not actually place the
word.
Given this starting grid (colors to show areas):
H _ _ _ _ _ _ _ _ _
E _ _ _ _ _ _ _ _ _
A _ D _ _ _ I N T _
P R O G R A M _ _ _
_ _ U _ _ _ _ _ _ _
_ _ B _ _ _ M _ _ _
_ _ L _ _ _ A _ _ _
_ _ E _ V O I D _ _
_ _ _ _ _ _ N _ _ _
S T A C K _ _ _ _ _
15. Sample input 1 (Placing “MEMORY” in the green area. It
overlaps “MAIN”, but so that the “M”s match):
Enter row: 6
Enter col: 5
Enter word: MEMORY
Result:
Fits
Sample input 2 (placing “MEMORY” in the orange area where
it overlaps “MAIN” but letters do not match
up):
Enter row: 9
Enter col: 5
Enter word: MEMORY
Result:
Does not fit
Option 6:
Print out how many blank spaces there are in the current puzzle.
Given the grid shown in Option 5, your
program should print 70.
Option 8:
The program should end. Ideally, it should just exit normally by
finishing main. But you can also use this
16. line to kill the program:
exit(0);
Western Oregon University Page 5 of 5
CS-161 Assignment #8
Optional challenge:
Add an option 7. It should print out the size and location of the
largest horizontal opening in each row. If
there is a tie, print the first of the larges gaps. For the grid in
option 5 you would print:
Row Gap Size Start Col
1 9 2
2 9 2
3 3 4
4 3 8
5 7 4
6 3 4 (This ties with the gap at 7)
7 3 4 (Another tie)
8 2 1 (Another tie)
9 6 1
10 5 6
Debugging Tip:
Although your grid in the final program should start out with all
_ characters, it will probably make it
easier to test your program if you start it with some data. Use
17. something like this to initialize your 2D
array while testing:
{
{"H","_","_","_","_","_","_","_","_","_"},
{"E","_","_","_","_","_","_","_","_","_"},
{"A","_","D","_","_","_","I","N","T","_"},
{"P","R","O","G","R","A","M","_","_","_"},
{"_","_","U","_","_","_","_","_","_","_"},
{"_","_","B","_","_","_","M","_","_","_"},
{"_","_","L","_","_","_","A","_","_","_"},
{"_","_","E","_","V","O","I","D","_","_"},
{"_","_","_","_","_","_","N","_","_","_"},
{"S","T","A","C","K","_","_","_","_","_"}
};
Then when you are done, comment out or delete that code and
replace it with something to initialize the
grid to a totally empty one.
Western Oregon University Page 1 of 1
CS-161 Lab #5
General
Submit this lab using the Moodle system by the beginning of lab
on the due date.
solution. It MUST be named exactly as
specified in each problem. Do not attach any other files.
18. mment at the top
(see assignment 1).
not ask for extra input.
If a program says something like “ask the user for their name
and the number of hours they worked”
you MUST read in the name first, then the number of hours and
not prompt for any other input.
formatting, confusing variable names,
unnecessarily complex code, etc… will all result in deductions
to your score.
Assignment Instructions
Filename : assign5.cpp (This is the file name you MUST use
for the file you submit for this problem.)
Write a program that extracts information from a text file
containing information about images on a
website.
Your program should read from a file called Images.txt which
will consist of an unknown number of lines.
Each line consists of an image URL (web address), an MD5
hash identifying the image, and a file size in
bytes. Here is what a line might look like:
http://smugmug.com/thumbs/Lacus.jpeg?170x330
44cf8edbd53cf75be874604b39a7694c 21990
Note that the URL consists of “http://smugmug.com/thumbs/”
followed by a filename (“Lacus.jpeg”)
including extension, then a question mark and the width (170)
19. and height (330) of the image.
A sample data file is provided below this assignment link named
Images.txt
Note that this file has 5 lines, but when I test your program I
will not use this exact file. You cannot count
on there always being exactly 5 images. The file will end with
an empty line (like the sample file). Make
sure to test your program with more/less lines than 5.
Your program should print out an organized table that for each
image shows: the filename, image type
(the file extension), the width, the height and the size in kB
(1024 bytes in a kB) rounded to one decimal
place. It should then display the total size in kB of the images.
Something like:
Name Type Width Height Size
Lacus.jpeg jpeg 170 330 21.5
Vel.jpeg jpeg 300 220 10.4
ElementumNullam.png png 270 280 58.6
MontesNasceturRidiculus.jpeg jpeg 180 220 101.5
AtLorem.jpeg jpeg 200 240 21.6
Total Size: 213.6
Hints:
numbers, but if you
do, here is how to do so:
20. string foo = "123";
int x = stoi(foo); //convert string to int
string bar = "123.5";
double y = stod(bar); //convert string to double
Make sure that you read
the right input file name.
Capitalization counts!
DO NOT USE A HARD
CODED PATH to a
particular directory like:
"C:StuffImages.txt" Your
code must open a file that
is JUST called " Images.txt"
Do not submit the test file,
I will use my own.
Western Oregon University Page 1 of 3
CS-161 Assignment #6
General
Submit this lab using the Moodle system by the beginning of lab
on the due date.
(see Lab1).
21. all programs in the specified order. Do
not ask for extra input.
If a program says something like “ask the user for their name
and the number of hours they worked”
you MUST read in the name first, then the number of hours and
not prompt for any other input.
formatting, confusing variable names,
unnecessarily complex code, etc… will all result in deductions
to your score.
Concepts
Upon completion of this lab the student will be able to write
functions to break up a program into
reusable blocks.
Background
The last digit of a credit card number is always chosen to
provide a checksum of the other digits. (The
scheme used is called the Luhn algorithm:
http://en.wikipedia.org/wiki/Luhn_algorithm). If one digit in a
credit card is changed, or they are typed in the wrong order, the
checksum should detect the data entry
mistake.
To check a credit card number, you need to:
the digits, BUT for every second
digit, do the following to the digit
22. o If the number ends up being two digits, add the two digits (i.e.
that as the number
visible by 10, the number is valid. If
not, the number is invalid.
Samples:
Given the number "79927398713", we would start on the right
with the 3 - it would not be doubled, but
the 1 would be. Then 7 is not doubled, but 8 is…
Digit 7 9 9 2 7 3 9 8 7 1 3
Doubled 18 4 6 16 2
One
9 7 Sum
Digits added 7 9 9 4 7 6 9 7 7 2 3 70
Since 70 is divisibly by 10, it is possibly a valid credit card
number.
Given the number "12345671234567", we would start from the
7 on the right, it is not doubled, but the 6
is. Then 5 is not doubled, but 4 is…
Digit 1 2 3 4 5 6 7 1 2 3 4 5 6 7
Doubled 2 6 10 14 4 8 12
23. One
1 5 3 Sum
Digits added 2 2 6 4 1 6 5 1 4 3 8 5 3 7 57
Since 57 is not divisibly by 10, it is NOT a possibly valid credit
card number.
Also, you can use identify the issuer of a credit card with the
beginning digit(s):
http://en.wikipedia.org/wiki/Luhn_algorithm
Western Oregon University Page 2 of 3
CS-161 Assignment #6
Problem : Credit Card Checker
Filename : assign6.cpp (This is the file name you MUST use
for the file you submit for this problem.)
Write a program that reads in a string representing a credit card
number. It should then print out if the
number is valid and what kind of card it is.
Sample runs:
24. Run 1:
Enter card number: 79927398713
Valid number, unknown issuer
Run 2:
Enter card number: 43214321
Not a valid number, Visa
Required Functions:
You MUST create and use the following functions in your code:
Takes in a string as a parameter - prints that to the console, then
gets a string of input from the
console and returns the input.
Turns a char like '3' into the number it represents (3). Behavior
is undefined for chars that do not
representing digits.
er);
Processes a number to be doubled according to the rule for a
doubled digit in the Luhn
algorithm. Double the number and either return this value if the
number is still single digits, or
return the sum of the digits if it is a double digit number.
Calling doubledDigitValue(4) should
give 8. Calling doubledDigitValue(8) should give 7.
Sums the digits of a credit card number according to the Luhn
algorithm. i.e. Calling
25. sumOfDigits("79927398713") should result in 70. (This should
make use of charToInt and
doubledDigitValue.)
Hint: the algorithm is supposed to work from right to left. Start
by just printing out the string one
char at a time in reverse order. Then worry about actually
adding up their values. Don't forget
that every second one gets doubled.
Returns true/false indicating if a credit card number is
potentially a valid number according to
Luhn algorithm. (This should use a call to sumOfDigits!)
Returns a string representing the type of credit card a number
is: Visa, MasterCard, American
Express, or Unknown.
Each function (other than main) MUST be preceded by a
doxygen style comment consisting of at least:
@brief
@param for each parameter
@return (unless void)
A program that works but
does not use functions will
receive 0 pts.
Feel free to add more
functions, but you must at
least create and use the
listed ones.
26. Western Oregon University Page 3 of 3
CS-161 Assignment #6
Strategy:
You can and should build functions one by one and test them in
main. For example, to test getInput you
might write in your main function:
string card = getInput("Enter card number:");
cout << card << endl; //should be whatever you enter
Once you are sure that function is working correctly, you can
delete (or comment out) those tests and
start working on the next function – testing it as you go. Once
they are all written, you can write the "real"
main function… it should only take a few lines of code to
express.
Here is a diagram of how the functions should relate to each
other. It shows that main should at some
point call isValid and give it a string like "43214368". isValid
will do some work with that string and
eventually return true or false. As part of doing its work,
isValid should call sumOfDigits and pass it the
string representing the card number. sumOfDigits will return an
int like 45 based on doing the
27. Optional challenge:
Break out all your functions other than getInput into a file
"CreditFunctions.cpp". Declare them all in a file
"CreditFunctions.h" that is included from assign6.cpp.
assign6.cpp should now just have the getInput and
main functions. Submit all three files.
Do NOT worry about
solving the "problem" until
all your functions are
working.
You can and should make
use of functions to build
other functions!
Sample parameter/return
values are just SAMPLES –
do not try to hard code in
these values!!!