You are given the program to support the management of a movie rental place
You are required to perform refactoring on that program to improve its quality. You are encouraged to use refactoring services in IDEs such as Eclipse or IntelliJ.
Then, you are required
1) to add a main() method to test the program; and
2) to add a new method to print the statement for a customer in XML format, e.g., John Smith , Independent Day , etc. Please submit your resulting code
Your solution must at least contain:
1. At least 3 method extraction operations
2. At least 3 creation of 3 new classes
3. At least 3 moving method operations
4. At least 3 renaming operations

Answers

Answer 1

Answer:

to add a main loop

Explanation:


Related Questions

A secure biometrics system authenticates the user based on his/her physiological (e.g., fingerprint, face, voice) or behavioral (e.g., gait, hand gesture, keystroke) traits. Typically, a binary classification model will be developed to generate predicted probabilities based on the input information. Please explain:

Answers

Answer:

The solution to this question can be defined as follows:

Explanation:

please find the complete question in the attached file:

In point a:

It utilizes multiple algorithms based on machine learning can understand the attributes or transform their probability into projections. Its algorithms could be used, including such neural computer systems or artificial neural networks. Whenever the input, as well as the target outcome, are taken their possibilities are converted in forecasts, so that if the input, as well as the corresponding results, are balanced.

In point b:

The operating curves of its receiver is indeed a plot of its true positives for its incorrect positive rate. It could be used in different tests for treatment. It indicates the variations of its responsiveness between all the two components and also the accuracy. Line slopes supply LR with a value.

Why are floppy disks obsolete ?

Answers

Answer:

they don't have enough space on them to carry useful information, and because most computers no longer have a drive for them. This is true for most legacy items

Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text.

Ex: If the input is: (see image attached)

my code is this one but i dont know what im doing wrong:

#include
using namespace std;
int main()
{

while (true)
{
string word;

if (word.compare("Quit")==0)
{
break;
}
else if (word.compare("quit")==0)
{
break;
}

int len=word.length();

cout = 0; i--)
{
cout << word[i];
break;
}
cout << endl << endl;
}
cout << "Thank You..!";
return 0;
}

Answers

Table of Contents

1 Introduction

2 Running sed

2.1 Overview

2.2 Command-Line Options

2.3 Exit status

3 sed scripts

3.1 sed script overview

3.2 sed commands summary

3.3 The s Command

3.4 Often-Used Commands

3.5 Less Frequently-Used Commands

3.6 Commands for sed gurus

3.7 Commands Specific to GNU sed

3.8 Multiple commands syntax

3.8.1 Commands Requiring a newline

4 Addresses: selecting lines

4.1 Addresses overview

4.2 Selecting lines by numbers

4.3 selecting lines by text matching

4.4 Range Addresses

5 Regular Expressions: selecting text

5.1 Overview of regular expression in sed

5.2 Basic (BRE) and extended (ERE) regular expression

5.3 Overview of basic regular expression syntax

5.4 Overview of extended regular expression syntax

5.5 Character Classes and Bracket Expressions

5.6 regular expression extensions

5.7 Back-references and Subexpressions

5.8 Escape Sequences - specifying special characters

5.8.1 Escaping Precedence

5.9 Multibyte characters and Locale Considerations

5.9.1 Invalid multibyte characters

5.9.2 Upper/Lower case conversion

5.9.3 Multibyte regexp character classes

6 Advanced sed: cycles and buffers

6.1 How sed Works

6.2 Hold and Pattern Buffers

6.3 Multiline techniques - using D,G,H,N,P to process multiple lines

6.4 Branching and Flow Control

6.4.1 Branching and Cycles

6.4.2 Branching example: joining lines

7 Some Sample Scripts

7.1 Joining lines

7.2 Centering Lines

7.3 Increment a Number

7.4 Rename Files to Lower Case

7.5 Print bash Environment

7.6 Reverse Characters of Lines

7.7 Text search across multiple lines

7.8 Line length adjustment

7.9 Reverse Lines of Files

7.10 Numbering Lines

7.11 Numbering Non-blank Lines

7.12 Counting Characters

7.13 Counting Words

7.14 Counting Lines

7.15 Printing the First Lines

7.16 Printing the Last Lines

7.17 Make Duplicate Lines Unique

7.18 Print Duplicated Lines of Input

7.19 Remove All Duplicated Lines

7.20 Squeezing Blank Lines

8 GNU sed’s Limitations and Non-limitations

9 Other Resources for Learning About sed

10 Reporting Bugs

Appendix A GNU Free Documentation License

