Questions
Question 5 a) Students’ attitude towards teachers and class is a major cause of plagiarism. Some...

Question 5
a) Students’ attitude towards teachers and class is a major cause of plagiarism. Some students cheat because they have negative student attitudes towards assignments and tasks that teachers think have meaning but they don’t” (Howard, 2002). Illustrate your agreement or disagreement with the above statement. (EV – 6 marks)
b) Based on the statement in (a) critically analyze in details and with the use of your own examples three major means of reducing plagiarism among university students.
(CR – 6 marks)
c) Engaging unethical behaviors in your academic journey usually is not encouraged as it gives a terrible reflection of the potentially bad professional behaviors you will exhibit in the future. With the backing of practical examples of your choice, discuss and justify how unprincipled and unethical behaviors of a professional can convey distress or potential harm to a customer and describe which key remedies can be used to resolve the condition.
(AN – 8 marks

In: Psychology

You are to write a program that grades students (Maybe I will use it on you)....

You are to write a program that grades students (Maybe I will use it on you). Your program must open and read in "input.txt" (an example of which is below). It will contain the students name and their test scores. You are to calculate the students final grade in the course. Take the average of their test scores and output their average to a file with the below format. For the output.txt ensure that the formatting is in the block style shown below. Test scores should always be shown to the second decimal place. input txt: (Meryl Streep 100 105 98.5 99.5 106)

output txt : (Meryl StreepTest scores:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Average score: .......................101.80Test score 1: ........................100.00Test score 2: ........................105.00Test score 3: .........................98.50Test score 4: .........................99.50Test score 5: ........................106.00~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) Input fields: <First Name> <Last Name> <Score on Test 1> <Score on Test 2> <Score on Test 3> <Score on Test 4> <Score on Test 5>


c++

In: Computer Science

Write the following queries using the schema below Class (Number, Department, Term, Title) Student (Username, FirstName,...

Write the following queries using the schema below

Class (Number, Department, Term, Title)

Student (Username, FirstName, LastName, Year)

Takes (Username, Department, Number, Term, Grade)

[clarification] In Student, Year is an integer. A student can be a 2nd year student. In that case, Year value would be 2.

For the Takes relation:

·         Grade is NA for current semester students

·         Username is foreign key to Student

·         (Department, Number, Term) is foreign key to Class

a)       Write an SQL query that returns the Term when students with username “alex” and “bob” take at least 1 class together. Include the number of class that they have taken together in that Term.

b)      Write an SQL query that returns the usernames of the students who take exactly two classes in the “CSE” department in the term “Fall.2020”

c)       Write an SQL query that returns the title of all classes which have not been taken by any first-year student.

In: Computer Science

Suppose Rialto is the only movie cinema in a small college town, so it is essentially...

Suppose Rialto is the only movie cinema in a small college town, so it is essentially a monopoly for the local movie market. They charge a certain price P for a monthly pass. There is an overall demand curve for movie passes, given by P=900−4Q However, demand in the town has two distinct consumer groups: adults (A) and students (S). The demand for the whole group of adults is given by P=1200−8QA and the inverse demand for students is given by P=400−2QS Assume for simplicity that the constant marginal cost MC(Q) of showing a movie is 20 and there are no additional fixed costs.

(e)Calculate the profit-maximizing quantities and prices for students and adults.

(f) Calculate total costs, revenues, and profits resulting from these values.

(g) Show this in your figures graphically, as well

(h) Compare total profits in (b) with (f). Which is greater. Under what circumstances would the ID machine be worth it (that is, for what values of $M)?

In: Economics

Problem Write a movie management system using object-oriented design principles. The program will read from the...

