C++ Programming Chapter 7 Assignment:
Assignment #4 – Student Ranking :
In this assignment you are going to write a program that ask user number of students in a class and their names. Number of students are limited to 100 maximum. Then, it will ask for 3 test scores of each student. The program will calculate the average of test scores for each student and display with their names. Then, it will sort the averages in descending order and display the sorted list with students’ names and ranking.
Follow the Steps Below
In: Computer Science
2. A student brings 8 chocolate chip cookies, and 7 oatmeal
raisin cookies, to his seminar of 5 students and 1 teacher. If all
the cookies are eaten, how many distributions of the cookies to the
class are there?
(a) (5 points) List some possible distributions of the chocolate
chip cookies, and symbolize each of these using
c’s and |’s.
(b) (5 points) Use o’s and |’s to list an impossible distribution
of the oatmeal raisin cookies.
(c) (5 points) How many distributions of the cookies are
there?
In: Statistics and Probability
Juan Reyes Dela Cruz, single and a Filipino citizen, died on February 14, 2020. At the time of his death, he resides in N. Reyes St., Sampaloc, Manila.
In filing his estate tax return, the BIR RDO No. 032 – Manila assigned Taxpayer Identification No. 123-456-789-0000 to his estate. On the other hand, YOU, as the administrator of his estate was given TIN no. 987-654-321-0000.
The following are the composition of his estate:
Lot
House and Lot (Family
home)
Cash (Bank of Macabebe –
Account No. 14344) – Php
2,000,000.00
Additional information:
Details
Lot
House and Lot
Title No.
001
002
Tax Declaration No. - Land
11-01
11-02
Tax Declaration No. - House
11-03
Location
San Isidro, Macabebe, Pampanga
N. Reyes St, Manila
Area
100 sqm
100sqm
Classification
Agricultural
Residential
Details
Zonal Value
Assessed Value
Lot in Pampanga
Php 3,000,000.00
Php 1,000,000.00
Lot in Manila
Php 3,000,000.00
Php 2,000,000.00
House
Php 2,000,000.00
In: Accounting
In: Nursing
You are interested in doing research on COVID-19. Provide example questions/objectives that you can research with each of the following designs: cross-sectional survey, case report, case series, retrospective cohort, and randomized-controlled trial. Make sure it is clear to me that you understand the type of study (give enough information; provide direction; what would be ascertained first in terms of outcomes and exposure/risk).
In: Statistics and Probability
Detail, with very specific examples of each item, the meaning of the following concepts related to statistical data gathering: Be sure that the concept is first defined, IN YOUR OWN WORDS, and that you use a concrete example (including visual examples) to illustrate your understanding of the statistical concept: Cohort; Placebo; Prospective Study; Retrospective Study; Cluster; Control Group; Mean; Median; Mode; Histogram; Outlier; Pie Chart;
In: Psychology
Shown here is the sort.c program which takes data.txt and sorts it. If I have found the addresses for system(), exit(), and “/bin/sh”, how would I do the following by ONLY changing the contents of data.txt?: 1) open the shell code 2) exit cleanly fron the shell code all while 3) not receiving a seg fault.
I beleive the correct answer is to have about 18-19 rows of aaaaaaaa followed by the three addresses so that when the stack starts to pop off one of the new addresses will be in the olace of the sort return address.
Here is the code in plain text:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
/*
* a toy program for learning stack buffer
* overflow exploiting
* It reads a list of hex data from the
* specified file, and performs bubble sorting
*/
#define SORT_ME 1 //Comment this out and recompile if you do not want the function to sort your values.
long n = 0, c = 0, d = 0, v = 0;
FILE *fp = NULL;
void SortData()
{
long swap = 0;
long array[17];
// loading data to array
printf("Source list:\n");
char line[sizeof(long) * 2 + 1] = {0};
while(fgets(line, sizeof(line), fp)) {
if (strlen((char *)line) > 1) {
sscanf(line, "%lx", &(array[n]));
printf("0x%lx\n", array[n]);
++n;
}
}
fclose(fp);
#ifdef SORT_ME
for (c = 0; c < (n - 1); c++)
{
v = c;
for (d = ( c + 1 ); d < n; d++)
{
if (array[d] < array[v])
{
// Swap the found minimum element with the first element
swap = array[d];
array[d] = array[v];
array[v] = swap;
}
}
}
#endif
// output sorting result
printf("\nSorted list in ascending order:\n");
for ( c = 0 ; c < n ; c++ )
printf("%lx\n", array[c]);
}
int main(int argc, char **argv)
{
if(argc!=2)
{
printf("Usage: ./sort file_name\n");
return -1;
}
// From
http://stackoverflow.com/questions/5141960/get-the-current-time-in-c
time_t rawtime;
struct tm * timeinfo;
time(&rawtime);
timeinfo = localtime(&rawtime);
printf("Current local time and date: %s\n\n",
asctime(timeinfo));
fp = fopen(argv[1], "rb");
SortData();
return 0;
}
In: Computer Science
1. The following is the frequency distribution table
of the marks scored by candidates in an examination.
Marks 0-9 10-19 20-29 30-39 40-49 50-59 60-69 70-79 80-89
90-99
frequency 2 7 8 13 24 30 6 5 3 2
A. Make a cumulative frequency table and use it to draw the
cumulative frequency curve for the distribution
B. Use your graph to estimate
I. The median mark
II. The lower quartile
III. The upper quartile
IV. The inter quartile range
V. The pass mark if the 60 percent of students passed
VI. The 40th percentile
VII. The 20th percentile
C. Calculate the following
I. Mode
II. Median
III. Standard deviation
IV. Co efficient of variation
V. Skewness
In: Statistics and Probability
Place 4 charges at the corners of a square which is 2 meters by 2 meters (4 large squares along each length). Place two +1 nC charges at adjacent corners and two -1 nC charges at the other two corners.
Determine the direction of the electric field at the following
three points:
Point E halfway between two like charges. (-120 degrees, 50
V/m)
Point F halfway between two opposite charges. (-90.5 degrees, 309
V/m)
Point G at the center of the square. (90 degrees, 210 V/m)
1. For the points E, F and G, draw a diagram showing both charges and the two individual field vectors (one for each charge) and explain why their vector sum points in the direction that you.
2. Determine the electric potential at the points E, F and G. List them numerically and give an explanation for their value
In: Physics
lamda1 = 3.7 uC/cm
pic for#1
1) A cylinder of radius a = 6.4 cm and height h = 11.9 cm is aligned with its axis along the y-axis as shown. What is the total flux ? that passes through the cylindrical surface? Enter a positive number if the net flux leaves the cylinder and a negative number if the net flux enters the cylnder.
pic for #2
2)Another infinite line of charge with charge density ?2 = -11.1 ?C/cm parallel to the y-axis is now added at x = 3.05 cm as shown.
What is the new value for Ex(P), the x-component of the electric field at point P?
3)What is the total flux ? that now passes through the cylindrical surface? Enter a positive number if the net flux leaves the cylinder and a negative number if the net flux enters the cylnder.
pic for #4
4)The initial infinite line of charge is now moved so that it is parallel to the y-axis at x = -3.05cm.
What is the new value for Ex(P), the x-component of the electric field at point P?
5)What is the total flux ? that now passes through the cylindrical surface? Enter a positive number if the net flux leaves the cylinder and a negative number if the net flux enters the cylnder.
In: Physics