Concept Index

Command and Option Index

Next: Introduction, Up: (dir)   [Contents][Index]

GNU sed

This file documents version 4.8 of GNU sed, a stream editor.

Copyright © 1998–2020 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.

• Introduction:    Introduction

• Invoking sed:    Invocation

• sed scripts:    sed scripts

• sed addresses:    Addresses: selecting lines

• sed regular expressions:

Explanation:

Scenario: You are part of an IT group managing Active Directory for a mid-size organization. A contracted research group with their own IT team operating from a remote location with a slow network connection has requested that they be able to setup a Child Domain in your organization's domain. The remote IT teams argument is based on their slow network, and their need to access and administer the local server that would need to exist in their remote location. Your team is split between allowing the Child Domain or recommending an Organizational Unit and delegating the remote IT team access. Yours is the deciding vote -- and cost is being considered a deciding factor. What option do you support as the best option in this scenario? What DC configuration for the remotely located server would be the best option?
If instead of cost, the deciding factor was the slow speed of their network, what option would you support as the best option?

Answers

Explanation:

1.

the answer to the first question is organizational unit. this is because in this scenario that we have before us, cost is a deciding factor. a unit as this can adapt to changes, it is flexible and also not very complex

2.

answer to question 2 is PDC emulator. this emulator can perform the function synchronization of time across every domain controller that is in the domain. other of its functions are, authentication and changing of passwords.

3.

the answer to the 3rd question is child domain. It is a factor in this scenario because it works well in a situation where there is an issue of slow network connection.

Which describes the outlining method of taking notes?

It is easy to use in fast-paced lectures to record information.
It is the least common note-taking method.
It includes levels and sublevels of information.
It uses columns and rows to organize information.

Answers

Answer:

It includes levels and sublevels of information

Explanation:

The Outlining method of taking notes helps the writer to organize his ideas into levels and sublevels of information which gives the piece of writing an added structure.

This can be achieved by the use of the Arabic numbering system, Roman numerals or use of bullets.

Answer:

C : It includes levels and sublevels of information

Explanation:

Behaving in an acceptable manner within a workplace environment is referred to as having
restraint
workplace etiquette
patience
experience

Answers

Answer:

Workplace Etiquette

Explanation:

Hope dis helps

Answer:

B) workplace etiquette

Explanation:

A program is written to compute the sum of the integers from 1 to 10. The programmer, well trained in reusability and maintainability, writes the program so that it computes the sum of the numbers from k to n. However, a team of security specialists scrutinizes the code. The team certifies that this program properly sets k to 1 and n to 10; therefore, the program is certified as being properly restricted in that it always operates on precisely the range 1 to 10.

Required:
List different ways that this program can be sabotaged so that during execution it computes a different sum, such as 3 to 20.

Answers

Answer:

See explanation

Explanation:

An instance of such program written in python is

isum = 0

for i in range(1,11):

isum = isum + i

print(sum)

One of the ways the program can give a wrong result is when someone alters the program source program before it's complied and executed.

Take for instance.

Changing

isum = 0 to isum = 4

will alter the result by additional 4

Another way is if an outside program or process alters the program execution.

14. Convert 11110111 from binary to denary
(1 Point)

Answers

converting 11110111 from binary to denary = 247

Answer:

247

Explanation:

Which of the following is a post-secondary school?
A.
Community college
B.
Vocational school
C.
Four-year college
D.
All of the above

Answers

Answer:

D

Explanation:

Answer:

C.

Four-year college

Explanation:

What is the force produced by a 100 kg object that accelerates at 5 m/s2?

Answers

Answer:

500N

Explanation:

force=mass*acceleration

f=m*a

f=100kg*5m/s^2

f=500kgm/s^2 or 500N

hope helps you

What is one reason to create a study check list​

Answers

To make sure you studied everything you need to know.

