Questions
write modules to sort by 2 field then 3 fields then 4 fields Use the data...

write modules to sort by

2 field then 3 fields then 4 fields Use the data Structure to guide you.

//HW sort by 5 of these fields and ask the user which field to sort by !!!

// Use a custom comparator.

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

import java.util.*;

class Emprec {

String name;

String address;

double hours;

double rate;

int dependents;

char gender;

boolean degree;

// This is the classes's constructor !!!!

Emprec(String name, String address, String hours,String dependents) {

try {

this.name = name;

this.address = address;

this.hours = Double.valueOf(hours).doubleValue();

this.dependents = Integer.parseInt(dependents);

} catch (NumberFormatException errmsg) {

System.out.println("Invalid format" + errmsg);

this.name = "";

this.hours = 0.0;

}// catch

}// Emprec constructor !!!!

double calc_fed_tax(double hours, double rate) {

double yearly_income;

yearly_income = hours * rate * 52;

if (yearly_income < 30000.00)

return (hours * rate * .28);

else if (yearly_income < 50000.00)

return (hours * rate * .32);

else

return (hours * rate * .38);

}// calc_fed_tax

double calc_state_tax(double hours, double rate) {

double state_tax;

state_tax = hours * rate * .0561;

return (state_tax);

}// calc_state_tax

public void setName(String name) {

this.name = name;

}

public String getName() {

return name;

}

public String getAddress() {

return address;

}

public double getHours() {

return hours;

}

public int getDependents() {

return dependents;

}

  

public double getRate(){

return rate;

}

  

public char getGender(){

return gender;

}

public String toString() {

return ("\n Name: " + name +

"\n Address: " + address +

"\n Hours: " + hours+

"\n Dependents " + dependents);

}// toString

}// Emprec

