Questions
Convert into pseudo-code for below code =============================================== class Main {    public static void main(String args[])...

Convert into pseudo-code for below code

===============================================

class Main
{
   public static void main(String args[])
   {
       Scanner s=new Scanner(System.in);
       ScoresSingleLL score=new ScoresSingleLL();
       while(true)                   // take continuous inputs from user till he enters -1
       {
           System.out.println("1--->Enter a number\n-1--->exit");
           System.out.print("Enter your choice:");
           int choice=s.nextInt();
           if(choice!=-1)
           {
               System.out.print("Enter the score:");
               int number=s.nextInt();
               System.out.print("Enter the name:");
               String name=s.next();
               GameEntry entry=new GameEntry(name,number);
               if(number!=-1)
               {
                   if(score.getNumberOfEntries()==10)           // if linkedlist has more than 10 nodes, remove min score and add new score
                   {
                       int minValue=score.getMinimumValue();   // function to get minValue
                       if(minValue<number)                       // if min score is greater than given score, then dont add new node
                       {
                           int minValueIndex=score.getMinimumValueIndex();   // function to get minValueIndex
                           score.remove(minValueIndex);           // remove minValueIndex node
                           score.add(entry);                       // add the new node
                       }
                   }
                   else
                   {
                       score.add(entry);                       // if linked list has less than 10 nodes, add the current node
                   }
               }
               score.printScore();                               // method to print entries in linked lists
               score.printHighestToLowest();
           }
           else
           {
               break;
           }
       }
   }
  
}

class ScoresSingleLL
{
   SingleLinkedList head=null;
   int noOfEntries=0;
   public void add(GameEntry e)
   {
       SingleLinkedList tempNode=new SingleLinkedList(e);
       if(head==null)           // if list is empty add new node as head
       {
           head=tempNode;
       }
       else
       {
           SingleLinkedList node=head;
           while(node.next!=null)       // else add new node at tail
           {
               node=node.next;
           }
           node.next=tempNode;
       }
       noOfEntries++;
   }
    public GameEntry remove(int minValueIndex)
    {
       SingleLinkedList node=head;
       if(minValueIndex==0)       // if value to be removed is head, remove head
       {
           head=head.next;
       }
       else
       {
           SingleLinkedList prevNode=head;       // else remove index 'i' element
           node=head.next;
           int index=1;
           while(index!=minValueIndex)  
           {
               index++;
               prevNode=node;
               node=node.next;
           }
           prevNode.next=node.next;
       }
       noOfEntries--;
       return node.node;
    }
    public int getMinimumValueIndex()
    {
        SingleLinkedList node=head;
        int minValue=Integer.MAX_VALUE;
        int index=0,i=0;
       while(node!=null)
       {
           if(node.node.score<minValue)
           {
               minValue=node.node.score;
               index=i;
           }
           node=node.next;
           i++;
       }
       return index;
    }
    public int getMinimumValue()
    {
        SingleLinkedList node=head;
        int minValue=Integer.MAX_VALUE;
       while(node!=null)
       {
           if(node.node.score<minValue)
           {
               minValue=node.node.score;
           }
           node=node.next;
       }
       return minValue;
    }
    public void printHighestToLowest()
    {
        int [] arr=new int[noOfEntries];
        int i=0;
        for(SingleLinkedList node=head;node!=null;node=node.next)
        {
            arr[i++]=node.node.getScore();
        }
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));
    }
    public int getNumberOfEntries()
    {
        return noOfEntries;
    }
    public void printScore()
    {
        SingleLinkedList node=head;
       while(node!=null)
       {
           System.out.println(node.node.name+" "+node.node.score);
           node=node.next;
       }
    }
}
class SingleLinkedList
{
   GameEntry node;
   SingleLinkedList next;
   SingleLinkedList(GameEntry node)
   {
       this.node=node;
   }
}

===============================================

In: Computer Science

If the density of the universe great than a critical value, then it might continue expanding...