C++
12.18 Lab - Structs
In this lab, you will familiarize yourself with structs through a small exercise. We will be mixing the RGB values of colors together to make a new one.
RGB stands for red, green and blue. Each element describes the intensity value ranging from 0 - 255. For example: black color will have RGB values (0, 0, 0) while white will have (255, 255, 255).
Create an array of structs color. The struct contains three integers named red, green and blue. This corresponds to the RGB values of a color. For each array element, ask the user to enter the intensity value of red, green and blue. The value should be between 0 and 255 (inclusive).
*********The user can enter at most 10 colors. ********. see below for inputs
Additionally, compute the average of each of the red, green and blue components. For code modularity, implement a function that returns the average of each rgb component in your dynamic array. The function (called average) should take in a struct array, the rgb type for which you want to compute the average (as a string - red, blue or green) and its length. Print out the final result in the form (r, g, b), where r, g, b corresponds to each averaged value.
Can you guess what color you mixed? (Note: Your program does not need to print the final color mixed)
TEST #1
Input ------->>> 0 0 2 2 4 2
Expected output ----->>>> (1, 2, 2)
TEST #2
Input ------>>> 245 220 5 43 56 21 234 56 43
Expected output ----->>>> (174, 110, 23)
TEST #3
Input ------->>> 225 221 2 43 56 21 224 56 43 120 110 24 25 25 27
Expected output ----->>>> (127, 93, 23)
TEST #4
Input -------->>> 245 22 34
Expected output ----->>>> (245, 22, 34)

Answers

In order to input values choose between 0 up till 255 (integers)

Output

Number of colors to be analized:  2                                                                                                    

Write the amounts of RGB:  1:                                                                                                          

Red: 10                                                                                                                                

Green: 20                                                                                                                              

Blue: 100                                                                                                                              

                                                                                                                                     

Write the amounts of RGB:  2:                                                                                                          

Red: 30                                                                                                                                

Green: 20                                                                                                                              

Blue: 19                                                                                                                              

                                                                                                                                     

The colors average: (20, 20, 59)                                                                                                      

                                                                                                                                     

                                                                                                                                     

...Program finished with exit code 0                                                                                                  

Press ENTER to exit console.    

Code

#include <iostream>

using namespace std;

//declaration of variables

typedef struct Color {

   int b,r,g; //integers values which define a digital color

} Color;

//function of average

int average(Color *colors, int size, char type) {

   int s = 0;

   for(int i=0; i<size; i++) {

       if(type=='b') {

           s += colors[i].b;

       }        

       if(type=='g') {

           s += colors[i].g;

       }

       if(type=='r') {

           s += colors[i].r;

       }

   }

   return s/size;

}

int main() {

   int n;

   cout << "Number of colors to be analized:  ";

   cin >> n;

   Color *colors = new Color[n];

   for(int i=0; i<n; i++) {

       cout << "Write the amounts of RGB:  " << (i+1) << ":\n";

       cout << "Red: ";

       cin >> colors[i].r;

       cout << "Green: ";

       cin >> colors[i].g;

       cout << "Blue: ";

       cin >> colors[i].b;

       cout << endl;

   }

   cout << "The colors average: ";

   cout << "(" << average(colors, n, 'r') << ", " << average(colors, n, 'g');

   cout << ", " << average(colors, n, 'b') << ")\n";  

}

How do the different layers of e protocol hierarchy interact with each other? Why do we need to have two different layers that work on error detection and correction?

Answers

I need free points please

HELP!!
Why is email etiquette important? (1 point)

Email is rarely used to communicate via technology.

With more and more written communication through technology, it is important to sound competent and qualified and for your meaning to be clear.

Not many classes are taken online.

Even though companies and employers use a lot of email communication, they don't really care if you are clear with your communication

Answers

Answer:

B

Explanation:

An example of an access control is a: Multiple Choice Check digit. Password. Test facility. Read only memory.

Answers

Answer:

B. Password

Explanation:

An access control can be defined as a security technique use for determining whether an individual has the minimum requirements or credentials to access or view resources on a computer by ensuring that they are who they claim to be.

Simply stated, access control is the process of verifying the identity of an individual or electronic device. Authentication work based on the principle (framework) of matching an incoming request from a user or electronic device to a set of uniquely defined credentials.

Basically, authentication is like an access control, ensures a user is truly who he or she claims to be, as well as confirm that an electronic device is valid through the process of verification

An example of an access control is a password because it is typically a basic and fundamental front-line defense mechanism against an unauthorized use of data or cyber attacks from hackers.

Which holds all of the essential memory that tells your computer how to be
a computer (on the motherboard)? *
O Primary memory
Secondary memory

Answers

The answer is: B
Hope that helps have a nice day purr:)

How do the following technologies help you on your quest to become a digital citizen

Answers

Answer:

kiosks

Explanation:

It is generally believed that a digital citizen refers to a person who can skillfully utilize information technology such as accessing the internet using computers, or via tablets and mobile phones, etc.

Kiosks (digital kiosks) are often used to market brands and products to consumers instead of having in-person interaction. Interestingly, since almost everyone today goes shopping, consumers who may have held back from using digital services are now introduced to a new way of shopping, thus they become digital citizens sooner or later.