Problem Write a movie management system using object-oriented design principles. The program will read from the supplied data file into a single array list. The data file (movies.txt) contains information about the movies. Each movie record has the following attributes: - Duration (in minutes) - Title - Year of release Each record in the movies.txt file is formatted as follows: - Duration,Title,Year - e.g.: 91,Gravity,2013 Specifically, you have to create an interactive menu driven application that gives the user the following options: 1. Add a new movie and save. o The user will be prompted to enter the duration in minutes, title of the new movie, and the year the movie was released. Before the movie is added, the inputs provided by the user should be validated:  The duration and year of the movie should not be zero and the title of the movie should not be empty. o When you add a new movie, the program should update the data file by saving the new movie at the end of the movie list. 2. Generate list of movies released in a year. o The user will input a year and the program will display a list of all the movies released in that year along with the duration (in minutes) of all the movies. o The list of movies does not have to be sorted. 3. Generate list of random movies. o The user will input the number of movies and the program will display a list containing the amount of random movies along with the duration (in minutes) of all the movies. o There is no minimum or maximum duration for the movies in the list. o You can use Collections.shuffle in the java.utils package to randomize the movie list. 4. Exit the program. - Save the list of movies back into the data file “movies.txt” using the above format (Duration,Title,Year). Notes: To follow the object-oriented principles, your project should contain ONLY the following classes and methods in their respective package. Package Class Methods sait.mms.application AppDriver main sait.mms.managers MovieManagementSystem displayMenu, addMovie,generateMovieInYear, generateRandomMovie, loadMovie sait.mms.problemdomain Movie Accessor methods, toString You cannot use parallel and/or nested arrays in this assignment (you can use ArrayList). Sample runs: An example of an added and saved a new movie (where input is shown in bold underline): Movie Management system 1 Add New Movie and Save 2 Generate List of Movies Released in a Year 3 Generate List of Random Movies 4 Exit Enter an option: 1 Enter duration: 100 Enter movie title: We are Gold Enter year: 2019 Saving movies... Added movie to the data file. An example of a generated list of movies released in a year (where input is shown in bold underline): Movie Management system 1 Add New Movie and Save 2 Generate List of Movies Released in a Year 3 Generate List of Random Movies 4 Exit Enter an option: 2 Enter in year: 1996 Movie List Duration Year Title 103 1996 DragonHeart 93 1996 Trainspotting 145 1996 Independence Day Total duration: 341 minutes An example of invalid option (where input is shown in bold underline): Movie Management system 1 Add New Movie and Save 2 Generate List of Movies Released in a Year 3 Generate List of Random Movies 4 Exit Enter an option: 5 Invalid option! An example of a generated list of random movies (where input is shown in bold underline): Movie Management system 1 Add New Movie and Save 2 Generate List of Movies Released in a Year 3 Generate List of Random Movies 4 Exit Enter an option: 3 Enter number of movies: 5 Movie List Duration Year Title 129 2016 Now You See Me 2 139 1999 Fight Club 136 2014 Captain America: The Winter Soldier 81 1995 Toy Story 103 2017 Life Total duration: 588 minutes

In: Computer Science

Problem 5: writing a faster implementation For this homework assignment, you will write a faster implementation...

Problem 5: writing a faster implementation

For this homework assignment, you will write a faster implementation of do_insertions_simple (which we will call do_insertions_fast). We won't need anything extra (no special modules, no advanced algorithms, no Numpy) in order to obtain a considerable speedup.

Let's think about what makes do_insertions_simple slow, and about how we can rewrite the whole thing in a faster way. The biggest problem with do_insertions_simple is that it calls insert once for every element of the insertions list -- or 10,000 times, in our test case above. Insertion into a list is expensive, because it requires all the elements after the insertion point to be rearranged. So, insertions early in the list are especially expensive.

Appending to the end of a list, on the other hand, is very cheap, because nothing has to be rearranged. So, how can we make it that we use insert as little as possible, and instead use append whenever possible?

Here's one strategy for implementing do_insertions_fast:

  1. Create a new, empty list. We will use this list to build up the output.
  2. For each pair (i, x) in insertions, do the following:
    • If i is greater than the current length of the output list, insert x into the output list at the appropriate position.
    • Otherwise, do as follows:
      • Find out how many list elements should fall between the current end of the output list and the place x should go. Take only those elements from the original list l, and concatenate them to the output list.
      • Then append x to the end of the output list.
  3. Finally, after all insertions are done, concatenate any remaining elements of l onto the output list.
  4. Return the output list.