If the density of the universe great than a critical value, then

it might continue expanding forever.

it could expand to a fixed size and remain.

it might eventually stop expanding and start collapsing.

there's probably less dark matter than luminous.

In: Physics

A 16.4-kg block rests on a horizontal table and is attached to one end of a...

A 16.4-kg block rests on a horizontal table and is attached to one end of a massless, horizontal spring. By pulling horizontally on the other end of the spring, someone causes the block to accelerate uniformly and reach a speed of 4.50 m/s in 1.55 s. In the process, the spring is stretched by 0.236 m. The block is then pulled at a constant speed of 4.50 m/s, during which time the spring is stretched by only 0.0565 m. Find (a) the spring constant of the spring and (b) the coefficient of kinetic friction between the block and the table.

In: Physics

Freud’s theory of defense mechanisms has had a profound impact on the methods used by therapist,...

Freud’s theory of defense mechanisms has had a profound impact on the methods used by therapist, whether or not they are freudians. After looking in Wikipedia, name the defense mechanisms about which you know the least and that are most important for people to know about. Briefly explain your selection.

In: Psychology

discuss what a disclaimer is, when is it is issued, and how it would affect the...

discuss what a disclaimer is, when is it is issued, and how it would affect the format of a standard three paragraph audit report.

In: Accounting

Explain why 1 additional net ATP is produced when the beginning substrate is glycogen compared to...

Explain why 1 additional net ATP is produced when the beginning substrate is glycogen compared to glucose. In your answer provide the name of the enzyme responsible for this difference.

In: Biology

What is Sales Tax, its salient features and how it works, do a comparative analysis between...

What is Sales Tax, its salient features and how it works, do a comparative analysis between Sales Tax and Value Added Tax and render your personal opinion as to which system is better between the two for a developing country

In: Economics

E8-10 (Algo) Computing Depreciation under Alternative Methods LO8-3 Strong Metals Inc. purchased a new stamping machine...

E8-10 (Algo) Computing Depreciation under Alternative Methods LO8-3

Strong Metals Inc. purchased a new stamping machine at the beginning of the year at a cost of $1,900,000. The estimated residual value was $100,000. Assume that the estimated useful life was five years and the estimated productive life of the machine was 300,000 units. Actual annual production was as follows:

Year Units
1 70,000
2 67,000
3 50,000
4 73,000
5 40,000

Required:

1. Complete a separate depreciation schedule for each of the alternative methods.

a. Straight-line.

b. Units-of-production.

c. Double-declining-balance.

This is the chart to use for each question. Boxes with a dash in it do not have to be filled.

Year Depreciation Expense Accumulated Depreciation Net Book Value
At acquisition - -
1
2
3
4
5

In: Accounting

C++ programming You are to implement a MyString class which is our own limited implementation of...

C++ programming

You are to implement a MyString class which is our own limited implementation of the std:: string

Header file and test (main) file are given in below, code for mystring.cpp.

Here is header file

mystring.h

/* MyString class */

#ifndef MyString_H

#define MyString_H

#include <iostream>

using namespace std;

class MyString {

private:

   char* str;

   int len;

public:

   MyString();

   MyString(const char* s);

   MyString(MyString& s);

   ~MyString();

   friend ostream& operator <<(ostream& os, MyString& s); // Prints string

   MyString& operator=(MyString& s); //Copy assignment

   MyString& operator+(MyString& s); // Creates a new string by concantenating input string

};

#endif

Here is main file, the test file

testMyString.cpp

/* Test for MyString class */

#include <iostream>

#include "mystring.h"

using namespace std;

int main()

{

char greeting[] = "Hello World!";

MyString str1(greeting); // Tests constructor

cout << str1 << endl; // Tests << operator. Should print Hello World!

char bye[] = "Goodbye World!";

MyString str2(bye);

cout << str2 << endl; // Should print Goodbye World!

MyString str3{str2}; // Tests copy constructor

cout << str3 << endl; // Should print Hello World!

str3 = str1; // Tests copy assignment operator

cout << str3 << endl; // Should print Goodbye World!

str3 = str1 + str2; // Tests + operator

cout << str3 << endl; // Should print Hello World!Goodbye World!

return 0;

}