Keisha has a worksheet with a range of cells using the following columns: Name, Score, Group, Study Group, and Date. Keisha needs to sort the worksheet on the Date field. Which option should she use to most efficiently complete this task?

A: Use the Cut and Paste option to reorganize the data to fit that order.
B: Use the Filter function to organize the data based on the date.
C: Use the Order function to organize the data based on the date.
D: Use the Sort function to organize the data based on date order.

Answers

Answer:

The answer is

d. Use the Sort function to organize the data based on date order.

Explanation:

Most accurate one.

The option that she should use to most efficiently complete this task is to use the Sort function to organize the data based on date order. The correct option is D.

What is a worksheet?

It is "a piece of paper used to record work schedules, working hours, special instructions, etc. a sheet of paper used to jot down problems, ideas, or the like in draft form." A worksheet used in education could have questions for pupils and spaces for them to record their responses.

A single spreadsheet called an Excel Worksheet is made up of cells arranged in rows and columns. A worksheet always starts in row 1 and column A. A formula, text, or number can be entered into each cell. Additionally, a cell can point to a different cell on the same worksheet, in the same workbook, or in a different workbook.

Therefore, the correct option is D. Use the Sort function to organize the data based on date order.

To learn more about the worksheet, refer to the link:

https://brainly.com/question/1024247

#SPJ6

_____ is a set of processes many companies use to evaluate and improve their overall operations on an ongoing basis. Usability testing Continuous Improvement Analytics System implementation

Answers

Answer:

Continuous Improvement

Explanation:

Continuous Improvement is a set of processes many companies use to evaluate and improve their overall operations on an ongoing basis. Usability testing Continuous Improvement Analytics System implementation.

What is Continuous Improvement?

W. Edwards Deming used the phrase "continuous improvement" to refer to general processes of improvement and to embrace "discontinuous" improvements, or many diverse ways addressing various topics.

A subset of continuous improvement, with a more narrow focus on linear, incremental change inside an already-existing process, is continuous improvement.

Some practitioners also believe that statistical process control techniques are more closely related to continuous improvement. Constant improvement, often known as continuous improvement, is the continued enhancement of goods, services, or procedures through both small-scale and significant advancements.

Therefore, Continuous Improvement is a set of processes many companies use to evaluate and improve their overall operations on an ongoing basis. Usability testing Continuous Improvement Analytics System implementation.

To learn more about  Continuous Improvement, refer to the link:

https://brainly.com/question/15443538?

#SPJ3

what are the steps to troubleshoot a frozen computer ​

Answers

You could hold the power button down 5-10 seconds.

What is the difference in between data science and data analytics?​

Answers

Answer:

Data analytics focuses more on viewing the historical data in context while data sciene focuses more on machine.

Explanation:

Data analytics is more specific and concentrated than data science.

What is the use of the name box
in excel?​

Answers

The Name Box has several functions. It displays the address of the active cell. It displays the name of the cell, range or object selected if this has been named. It can be used to name a cell, range or object like a chart.

Implement a class Balloon that models a spherical balloon that is being filled with air. The constructor constructs an empty balloon. Supply these methods:

void addAir(double amount) adds the given amount of air.
double getVolume() gets the current volume.
double getSurfaceArea() gets the current surface area.
double getRadius() gets the current radius.

Supply a BalloonTester class that constructs a balloon, adds 100cm^3 of air, tests the three accessor methods, adds another 100cm3 of air, and tests the accessor methods again.

Answers

Answer:

Here is the Balloon class:

public class Balloon {  //class name

private double volume;  //private member variable of type double of class Balloon to store the volume

 

public Balloon()  {  //constructor of Balloon

 volume = 0;  }  //constructs an empty balloon by setting value of volume to 0 initially

 

void addAir(double amount)  {  //method addAir that takes double type variable amount as parameter and adds given amount of air

 volume = volume + amount;  }  //adds amount to volume

 

double getVolume()  {  //accessor method to get volume

 return volume;  }  //returns the current volume

 

double getSurfaceArea()  {  //accessor method to get current surface area

 return volume * 3 / this.getRadius();  }  //computes and returns the surface area

 

double getRadius()  {  //accessor method to get the current radius

 return Math.pow(volume / ((4 * Math.PI) / 3), 1.0/3);   }  } //formula to compute the radius

Explanation:

Here is the BalloonTester class

public class BalloonTester {  //class name