In the below cell, write your implementation of do_insertions_fast. You are not required to use the strategy outlined above, but it's a pretty good one, and I recommend it: using it, you should end up with something at least 100 times faster than do_insertions_simple!

Finally, here's one more hint if you decide to use the above strategy: keep track of the number of elements in l that have gone into the output list as you go along. This number will be useful in implementing the above strategy.

def do_insertions_fast(l, insertions):

    """Implement here a faster version of do_insertions_simple """

    # YOUR CODE HERE

Correctness

First, let's check that you compute the right thing.

import string

l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

insertions = [(0, 'a'), (2, 'b'), (2, 'b'), (7, 'c')]

r1 = do_insertions_simple(l, insertions)

r2 = do_insertions_fast(l, insertions)

print("r1:", r1)

print("r2:", r2)

assert_equal(r1, r2)

is_correct = False

for _ in range(20):

    l, insertions = generate_testing_case(list_len=100, num_insertions=20)

    r1 = do_insertions_simple(l, insertions)

    r2 = do_insertions_fast(l, insertions)

    assert_equal(r1, r2)

    is_correct = True

In: Physics

for Python 3 Write a python program that Creates a list that has these values in...

for Python 3

Write a python program that
  Creates a list that has these values in this order,
        'Python', 'JavaScript', and 'PHP'

 Define a displayMyClasses function that sorts the list
        and then displays each item on the list, one per line,
        in sorted order.  Also, number the displayed list as
        shown in the "Running a Sample Program" shown below.
        
Define a guessNext function that selects a random
        element from the list and returns it to the call of the function.

When the program begins, the main function should display the "Assignment 5" 
        title as the first line and then call the displayMyClasses function to  
        display the current contents of the list.
        
Next, prompt the user to enter an "A" to add a new class to the list
        or enter an "R" to remove a class from the list.
        
If the user enters a blank, exit the loop.
        
If the user enters an "A", then prompt them to enter the name of the class
        they want to add to the end of the list and, after they answer, add the
        class to the end of the list.

If the user enters an "R", then prompt them to enter the name of the class
        they want to remove from the list and, after they answer, remove the
        class from the list.
        
If the user has not entered an "A" or and "R" display a message
        that says "You must choose an 'A' to Add or an 'R' to Remove a class"
        and start the code back at the top of this #5 step so that they
        get re-prompted for the correct information.

Once the loop is exited, call the displayMyClasses to display 
        the current contents of the list.
        
Now call the guessNext function and receive the random
        class value returned.
        
Display "The next class you should teach is: (the random class)"
        


Below is a example of how the program should run
the program should run in a similar
manner no matter what names and age are entered.


Assignment 5

List of Classes I Teach: 

1. JavaScript
2. PHP
3. Python

Do you need to Add or Remove a class? (A/R)A

Enter the name of the class you wish to add: HTML

Do you need to Add or Remove a class? (A/R)R

Enter the name of the class you wish to remove: PHP

Do you need to Add or Remove a class? (A/R)A

Enter the name of the class you wish to add: PHP with MySQL

Do you need to Add or Remove a class? (A/R)d

You must choose an 'A' to Add or an 'R' to Remove a class

Do you need to Add or Remove a class? (A/R)

List of Classes I Teach: 
1. HTML
2. JavaScript
3. PHP with MySQL
4. Python

The next class you should teach is: JavaScript

here is what i have so far and i am stuck....

mylist = ["Python", "JavaScript", "PHP"]

def main():
    print("Assignment 5\n")


def displayMyClasses():
    print("List of Classes I Teach: ")

    print(mylist)

    mylist.sort()
  
    for item in mylist:
        print(item)


def guessNext():


if __name__ == "__main__":
    main()
  

In: Computer Science

