Questions
Create an interface MessageEncoder that has a single abstract method encode(plainText) where the plainText is the...

Create an interface MessageEncoder that has a single abstract method encode(plainText) where the plainText is the message to be encoded. The method will return the encoded version of the message. Then create a class SubstitutionCipher that implements this interface. The constructor should have on parameter called shift. Define the method encode so that each letter is shifted by the value in shift. For example if shift is 3 a will be replaced by d, b will be replaced by e. Create a private method that shifts one character to help with this. Write a demo program that will take a message from a user , a shift value, and then return the encoded message.

use java

In: Computer Science

Explain the hematological implications of under experiment( why did they select the study, abstract,what is the...

Explain the hematological implications of under experiment( why did they select the study, abstract,what is the aim, what are things they tested, what do they want to say conclusion etc) long report | please dont answer by hand writting!

Majority of clinical decisions are said to be based on laboratory test results. Therefore, discrepant and unreliable laboratory results may cause serious consequences for the health of individuals and the society. Fifty blood samples were collected from apparently healthy subjects and sent to 3 different participating hospital laboratories designated as A, B and C within northern Nigeria over a ten-week period. The laboratories, all using standard hematology techniques, undertook Hb estimation, total WBC counts and PCV measurements in an inter-laboratory quality control assessment. The study revealed that laboratories B and C obtained significantly lower mean values of 13.20 g/dl and 13.80 g/dl for hemoglobin respectively compared to 14.60 g/dl from the originating laboratory (p<0.01). Meanwhile, the mean WBC values for laboratories B and C appeared significantly higher than the accurate mean. Two laboratories (B and C) also obtained mean values of PCV slightly different from the accurate one while laboratory A had similar mean PCV value to the accurate one. Generally, higher variance ratios between laboratories than between samples (P<0.01) was observed in hemoglobin estimation and WBC count, while PCV showed a high variance ratio between samples than laboratories. However, the reproducibility of test results of participating laboratories was good.

In: Biology

Title: British Business Opportunities in India 1 Abstract: This video explores the opportunities in India for...

Title: British Business Opportunities in India 1

Abstract: This video explores the opportunities in India for British firms and discusses the advantages and disadvantages of doing business in India.

British Business Opportunities in India - 5:03

Key Concepts: foreign market entry, exporting, culture, international strategy, globalization, international marketing

Notes: Business is booming for one British frozen food maker. The company, which makes samosas and pork pies among other things, sells its products in the United Kingdom and across Europe, and has just started exporting to India as well. Ironically, the British based company is rapidly filling orders from India for samosas which are a type of little pie commonly eaten in India. According to the managing director of the company, the chance to sell Indian food to India came up quite by chance. The firm was approached by a group seeking to meet demand for food exports from Britain.

It may seem surprising that there is demand for British food products in India, however, as the managing director points out, many Indians today travel abroad either for work or to continue their education, and they have the opportunity to sample new things. Once they get home, they want to continue to consume those products. The managing director believes that the opportunities to do business right in India are huge – and are available to firms across a wide spectrum of industries. He claims that products made in England have a particular advantage in India because British-made products are perceived by Indians as being very high quality. Therefore, products made in England command premium prices.

Entering the India market can be challenging though. The managing director of the food company notes that the bureaucracy can be overwhelming. He believes the best way to get around the red tape is to form a joint venture or other type of partnership with a local company. Because the locals know the market, they also know how to deal with bureaucracy.

Discussion Questions: In addition to the video and abstract provided, find current event topics to address the following questions. Questions may be answered as numbered. Points will be deducted for responses lacking external resources.

Comment on the irony of a British company exporting Indian food to India. How can the company still make a profit?

As the head of a British company exporting food products to India, what cultural issues do you need to be aware of? Is exporting food different from exporting other products like cars?

Products made in England command a premium price in India. Explain why this situation might exist. How are a nation’s historical ties reflected in a country’s culture?

The managing director of the food company in the video notes that the best way to do business in India is to partner with a local company. What does he mean?

In: Operations Management

Here I'm using "person" as an abstract superclass or parent class, and "Student" as a derived/child...

Here I'm using "person" as an abstract superclass or parent class, and "Student" as a derived/child class.

// File name: Person.h
// Person is the base, or parent for chapter11
#pragma once
#include <iostream>
#include <string>
using namespace std;
class Person {
private:
   string fName;
   string lName;
   int areaCode;
   int phone;
public:
   Person();
   Person(string, string);
   void setFirst(string);
   void setLast(string);
   void setPhoneNumber(int, int);
   string getFirstlast();
   string getLastFirst();
   string getPhoneNumber();
};
// Student is the child, or specialization, for class chapter11
#pragma once
#include "Person.h"
class Student : public Person {
private:
   int idNumber;
   string major;
   static int baseForID;
public:
   Student();
   Student(string, string);
   void setMajor(string);
   void printStudent();
};
// File name: Student.cpp
// Student is the child, or specialization, class for chapter11
#include "Student.h"
// initialize the static classs variable to 20200000
// The default constructor initializes all strings to "" (the empty string),
// and sets the id number for the student. The id number for a student is the
// value of the static class variable. Once assigned, the value of the static
// class variable must be incremented by 1
Student::Student()
{
  
}

// The parametrized constructor invokes the parent class' methods to assign
// values to first name and last name.The id number for a student is the
// value of the static class variable. Once assigned, the value of the static
// class variable must be incremented by 1
Student::Student(string, string)
{
}

// set the value of major to that of the parameter
void Student::setMajor(string)
{
}

// prints the student information in the following format
// ID# idnumber lastName, firstName major
void Student::printStudent()
{
}
// Person is the base, or parent, class for chapter11
#include "Student.h"
int main() {
   // create a new student object, student1, using the default constructor

   // assign the following values using the methods for the class
   // first name: Pedro last name: Picapiedra phone: 787-555-5555,
   // major: Computer Science

   // print the information for student1

   // create a new student object, student2, using the parametrized constructor
   // use the following values as arguments:
   // firt name: Pablo last name: Marmol

   // assign the following values using the methods for the class
   // phone: 787-787-8787,
   // major: Electrical Engineering

   // print the information for student2

   // create a new student object, student3, using the parametrized constructor
   // use the following values as arguments:
   // firt name: Senor last name: Rajuela

   // assign the following values using the methods for the class
   // phone: 787-755-5000,
   // major: Computer Engineering

   // print the information for student3

   system("pause");
   return 0;

// File name: Person.cpp
// Person is the base, or parent, class for chapter11
#include "Person.h"
// The default constructor initializes all strings to "" (the empty string),
// and all integers to 0
Person::Person()
{
}
// The parametrized constructor initializes all strings to the values in the parameters,
// and all integers to 0
Person::Person(string, string)
{
}
// Assigns the value of the parameter to fName; NO COUT's!
void Person::setFirst(string)
{
}
// Assigns the value of the parameter to lName; NO COUT's!
void Person::setLast(string)
{
}
// Assigns the values of the parameter to areaCode and phone; NO COUT's!
// must verifiy that the area code value has only 3 digits, and the
// phone number has only 7 digits
void Person::setPhoneNumber(int, int)
{
}
// returns a string in the format firstName lastName
string Person::getFirstlast()
{
   return string();
}
// returns a string in the format lastName, firstName
string Person::getLastFirst()
{
   return string();
}

// returns a string with the phone number
// the phone number should be in the following format
// (area code) xxx-xxxx
string Person::getPhoneNumber()
{
   return string();
}
}

In: Computer Science

Drag a body from below then Write abstract for the body, summary and conclusion. Topic: Application...

Drag a body from below then Write abstract for the body, summary and conclusion.

Topic: Application of Quantitative techniques in business and economics.

Quantitative Methods in Management offer a systematic approach for the analysis of phenomena in business economics and economics in general. In the modern world of increasing development in information technology, the amount of numerical data has increased enormously, and at the same time the acquisition of knowledge has become easier. Quantitative methods provide techniques to domesticate this growing accumulation of data as support for economic decision-making. It is worth adding that, generally, quantitative analysis relies extensively on viewing phenomena through models, and some of the largely used models are: The Linear Programming model, Transportation and Assignment problems models, and Network models. The application targets for these methods cover many fields of business, such as economics, finance, risk management, quality management and logistics.

You are required to develop a subject about the application of quantitative methods in one of the mentioned fields, and describe the method of applying models in it.

In: Economics

Here is a C++ class definition for an abstract data type LinkedList of string objects. Implement...

Here is a C++ class definition for an abstract data type LinkedList of string objects. Implement each member function in the class below. Some of the functions we may have already done in the lecture, that's fine, try to do those first without looking at your notes. You may add whatever private data members or private member functions you want to this class.

#include

#include

typedef std::string ItemType;

struct Node {

ItemType value;

Node *next;

};

class LinkedList {

private:

Node *head;

public:

//default constructor

LinkedList() : head(nullptr) { }

//copy constructor

LinkedList (const LinkedList& rhs);

//Destroys all the dynamically allocated memory in the list.

~LinkedList ();

// assignment operator

const LinkedList& operator= (const LinkedList& rhs);

// Inserts val at the rear of the list

void insertToRear (const ItemType &val);

// Prints the LinkedList

void printList () const;

// Sets item to the value at position i in this LinkedList and return true, returns false if there is no element I

bool get (int i, ItemType& item) const;

// Reverses the LinkedList

void reverseList ();

//Prints the LinkedList in reverse order

void PrintReverse() const;

//Appends the values of other onto the end of this LinkedList.

void append (const LinkedList &other);

//Exchange the contents of this LinkedList with the other one.

void swap (LinkedList &other);

//Returns the number of items in the Linked List.

int size() const;

};

When we don't want a function to change a parameter representing a value of the type stored in the LinkedList, we pass that parameter by constant reference. Passing it by value would have been perfectly fine for this problem, but we chose the const reference alternative because that will be more suitable after we make some generalizations in a later problem.

The get function enables a client to iterate over all elements of a LinkedList. In other words, this code fragment

LinkedList 1s;

1s.insertToRear("Carl");

1s.insertToRear("Hariette");

1s.insertToRear("Eddie");

1s.insertToRear("Laura");

1s.insertToRear("Judy");

1s.insertToRear("Steve");

for (int k = 0; k < 1s.size (); k++)

{

string x;

1s.get(k, x);

court << x << endl;

}

must write

Carl

Hariette

Eddie

Laura

Judy

Steve

The printList and printReverse functions enables a client to print elements of a LinkedList. In other words, this code fragment:

LinkedList 1s;

1s.insertToRear("Cory");

1s.insertToRear("Topanga");

1s.insertToRear("Shawn");

1s.insertToRear("Eric");

1s. printList ();

1s.printReverse ();

must write

Cory Topanga Shawn Eric

Eric Shawn Topanga Cory

You should have one space between after each item printed with an additional newline after the last item. Here is an example of the append function:

LinkedList e1;

e1.insertToRear("devoe");

e1.insertToRear("biv");

e1.insertToRear("bell");

LinkedList e2;

e2.insertToRear("Big Boi");

e2.insertToRear("Andre");

e1.append(e2); // adds contents of e2 to the end of e1

string s;

assert(e1.size() == 5 && e1.get(3, s) && s == "Big Boi");

assert(e2.size() == 2 && e2.get(1, s) && s == "Andre");

Here is an example of the reverseList function:

LinkedList e1;

e1.insertToRear("Norm");

e1.insertToRear("Cliff");

e1.insertToRear("Carla");

e1.insertToRear("Sam");

e1.reverseList(); // reverses the contents of e1

string s;

assert(e1.size() == 4 && e1.get(0, s) && s == "Sam");

Here's an example of the swap function:

LinkedList e1;

e1.insertToRear("D");

e1.insertToRear("C");

e1.insertToRear("B");

e1.insertToRear("A");

LinkedList e2;

e2.insertToRear("Z");

e2.insertToRear("Y");

e2.insertToRear("X");

e1.swap(e2); // exchange contents of e1 and e2

string s;

assert(e1.size() == 3 && e1.get(0, s) && s == "Z");

assert(e2.size() == 4 && e2.get(2, s) && s == "B");

When comparing items, just use the == or != operators provided for the string type by the library. These do case-sensitive comparisons, and that's fine.

(MUST BE A singly linked list not doubly)

One zip file that contains your solution to thee problem. The zip file must contain only the files LinkedList.h, LinkedList.cpp, and main.cpp. The header file LinkedList.h will contain all the code from the top of this specification (includes, typedef, struct Node, class LinkedList) and proper guards, while the C++ file LinkedList.cpp will contain the LinkedList member functions you will write. If you don't finish everything you should return dummy values for your missing definitions. The main file main.cpp can have the main routine do whatever you want because we will rename it to something harmless, never call it, and append our own main routine to your file. Our main routine will thoroughly test your functions. You'll probably want your main routine to do the same. Your code must be such that if we insert it into a suitable test framework with a main routine and appropriate #include directives, it compiles. (In other words, it must have no missing semicolons, unbalanced parentheses, undeclared variables, etc.)

In: Computer Science

write a java program that implements the splay tree data structure for the dictionary abstract data...

write a java program that implements the splay tree data structure for the dictionary abstract data type.

Initially the program reads data from "in.dat", and establishes an ordinary binary search tree by inserting the data into the tree. The data file contains integers, one per line.

in.dat file contents:

3456
5678
1234
2369
7721
3354
1321
4946
3210
8765

Then the program starts an interactive mode. The commands are as follows.

S 1000 - splay the tree at 1000

F 2000 - search/find the node with key 2000

I 3000 - insert a node with key 3000

D 4000 - delete the node with key 4000

For each command,

1. Report appropriate message after the command is executed. Examples are:

Splay is done

Search is successful

Search is unsuccessful

The key is inserted into the tree

Duplicated keys

The key is deleted from the tree

The key is not in the tree

2. Display the new tree.

In: Computer Science

Turn the following into a structured informative abstract. Metalinguistic awareness contributes to effective writing at university....

Turn the following into a structured informative abstract.

Metalinguistic awareness contributes to effective writing at university. Writing is a meaning-making process where linguistic, cognitive, social and creative factors are at play. University students need to master the skills of academic writing not only for getting their degree but also for their future career. It is also significant for lecturers to know who our students are, how they think and how we can best assist them. This study examines first-year undergraduate Australian and international engineering students as writers of academic texts in a multicultural setting at the University of Adelaide. A questionnaire and interviews were used to collect data about students’ level of metalinguistic awareness, their attitudes toward, expectations for, assumptions about and motivation for writing. The preliminary results of the research show that students from different cultures initially have different concepts about the academic genres and handle writing with different learning and writing styles, but those with a more developed metalanguage are more confident and motivated. The conclusion can also be drawn that students’ level of motivation for academic writing positively correlates with their opinion about themselves as writers. Following an in-depth multi-dimensional analysis of preliminary research results, some recommendations for writing instruction will also be presented.

In: Operations Management

A deque (short for double-ended queue, but pronounced “deck”) is an abstract data type that supports...

A deque (short for double-ended queue, but pronounced “deck”) is an abstract data type that supports adding and removing at both the front and back. So, at a bare minimum, a deque has four operations: addFront(), removeFront(), addBack(), removeBack(). Suppose you have a deque D containing the numbers (1, 2, 3, 4, 5, 6, 7, 8), in this order. Suppose further that you have an initially empty queue Q. Give pseudo-code description of a method that uses only D and Q (and no other variables or objects) and results in D storing the elements (1, 2, 3, 5, 4, 6, 7, 8), in this order.

In: Computer Science

Objective: Using Java coding language, complete each "TO-DO" section for the following classes. Shape code (for...

Objective: Using Java coding language, complete each "TO-DO" section for the following classes.

Shape code (for reference, nothing to complete here):

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.io.RandomAccessFile;

public abstract class Shape extends Rectangle {
   public int id;
   public Color color;
   public int xSpeed, ySpeed;
  
   public Shape(int id, int x, int y, int width, int height, Color color, int xSpeed, int ySpeed) {
       super(x,y,width,height);
       this.id = id;
       this.color = color;
       this.xSpeed = xSpeed;
       this.ySpeed = ySpeed;
   }
  
   public abstract void move(int screenWidth, int screenHeight);
   public abstract void draw(Graphics g);
   public abstract void save(RandomAccessFile raf) throws Exception;
  
}

Ball code:

import java.awt.Color;
import java.awt.Graphics;
import java.io.RandomAccessFile;

public class Ball extends Shape {

   public Ball(int id, int x, int y, int size, Color color, int xSpeed, int ySpeed) {
       super(id, x, y, size, size, color, xSpeed, ySpeed);
   }

   @Override
   public void move(int screenWidth, int screenHeight) {
       x += xSpeed;
       y += ySpeed;
      
       if(x > screenWidth) x = -width;
       else if(x + width < 0) x = screenWidth;
      
       if(y > screenHeight) y = -height;
       else if(y + height < 0) y = screenHeight;      
   }

   @Override
   public void draw(Graphics g) {
       g.setColor(color);
       g.fillOval(x, y, width, height);
       g.setColor(Color.BLACK);
       g.drawOval(x, y, width, height);
   }

   // TO-DO:    Write the code that saves out the type of object (Ball)
   //           and all data about the box ("Ball", id, x, y, width, height, color,
   //           xSpeed, and ySpeed)
   @
Override
   public void save(RandomAccessFile raf) throws Exception {
       // Note, when saving color you will save it as an int: color.getRGB()
   }
}

Box code:

import java.awt.Color;
import java.awt.Graphics;
import java.io.RandomAccessFile;
// is-a
public class Box extends Shape {

   public Box(int id, int x, int y, int size, Color color, int xSpeed, int ySpeed) {
       super(id, x, y, size, size, color, xSpeed, ySpeed);
   }

   @Override
   public void move(int screenWidth, int screenHeight) {
       x += xSpeed;
       y += ySpeed;
      
       if(x > screenWidth) x = -width;
       else if(x + width < 0) x = screenWidth;
      
       if(y > screenHeight) y = -height;
       else if(y + height < 0) y = screenHeight;
                      
   }

   @Override
   public void draw(Graphics g) {
       g.setColor(color);
       g.fillRect(x, y, width, height);
       g.setColor(Color.BLACK);
       g.drawRect(x, y, width, height);
   }

   // TO-DO:    Write the code that saves out the type of object (Box)
   //           and all data about the box ("Box", id, x, y, width, height, color,
   //           xSpeed, and ySpeed)

   @Override
   public void save(RandomAccessFile raf) throws Exception {
       // Note, when saving color you will save it as an int: color.getRGB()
   }

}

In: Computer Science