  public static void main(String[] args)    { //start of main method

      Balloon balloon = new Balloon();  //creates an object of Balloon class

      balloon.addAir(100);  //calls addAir method using object balloon and passes value of 100 to it

      System.out.println("Volume "+balloon.getVolume());  //displays the value of volume by getting value of volume by calling getVolume method using the balloon object

      System.out.println("Surface area "+balloon.getSurfaceArea());  //displays the surface area by calling getSurfaceArea method using the balloon object

             System.out.println("Radius "+balloon.getRadius());   //displays the value of radius by calling getRadius method using the balloon object

     balloon.addAir(100);  //adds another 100 cm3 of air using addAir method

       System.out.println("Volume "+balloon.getVolume());  //displays the value of volume by getting value of volume by calling getVolume method using the balloon object

      System.out.println("Surface area "+balloon.getSurfaceArea());  //displays the surface area by calling getSurfaceArea method using the balloon object

             System.out.println("Radius "+balloon.getRadius());    }  }  //displays the value of radius by calling getRadius method using the balloon object

//The screenshot of the output is attached.

Create a function min_mid_max which takes a list as its formal parameter and returns a new list with the following characteristics: element 0 contains the minimum value • element 1 contains the middle value (not the median -- which would require an average if the list had an even number of elements). If the list is even (e.g. [1,2,3,4]) the 'middle' value will be the right value of the two possible choices (e.g. 3 rather than 2). • element 2 contains the maximum value Notes: • You can only use Python syntax shown so far (even if you know more) • You cannot use any math library (we have yet to see this) • You should use the function sorted. Remember the function sorted does not change its input, it returns a new list. • You should only need to call sorted one time. print(sorted(3,2,1])) • You can use the function int (another built in function) to help determine the index of the middle value. This function takes a floating point (or any kind of number) and converts it into an integer (e.g.print(int(4.32)). This will allow you to treat lists with an even number of elements the same as a list with a odd number of elements. • If min_mid_max is called with an empty list, return an empty list. • If min_mid_max is called with 1 item that item is the min, mid, and the max • If min_mid_max is called with 2 items, the mid and the max should be the same • No need to worry about the incoming list being the value None

Answers

Answer:

Follows are the code to this question:

def min_mid_max(myList):#defining a method min_mid_max that accept a list in parameter  

   if len(myList)==0:#defining if block that check list length equal to 0

       return []#return empty list

   s = sorted(myList)#defining variable s that uses the sorted method to sort the list

   m = int(len(myList)/2)#defining mid variable that hold list mid value

   return [s[0], s[m], s[-1]]#return list values

print(min_mid_max([1,2,3,4]))#use print function to call method  

print(min_mid_max([]))#use print function to call method

print(min_mid_max([1, 2]))#use print function to call method

print(min_mid_max([1]))#use print function to call method

Output:

Please find the attached file.

Explanation:

In the given code, a method "min_mid_max" is defined, which accepts a list "myList" in parameter, inside the method if block is used, that check length of the list.

If it is equal to 0, it will return an empty list, otherwise, a variable "s" is declared, that use the sorted method to sort the list, and in the "m" variable, it holds the mid number of list and returns its value.

In the print method, we call the above method by passing a list in its parameter.

As a twist on the Hello World exercise, you are going to be the end user of the Hello class. This class is designed to greet the user in a variety of world languages. For this task, complete the following:
Use the Scanner class to ask the user for their name.
Create a Hello object by passing the name to the constructor.
Call at least 3 methods from the Hello class to print the greeting in 3 different languages.
Remember to write your code in the HelloTester class, but make sure you take a look at the Hello class so that you know the names of the methods you need to use.

Answers

Answer:

Here is the Hello class:

public class Hello { //class name

     private String name; //to store the name

     

      public Hello (String names) //parameterized constructor

      { name = names;  }  

     

      public void English() { //method to greet user in english

           System.out.print("Hello "); //displays Hello on output screen

           System.out.print(name); //displays user name

           System.out.println("!");  }  //displays exclamation mark symbol

           

           public void Spanish(){ //method to greet user in spanish

               System.out.print("Hola "); //displays Hello on output screen

               System.out.print(name); //displays user name

               System.out.println("!"); } //displays exclamation mark symbol

           

         public void French() { //method to greet user in french

              System.out.print("Bonjour "); //displays Hello on output screen

              System.out.print(name);  //displays user name

              System.out.println("!");  } } //displays exclamation mark symbol

           

Explanation:

Here is the HelloTester class:

import java.util.Scanner; //to accept input from user

public class HelloTester { //class name

 public static void main (String[]args)  { //start of main method

String name; //to store the name of user

Scanner input = new Scanner(System.in);  //creates Scanner class object

System.out.println("Enter name?" );  //prompts user to enter name

 name = input.nextLine(); //scans and reads the name from user

 Hello hello = new Hello(name); //creates Hello class object and calls constructor by passing name

hello.English(); //calls English method using object hello to greet in english

hello.Spanish(); //calls Spanish method using object hello to greet in spanish

hello.French(); } }  //calls French method using object hello to greet in french

The output of the program is:

Enter name?                                                                                                                    user                                                                                                                           Hello user!                                                                                                                    Hola user!                                                                                                                    Bonjour user!  

The screenshot of the program along with its output is attached.

Java Program:

Java is one of the most popular programming languages that is being widely used in the IT industry. It is simple, robust, and helps us to reuse the code.

The required program is,

\\import java.util.Scanner;

class Hello

{

private String name;

public Hello(String yourName)

{

name=yourName;

}

public void english()

{

System.out.print("Hello ");

System.out.print(name);

System.out.println("!");

}

public void spanish()

{

System.out.print("Holla ");

System.out.print(name);

System.out.println("!");

}

public void french()

{

System.out.print("Bonjour ");

System.out.print(name);

System.out.println("!");

}

public void german()

{

System.out.print("Hallo ");

System.out.print(name);

System.out.println("!");

}

public void russian()

{

System.out.print("Privet ");

System.out.print(name);

System.out.println("!");

}

public void chinese()

{

System.out.print("Ni hao ");

System.out.print(name);

System.out.println("!");

}

}

public class HelloTester

{

public static void main(String[] args)

{

Scanner input=new Scanner(System.in);

String name;

//Accepting the name

System.out.print("\nEnter your name: ");

name=input.next();

/creating an object of Hello class

Hello hello=new Hello(name);

System.out.println("\nGreeting in English: ");

System.out.println("-------------------------------------");

hello.english();

//calling the methods to greet in different languages

System.out.println("\nGreeting in Spanish: ");

System.out.println("-------------------------------------");

hello.spanish();

System.out.println("\nGreeting in French: ");

System.out.println("-------------------------------------");

hello.french();

System.out.println("\nGreeting in German: ");

System.out.println("-------------------------------------");

hello.german();

System.out.println("\nGreeting in Russian: ");

System.out.println("-------------------------------------");

hello.russian();

System.out.println("\nGreeting in Chinese: ");

System.out.println("-------------------------------------");

hello.chinese();

System.out.print("\n");

}

}

\\

So, the output is attached below:

Learn more about the topic Java Program:

https://brainly.com/question/19271625

How to get passed administrattor on macbook air to get games and stuff.

Answers

Answer:

You need to use the name and password of the main owner of the computer/the account you made when you first got it. Then, you should be able to download apps and use it if you have your apple ID set up.

Explanation:

#include
using namespace std;
const int SIZE = 4;
bool isSorted(const int arr[], int size);
bool isNonDecreasing(const int arr[], int size);
bool isNonIncreasing(const int arr[], int size);
void printArr(const int arr[], int size);
int main()
{
int test1[] = { 4, 7, 10, 69 };
int test2[] = { 10, 9, 7, 3 };
int test3[] = { 19, 12, 23, 7 };
int test4[] = { 5, 5, 5, 5 };
if (!isSorted(test1, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr(test1, SIZE);
if (!isSorted(test2, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr(test2, SIZE);
if (!isSorted(test3, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr(test3, SIZE);
if (!isSorted(test4, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr(test4, SIZE);
return 0;
}
bool isSorted(const int arr[], int size)
{
// TODO: This function returns true if the array is sorted. It could be
// sorted in either non-increasing (descending) or non-decreasing (ascending)
// order. If the array is not sorted, this function returns false.
// HINT: Notice that the functions isNonDecreasing and isNonIncreasing are not
// called from main. Call the isNonDecreasing and isNonIncreasing functions here.
}
bool isNonDecreasing(const int arr[], int size)
{
// TODO: Loop through the array to check whether it is sorted in
// non-decreasing (in other words, ascending) order. If the array
// is non-decreasing, return true. Otherwise, return false.
}
bool isNonIncreasing(const int arr[], int size)
{
// TODO: Loop through the array to check whether it is sorted in
// non-increasing (in other words, descending) order. If the array
// is non-increasing, return true. Otherwise, return false.
}
void printArr(const int arr[], int size)
{
for (int i = 0; i < size; i++)
cout << arr[i] << " ";
cout << endl << endl;
}

Answers

Output

SORTED                                                                                                                                

4 7 10 69                                                                                                                              

                                                                                                                                     

SORTED                                                                                                                                

10 9 7 3                                                                                                                              

                                                                                                                                     

NOT SORTED                                                                                                                            

19 12 23 7                                                                                                                            

                                                                                                                                     

SORTED                                                                                                                                

5 5 5 5

Code

//The added part is in the bottom

#include <iostream>

using namespace std;

const int SIZE = 4;

bool isSorted (const int arr[], int size);

bool isNonDecreasing (const int arr[], int size);

bool isNonIncreasing (const int arr[], int size);

void printArr (const int arr[], int size);

int

main ()

{

 int test1[] = { 4, 7, 10, 69 };

 int test2[] = { 10, 9, 7, 3 };

 int test3[] = { 19, 12, 23, 7 };

 int test4[] = { 5, 5, 5, 5 };

 if (!isSorted (test1, SIZE))

   cout << "NOT ";

 cout << "SORTED" << endl;

 printArr (test1, SIZE);

 if (!isSorted (test2, SIZE))

   cout << "NOT ";

 cout << "SORTED" << endl;

 printArr (test2, SIZE);

 if (!isSorted (test3, SIZE))

   cout << "NOT ";

 cout << "SORTED" << endl;

 printArr (test3, SIZE);

 if (!isSorted (test4, SIZE))

   cout << "NOT ";

 cout << "SORTED" << endl;

 printArr (test4, SIZE);

 return 0;

}

bool

isSorted (const int arr[], int size)

{

//Added part

 if (isNonDecreasing (arr, size) || isNonIncreasing (arr, size))

   {

     return true;

   }

 else

   {

     return false;

   }

}

bool

isNonDecreasing (const int arr[], int size)

{

 for (int i = 0; i < (size - 1); i++)

   {

     if (arr[i] > arr[i + 1]) //It compares the n value with the n-1 value and output

{

  return false;

  break;

}

   }

 return true;

}

bool

isNonIncreasing (const int arr[], int size)

{

 for (int i = 0; i < (size - 1); i++)

   {

     if (arr[i] < arr[i + 1]) //It compares the n value with the n-1 value and output reautilization of previous function by replacing only “<”

{

  return false;

  break;

}

   }

 return true;

}

void

printArr (const int arr[], int size)

{

 for (int i = 0; i < size; i++)

   cout << arr[i] << " ";

 cout << endl << endl;

}

Write a program named palindromefinder.py which takes two files as arguments. The first file is the input file which contains one word per line and the second file is the output file. The output file is created by finding and outputting all the palindromes in the input file. A palindrome is a sequence of characters which reads the same backwards and forwards. For example, the word 'racecar' is a palindrome because if you read it from left to right or right to left the word is the same. Let us further limit our definition of a palindrome to a sequence of characters greater than length 1. A sample input file is provided named words_shuffled. The file contains 235,885 words. You may want to create smaller sample input files before attempting to tackle the 235,885 word sample file. Your program should not take longer than 5 seconds to calculate the output
In Python 3,
MY CODE: palindromefinder.py
import sys
def is_Palindrome(s):
if len(s) > 1 and s == s[::-1]:
return true
else:
return false
def main():
if len(sys.argv) < 2:
print('Not enough arguments. Please provide a file')
exit(1)
file_name = sys.argv[1]
list_of_palindrome = []
with open(file_name, 'r') as file_handle:
for line in file_handle:
lowercase_string = string.lower()
if is_Palindrome(lowercase_string):
list_of_palindrome.append(string)
else:
print(list_of_palindrome)
If you can adjust my code to get program running that would be ideal, but if you need to start from scratch that is fine.

Answers

Open your python-3 console and import the following .py file

#necessary to import file

import sys

#define function

def palindrome(s):

   return len(s) > 1 and s == s[::-1]

def main():

   if len(sys.argv) < 3:

       print('Problem reading the file')

       exit(1)

   file_input = sys.argv[1]

   file_output = sys.argv[2]

   try:

       with open(file_input, 'r') as file open(file_output, 'w') as w:

           for raw in file:

               raw = raw.strip()

               #call function

               if palindrome(raw.lower()):

                   w.write(raw + "\n")

   except IOError:

       print("error with ", file_input)

if __name__ == '__main__':

   main()

Which step is first in changing the proofing language of an entire document?

A: Click the Language button on the Status bar.
B: Select the whole document by pressing Ctrl+A.
C: Under the Review tab on the ribbon in the Language group, click the Language button and select Set Proofing Language.
D: Run a Spelling and Grammar check on your document before changing the language.

Answers

Answer:

b) Select the whole document by pressing Ctrl+a.

Explanation:

The correct answer is b. If you do not select the whole document or parts of the document you wish to change the proofing language for, it will only be applied to the word your cursor is positioned in.

ig:ixv.mona :)

Answer:

B) Select the whole document by pressing Ctrl+A.

Select the correct statement(s) regarding digital baseband modulation.
a. similar to analog signal modulation, logical ""1s"" and ""0s"" are represented by carrier wave amplitudes, frequencies, or phase angles
b. QAM is a modulation technique in which both carrier amplitude and phase angle changes represent logical data
c. with QAM, two carrier waves of the same frequency, but separated by π/2 radians, are used to represent logical data
d. all statements are correct

Answers

Answer:

The answer is "Option d".

Explanation:

The electronic firmware synchronization was its method where even the series of bytes is amplified even before the transmission process into to the sound waves and, thus, and in conceptual "1s" and "0s" represented by large font, wavelengths, or switching frequency.

QAM utilizes both magnitudes of the transporter and adjustments in the phase shift. Rational data is represented by [tex]\frac{\pi}{2}[/tex] cartesian coordinates for both the carries waves of the same wavelengths and represents the result in total.
Other Questions
Can someone explain to me adding and subtracting mixed numbers Find the y interceptx-3y = 12Help plz Question 5(Multiple Choice Worth 3 points) A major U.S. trade partner has just gone to war with its neighbor. Its leader asks the United States for help. Which of the following statements is true about how the president will react?A. ) The president will make a decision based only on his or her own feelings about the war.B. ) The president will stop all trade right away with that country until the war is over.C. ) The president will not respond to the request since it is not an issue for the United States.D. ) The president will consider the opinions of the people, representatives, and diplomats. What are sex chromosomes? What is the sex chromosome combination for human males and females? The treaty which was signed by Spain and Portugal dividing the world into spheres of influence.Mayflower CompactHouse of BurgassesThe Great TreatyTreaty of Tordesillas If the length is 4 and the width is 6, whats the height? What is the distance between -3 and 12? Please help! I am being timed and need this answered ASAP!! Walter is making a 300-mile trip from Wichita Falls, Texas to Austin, Texas. After the first 120 miles, he continues driving at 65 mph.If the equation 120+65x=300 is used to describe this situation, what does the " x " represent? In the fluid mosaic model, where would you most likely find the transport proteins?Attached to the outer portion of the phospholipid bilayerEmbedded within the hydrophobic and hydrophilic regions of the bilayerFlipping, alternating between the hydrophobic and hydrophilic regions of the bilayerRoaming within the phospholipid bilayerthanks so much If -2x -4 = -4x + 3, then does x = 3 Select the dependent clause.Almost every English and British monarch since 1308 has been crowned on theCoronation Chair, which can be found in Westminster Abbey.Submit I need this one fast!!!!Nitrous oxide is the chemical name for "laughing gas." What are the names and the number of atoms in a molecule ofnitrous oxide, N2O?1.one nitrogen atom and two oxygen atoms2.two nitrogen atoms and one oxygen atom3. one nitrogen atom and one oxygen atom4. two nitrogen atoms and two oxygen atoms Which of the following actions would directly help strengthen your social health?A. Sitting next to new students at the lunch table.B. Working out every morning.C. Getting enough sleepD. Meditating at the end of a stressful day. Identify each sentence as part of the beginning, middle, or end of a story.It was a hot summer day and I had plans to meet my friends at the community pool.After Mr. Lee and I had spent the day together and become great friends, I learned that sometimes loneliness lookslike grouchiness.Despite my whining, my mom insisted that I push Mr. Lee in his wheelchair to the air-conditioned community center.My mom was worried about how the heat might affect Mr. Lee, our grouchy older neighbor. please help my with my science work Greek Thinkers, Artists, Writers, and Leaders Discussion In this discussion, you will rank the three individuals from the lesson who you feel most contributed to modern Western society. You will cite two pieces of evidence from the lesson per individual to explain and support your rankings. A preparation that contains dead or weakenedmicrobes and is given to produce immunity againstan infectious disease is a A student conducting a calorimetry investigation determines a negative H. What does the negative value indicate about the reaction?A. The reaction synthesized a single product.B. The reaction was exothermic.C. The reaction absorbed energy.D. The reaction involved decomposition. What is the slope of the line?