/** * This class maintains an arbitrary length list of integers. * * In this version:...

/**
* This class maintains an arbitrary length list of integers.
*
* In this version:
* 1. The size of the list is fixed after the object is created.
* 2. The code assumes there is at least one element in the list.
*
* This class introduces the use of loops.
*
* @author Raymond Lister
* @version September 2015
*
*/
public class ListOfNVersion02PartA
{   
public int[] list; // Note: no "= {0, 1, 2, 3}" now

/**
* This constructor initializes the list to the same values
* as in the parameter.
*
* @param element the initial elements for the list
*/
public ListOfNVersion02PartA(int [] element)
{
// make "list" be an array the same size as "element"
list = new int[element.length];


// add whatever code is required to complete the constructor


} // constructor ListOfNVersion01Skeleton(int [] element)

/**
* @return the number of elements stored in this list
*/
public int getListSize()
{
return 999; // replace "999" with the correct answer

/* See Nielsen page 85-86,
* section 4.2.3 Retrieving the size of arrays: length
*
* See Parsons page 45,
* section 3.3.4 The Array “length” Field and also page 47
*/
} // method getListSize

/**
* @return the last element in the list
*/
public int getLast()
{
return 999; // replace "999" with the correct answer

/* See Nielsen page 85-86,
* section 4.2.3 Retrieving the size of arrays: length
*
* See Parsons page 45,
* section 3.3.4 The Array “length” Field and also page 47
*/

} // method getLast

/**
* prints the contents of the list, in order from first to last
*/
public void printList()
{
System.out.print("{");

// add and/or modify code to complete the method

System.out.print("}");

} // method printList

/**
* This method is NOT examinable in this test.
*
* prints the contents of the list, in order from first to last, and
* then moves the cursor to the next line
*/
public void printlnList()
{
printList();
System.out.println();

} // method printlnList

/**
* @return the number of times the element occurs in the list
*
* @param element the element to be counted
*/
public int countElement(int element)
{
// add and/or modify code to complete the method

return 999;

} // method countElement

/**
* @return the number of times the replacement was made
*
* @param replaceThis the element to be replaced
* @param withThis the replacement
*/
public int replaceAll(int replaceThis, int withThis)
{
// add and/or modify code to complete the method

return 999;

} // method replaceAll

/**
* @return the first position in list occupied by the parameter value, or -1 if it is not found
*
* @param findThis the value to be found
*/
public int findUnSorted(int findThis)
{
// This algorithm is known as "linear search"

return 999;


// add and/or modify code to complete the method


} // method findUnSorted

/**
* @return the position of the smallest element in the array, between positions "first" and "last"
*/
public int minPos()
{

return 999;


// add and/or modify code to complete the method


} // method minPos
  
/**
* Inserts an element in the last position. The elements already in the
* list are pushed down one place, and the element that was previously
* first is lost from the list.
*
* @param newElement the element to be inserted
*/
public void insertLast(int newElement)
{   

// add and/or modify code to complete the method


} // method insertLast

} // class ListOfNVersion02PartA

In: Computer Science

This is an exercise in correctly implementing insertion sort and selection sort. This assignment includes a...

This is an exercise in correctly implementing insertion sort and selection sort.


This assignment includes a text data file containing information on tutorial websites for a variety of programming languages. The data file is named Tutorials. It contains records of programming tutorial websites. The record structure for this text file is:


FIELD 1 = Programming Language

FIELD 2 = Name and Description of Website

FIELD 3 = URL Web Address of Language Tutorial


The structure of the file is that there is a separate line for each field/property/attribute of the record. Every three lines makes up one physical record.


For those of you who took computer science I here at CCP, you covered using a bubble sort to sort elements in a collection.


In your project, create two methods for the project – one that performs a selection sort on your Tutorial Website object array and one that performs an insertion sort on your Tutorial Website object array.


You should create a user defined object of Tutorial Website type. The object should have three properties:

Language Name
Website Description
Website URL

Your object will need to implement the comparable interface for this object. You may choose the property is used to determine the order of your object. Language name would be the best choice.


Your project should read the list of programming language tutorials in from the text data file, and load the data into a Tutorial Website object . In the process it should add the object into an array. After the array is fully loaded, print the list in unsorted order. sort the list in the array in ascending order using a Selection Sort Algorithm. After the list in the array is sorted in ascending order using the selection sort, print the list to the screen and write the list to CSV file. You should then sort the list in descending order using a Insertion Sort Algorithm. After the list in the array is sorted in ascending order using the selection sort, print the list to the screen and write the list to a CSV file in the project folder. After the list in the array is sorted in descending order using the Insertion sort, print the list to the screen and write the list to a CSV file in the project folder.