public class CompDemo3Sorts_Improved {

public static void

In: Computer Science

list two (2) muscles involved with inspiration and two (2) muscles involved in expiration which root...

list two (2) muscles involved with inspiration and two (2) muscles involved in expiration

which root transmits sensory information, and which root transmits motor information, respectively?

what is the muscle of the sural region which has two heads to it?

what is the name of the smooth muscle which regulates the opening referenced in the previous question?

what is the name of the innermost layer of the eye which contains the visual sensory endings?

what are nerve tracts called in white matter, and what are nerve tracts called in gray matter?

what is the largest cranial nerve which can be seen on the sheep (or human) brain?

what is the muscle which is only seen in the cat by lifting up the spinodeltoid?

the spinal cord occurs in two distinct halves - what are the names of the two (2) features which divide the spinal cord?

what is the name of the opening of the eye to light?

what is the portion of the brain which is continuous with the spinal cord?

what is the name of the four "bodies" which are part of the midbrain?

what is the name for the white matter found in the cerebellum?

what is the only rotator cuff muscle which originates on the non-spine side of the scapula

what is the name of the group of back muscles which functions to hold the trunk of our bodies upright?

what is the name of the iridescent structure found in the cow eye (but not in the human eye) whose function if to reflect ambient light?

what is the muscle which, when contracted, lifts up the scapula?

Which is the largest of the hamstring muscles in the cat (and human)?

name the two endocrine glands found in the brain

what is the muscle found in the cat which is superficial to the biceps brachii?

In: Anatomy and Physiology

Java Project Requirements: 1.Write a Java program that plays a word game with a user. The...

Java

Project Requirements:

1.Write a Java program that plays a word game with a user. The program asks the user questions and then creates a paragraph using the user’s answers.

2.The program must perform the following:

a.Uses a Scanner object to ask the user: (The program asks for no other information)

i.Full Name (First and Last name only) - stores this Full Name in one String object variable.

ii.Age – must be read in as an int.

iii.Profession or expected profession

iv.Name of favorite pet

v.Cost of their first vehicle – must be read in as a double.

b.All input data must be stored in their own variable prior to printing out.

c.Display a paragraph of the programmer’s choosing that contains the following

i.The user’s full name, first name, and last name in separate places in the paragraph, such as James Gosling founded Sun Microsystems. James was a child prodigy. The Gosling family is very proud of James.

ii.The user’s age.

iii.The user’s profession in all uppercase regardless of the case the profession was entered.

iv.The user’s favorite pet’s name in all lower case regardless of the case the name was entered.

v.The total cost of the user’s first vehicle in a rounded two decimal places including the dollar signs. The total cost must include the inputted cost plus a 7.5% sales tax. The sales tax rate is stored as a constant in the program.

vi.A statement in parenthesis stating the total number of characters in the paragraph such as (The above story contained 345 characters)

d.Include javadoc class comment following Project Comment Template on the content page.

3.The project requires one files to be turned in - WordGame.java (the source code of your Word Game programming.

In: Computer Science

Make this simple C++ code add data into a file called "Medical Database" preferably an excel...

Make this simple C++ code add data into a file called "Medical Database" preferably an excel file.

Also ask the patient for blood type and if they're donors.

Anytime I run this code, it should add new data into the same Medical Database file.

Use comments to explain what each line of code is doing. (including the one I have written)

Side note: I'm trying to explain how data mining works in the medical field and the medical database file is acting a the real database hospitals use for patients.

*Also if can you put a note explaining steps taken to put real data into a real Database. API calling or anything.*

#include<iostream>

#include<string>

using namespace std;


int main() {

string name;

int sytolic,diastolic;

sytolic=diastolic=0;

cout<<"Enter name of Patient: ";

getline(cin,name);

cout<<"Enter "<<name<<"'s sytolic number: ";

cin>>sytolic;

cout<<"Enter "<<name<<"'s diastolic number: ";

cin>>diastolic;

cout<<"Below is "<<name<<"'s blood pressure rating: "<<endl;

cout<<"----------------------------------------------"<<endl;

cout<<"Name of Patient: "<<name<<endl;

cout<<"Blood Pressure Ratings: "<<sytolic<<"/"<<diastolic<<endl;

if(sytolic<120 && diastolic<80)

cout<<"Blood Pressure Category: Normal"<<endl;

if(120<=sytolic && sytolic<=129 && diastolic<80)

cout<<"Blood Pressure Category: Elevated"<<endl;

if((130<=sytolic && sytolic<=139) || (80<=diastolic && diastolic<=89))

cout<<"Blood Pressure Category: HBP - Stage 1"<<endl;

if((140<=sytolic) || (90<=diastolic))

cout<<"Blood Pressure Category: HBP - Stage 2"<<endl;


}

In: Computer Science

An ac voltage, whose peak value is 150 V, is across a 330 -Ω resistor.

An ac voltage, whose peak value is 150 V, is across a 330 -Ω resistor.

What is the peak current in the resistor? answer in A

What is the rms current in the resistor? answer in A

 

In: Physics

Referring to the definition of the Helmholtz energy (Eq. 6.5 in your text), show that dA...

Referring to the definition of the Helmholtz energy (Eq. 6.5 in your text), show that dA represents the maximum amount of total work that a system can perform at constant T and V.

In: Chemistry

For each of the following functions, find all the minimum SOP expressions using the Karnaugh map....

  1. For each of the following functions, find all the minimum SOP expressions using the Karnaugh map.
  2. g(v,x,y,z,w)= Σm(0,1,4,5,8,9,10,15,16,18,19,20,24,26,28,31)       (1 solution)

In: Computer Science

Calculate the Standard Reduction potential of Substance B when e = -0.62 V at 25 °C;...

Calculate the Standard Reduction potential of Substance B when e = -0.62 V at 25 °C; [Breduced] = 50 µM, and [Boxidized] = 2 µM. Assume that n = 2.

In: Chemistry

1) Lipid solubility v water solubility is a major assumption of lipids. What does this mean?...

1) Lipid solubility v water solubility is a major assumption of lipids. What does this mean? a) Define (Using as many related terms as possible) the biomolecules that are defined as lipids

In: Chemistry

Discuss the implications of the tax case Thor Power Tool Co. v. Commissioner: who/what affected &...

Discuss the implications of the tax case Thor Power Tool Co. v. Commissioner: who/what affected & how relevant today/any cases that used this case in their decision?

In: Accounting