In: Computer Science

A charge of -2.75 nC is placed at the origin of an xy-coordinate system, and a...

A charge of -2.75 nC is placed at the origin of an xy-coordinate system, and a charge of 2.05 nC is placed on the y axis at y = 3.60 cm .

A. If a third charge, of 5.00 nC , is now placed at the point x = 2.65 cm , y = 3.60 cm find the x and y components of the total force exerted on this charge by the other two charges.

B. Find the magnitude of this force.

C. Find the direction of this force.

In: Physics

Mrs. Pringleis a 62-year-old female experiencing diffuse bone pain over the past several years after menopause....

Mrs. Pringleis a 62-year-old female experiencing diffuse bone pain over the past several years after menopause. She has a history of fractures to her left hip and wrist. She states, “The pain is becoming worse and it is keeping me from doing my daily activities.” She currently complains that any weight-bearing activity causes her severe discomfort. She is not taking hormone replacement or any other medication. She has been using a soy herbal supplement and vitamin E 400 IU daily. She knows the importance of preventive healthcare. She is up to date on all her gynecological exams, and past mammograms have been normal as have her health maintenance exams. She does not smoke or use alcohol. Her system reviews are unremarkable excluding today’s complaint.
Her family history reveals that her mother had a history of anxiety, osteoporosis, non-insulin dependent diabetes and hypertension. Her father has hypertension but is in otherwise good health. There is no history of breast disorders or arthritis, thyroid or any other metabolic disorder.
She lives alone in a one-story house. She has three children and one grandchild. Her daughter lives in close proximity to her so she is able to enjoy visiting and caring for her 3-year-old grandson occasionally. She has no exercise routine and admits to a somewhat sedentary lifestyle. She admits to eating a vitamin-poor diet.
Mrs. Pringle experienced menopause around the age of 47 when her menstrual periods stopped. Her previous physician recommended no hormone replacement because she was not suffering from any menopausal symptoms. However, she now reports having “hot spells” at different times
throughout the day with some trouble sleeping for the past 3 months. She also complains of some vaginal dryness that she admits is bothersome.
Her chief complaint is severe back pain and the inability to do simple chores such as lifting grocery bags and her grandchild without pain.
Upon physical exam, she is afebrile with unremarkable findings with exception to the musculoskeletal system. She weighs 132 pounds and is 5 feet 5 inches. At her last exam 8 months ago, she was 5 feet 6 inches.
Upon palpation, guarding and tenderness are present in the cervical, thoracic and lumbar spine with limited range of motion. No spasticity, rigidity or flaccidity is present. She has active range of motion in all joints, with no edema, redness or heat present in joint areas. She exhibits notable guarding and rigidity performing range of motion of lower and upper back areas.
There is also noticeable guarding with some limitation of movement at the cervical spine area. She is able to endure the exam with noticeable painful expressions on her face when asked to do range of motion with back, guarding and tenderness noted at cervical spine area. There is no presence of dowager’s hump. She has no evidence of herniation or disc displacement upon inspection. No scoliosis or lordosis is present. Her preliminary urinalysis and CBC are unremarkable. Her symptoms indicate post-menopausal osteoporosis.
To confirm the diagnosis and rule out other medical conditions, lab tests were obtained to assess hormone, calcium, vitamin D, blood cholesterol levels and thyroid function. Also ordered were a sedimentation rate to check for arthritis, an X-ray of her back and a dual energy X-ray absorptiometry (DEXA) scan to rule out injury. DEXA scan is the gold standard in diagnosis of osteoporosis.
Diagnostic tests revealed a lack of estrogen and calcium. The X-ray of her back showed degenerative changes but no disc dislocations or herniations. The DEXA scan showed a T score of -2.9. A T score greater than -2.5 confirms a diagnosis of osteoporosis and indicates hormonal
treatment should be initiated.
Study Questions:
1.What treatment/smight youexpect to help address the lossof bone mineral density of Mrs. Pringle and reduce the risk of hip fracture?
2.How will you set your treatment goals tocomply with the Mrs. Pringlestated goal of ‘bothering vaginal dryness’?
3.Develop a nursing care plan according to your identified priority plan of care.