In: Computer Science

BMI as a vital sign. Insured that all patients in local community clinics had their height...

BMI as a vital sign. Insured that all patients in local community clinics had their height and weight measured at each visit through provider education and training and referral system development (reached over 7,500 clinic patients). ? Breastfeeding policy. Implemented policies to promote breastfeeding in clinics, educated patients and clinic employees on the value of breastfeeding, and built capacity for more certified lactation specialists. Documented rates of exclusive breastfeeding from 7.7% in January 2005 to 20.2% in November 2009 (reached 900 staff and patients). ? School menu standards. Improved school meal/menu program during and after school to ensure meal compliance with nutritional standards and needs. Improved menu offerings and ingredients (e.g., added salad bars, changed to baked fries, whole wheat flour, etc). Expanded Universal Breakfast to five schools. Monitored compliance of policies for healthy fundraising, healthy vending, and alternative classroom rewards and incentives (reached over 7,700 students). ? PE standards. Implemented, at five elementary schools, the California standards-based physical activity curriculum and Game Days during school (reached 3,450 students). ? Worksite wellness. Worked with employers to adopt and implement worksite HEAL policies in the workplace; all county departments now have a worksite wellness coordinator. Received the worksite wellness bronze award for its accomplishments. (reached 4,000 employees in several worksites). ? Corner market produce. Implemented a grocery store Healthy Produce Basket project in neighborhood stores. Provided owners with educational materials and free produce in a basket and worked to identify ways to maintain the flow of produce. Some stores began purchasing from distributers. Worked with youth to provide free produce deliveries to these stores from unsold farmers’ market products to assist stores build a customer base for fresh fruits and vegetables (reached 4200 residents). ? Resident gardens. Local women from the Healthy Birth Outcome (HBO) Project grew produce in their backyards. Piloted selling excess produce at a stand in the park with the intention of creating a farmer’s market (reached 160 residents). ? Farmer's market. Organized and developed a four-month annual certified farmers’ market in West Modesto. Worked with Heifer International, a local organization that donated farm land and staff, and Project Uplift, a youth development project, to train youth to grow and sell organic produce with other vendors (reached 625 residents). ? After-school physical activity. Implemented a number of programs to increase the amount of exercise students get in afterschool programs, including the SPARK curriculum (offered daily), Powerplay (offered three times per week), and “Walk It Out” (offered three times per week). Increased daily after-school activity time from 15% to 45% (reached 1800 students). ? Walking school bus. Created a walking school bus at one school that increased the number of students walking approximately one half mile to school each day. Increased safety awareness through adult supervision, influenced traffic abatement, and reduced student tardiness (75 students walking daily). ? BMI counseling. Developed a routine counseling system to promote weight reduction among patients identified as being overweight in health care clinics (reached 140 patients). ? Youth awareness. Promoted student awareness of the importance of healthy eating and physical activity through the Educational Theater Program, Walk to School assemblies and other events (reached 2080 students). ? Community awareness of safe physical activity programs. Developed healthy messages for partners to insert into flyers, newsletters, bus ads, billboards, articles in local newspaper, and events (reached 17,000 residents). ? Worksite wellness promotion. Developed and implemented worksite wellness programs to decrease consumption of unhealthy foods and beverages and promote physical activity among employees. Received a state worksite wellness bronze award for its accomplishments (reached 4,000 employees in several worksites). After reading the description CAREFULLY, please organize the various objectives employed in this evaluation into the "bands" of the social-ecological model. You should briefly indicate WHY you feel these strategies fall within the specific categories of the model. From the list of objectives you have placed in the model, pick one objective from EACH of the "bands" of the model. Describe how you would evaluate that objective. Would you use formative or summative methods (and why)? What types of study design (qualitative or quantitative) and specific techniques would you use to collect the data in order to evaluate that objective? What sort of sampling might you use for each data collection approach? Remember to argue for your choices!

In: Nursing