In: Nursing

NEW PROJECT ANALYSIS You must evaluate a proposal to buy a new milling machine. The base...

NEW PROJECT ANALYSIS

You must evaluate a proposal to buy a new milling machine. The base price is $195,000, and shipping and installation costs would add another $13,000. The machine falls into the MACRS 3-year class, and it would be sold after 3 years for $87,750. The applicable depreciation rates are 33%, 45%, 15%, and 7%. The machine would require a $6,000 increase in net operating working capital (increased inventory less increased accounts payable). There would be no effect on revenues, but pretax labor costs would decline by $50,000 per year. The marginal tax rate is 35%, and the WACC is 10%. Also, the firm spent $5,000 last year investigating the feasibility of using the machine.

How should the $5,000 spent last year be handled?

A. Last year's expenditure is considered as a sunk cost and does not represent an incremental cash flow. Hence, it should not be included in the analysis.

B. The cost of research is an incremental cash flow and should be included in the analysis.

C. Only the tax effect of the research expenses should be included in the analysis.

D. Last year's expenditure should be treated as a terminal cash flow and dealt with at the end of the project's life. Hence, it should not be included in the initial investment outlay.

E. Last year's expenditure is considered as an opportunity cost and does not represent an incremental cash flow. Hence, it should not be included in the analysis.


What is the initial investment outlay for the machine for capital budgeting purposes, that is, what is the Year 0 project cash flow? Round your answer to the nearest cent.
$

What are the project's annual cash flows during Years 1, 2, and 3? Round your answer to the nearest cent. Do not round your intermediate calculations.

Year 1 $

Year 2 $

Year 3 $

Should the machine be purchased?

In: Finance

1) Two vectors, r  and s lie in the x y plane. Their magnitudes are 4.84 and...

1) Two vectors, r  and s lie in the x y plane. Their magnitudes are 4.84 and 6.09 units respectively, and their directions are 341o and 65.0o respectively, as measured counterclockwise from the positive x axis. What are the values of vectors (a) r . s and (b) | r × s |?

2) For the following three vectors A B C, what is 3⋅C . (3A × B) ?
A =3.00î + 2.00ĵ - 3.00k̂
B =-4.00î + 3.00ĵ + 3.00k̂
C =6.00î - 7.00ĵ

In: Physics

What artifacts, espoused values, enacted values and norms, and assumptions demonstrate the culture of Southwest Airlines?

  1. What artifacts, espoused values, enacted values and norms, and assumptions demonstrate the culture of Southwest Airlines?

In: Operations Management

1) 10000 lb/h of a 40.00% NaoH solution is crystallized through a combined evaporator-crystallizer process. The...

1) 10000 lb/h of a 40.00% NaoH solution is crystallized through a combined evaporator-crystallizer process. The feed enters an evaporator which concentrates it to 50.00% NaOH. The concentrated solution then enters the crystallizer with a built in filter. The crystal product is 95% NaOH crystals with the remaining 5% as adhering mother liquor solution. The mother liquor, containing 45.00% NaOH, is mixed back to the feed before entering the evaporator. Determine the recycle flow rate.

2) Resolve the problem, now considering if the mother liquor is not recycled, but the entire process still generates the same amount of product (crystals) as the original problem. Retain all concentrations given. Determine the amount of feed needed if the recycle stream was removed. Compare the recovery ratio (lb NaOH recovered as crystals/lb NaOH in feed) for the two cases to see the importance of the recycle stream.

In: Other