Questions
Write 1-2 Pages A properly formatted memorandum that describes a current problem within Database Admission field...

Write 1-2 Pages

A properly formatted memorandum that describes a current problem within Database Admission field and presents a possible solution or solutions to the problem.

In: Computer Science

*** C language *** Make a  list of all of the different zip codes that the zombies...

*** C language ***

Make a  list of all of the different zip codes that the zombies live at and a count of how many
zombies live at that zip code. The list should be sorted based on the zip code with the
smallest zip code printed first. Example:
Zip Code # Zombies

31234 2

//variables

int zip[] = {37643,31234,32785,32643,32785,32643,31234,31234,32643,32643,31234,32785,32785,32643,31234};

char zombie[]={'N','Y','Y','N','Y','Y','Y','N','Y','Y','N','Y','Y','Y','Y'};

Y = zombie N = Not zombie

int zPatient = 0;
int nonZpatient = 0;
for(int pt = 0; pt < (*(&zombie + 1) - zombie); pt++)
{
if(zombie[pt] == 'N')
{
nonZpatient++;
}
else if (zombie[pt] == 'Y')
{
zPatient++;
}
}


In: Computer Science

What are the strengths and weaknesses of the REA Model when compared to a commercial system?

What are the strengths and weaknesses of the REA Model when compared to a commercial system?

In: Computer Science

Questions 1a and 1b are about the linear search algorithm that was discussed in the lectures....

Questions 1a and 1b are about the linear search algorithm that was discussed in the lectures.

1a. Write a Java method called stringyLinear that performs linear search on an array of String’s, so it is defined as follows. Your code appears in place of the three dots ‘‘⋅⋅⋅’’. Do not write a class, only a method.


If a String equal to key appears in keys, then stringyLinear must return an index in keys where it appears. If no String equal to key appears in keys, then stringyLinear must return −1. Assume that no element of keys is null, and that key is not null.

1b. Suppose that a linear search method is given an array whose length is n, where n ≥ 1. Show that the algorithm performs O(n) key comparisons in the average case. For full credit, you must do this by finding constants c and n₀.

In: Computer Science

For the following program fragment, (1) give an analysis of the running time T(n) as a...

For the following program fragment, (1) give an analysis of the running time T(n) as a function of n and (2) give a big-O bound on the asymptotic running time (tight bounds for full credit).

Sum = 0;

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

   for(j=0; j < i*i; j++)

if(j % i == 0)

for (k=0; k<j; k++)

Sum = Sum + 1;

In: Computer Science

C programming Assignment 1. Read two integers into two variables, A and B. Print them on...

C programming Assignment

1. Read two integers into two variables, A and B. Print them on terminals. Write functions to Swap them (1) using a temporary variable and (2) without using a temporary variable.

2. Read 10 integers into an array. Sort the array. Then print the sorted array.

3. Read 16 integers into an array. Use merge sort algorithm to sort it.

4. Read 16 integers into an array. Sort it using merge sort algorithm. Then read a number to be searched in the array. Then in no more than 4 comparisons, decide if the given number is in the array or not and print the result.

In: Computer Science

Using the below two SQL queries and comments below, provide explanation on why the output count...

  1. Using the below two SQL queries and comments below, provide explanation on why the output count varies and which SQL yield correct result.

(20 points)

  • Both SQLs are joining two tables
  • Both SQLs are syntactically correct
  • Query #1 returns about 19614 rows versus Query #2 returns 3550134.

Query #1:

select * from person.Address addr inner join person.StateProvince prov on addr.StateProvinceID = prov.StateProvinceID

Query #2:

select * from person.Address addr,person.StateProvince prov

In: Computer Science

Card Shuffling and Dealing (C++) All in one file with comments explaining please! Create a program...

Card Shuffling and Dealing (C++)

All in one file with comments explaining please!

Create a program to shuffle and deal a deck of cards. The program should consist of a class Card, class DeckOfCards and a driver program.

Class Card should provide:

a)      Data members face and suit of type int.
b)      A constructor that receives two ints representing the face and suit and uses them to initialize the data members.
c)      Two static arrays of strings representing the faces and suits.
d)      A toString function that returns the Card as a string in the form "face of suit." You can use the + operator to concatenate strings.

Class DeckOfCards should contain:

a)      An array of Cards named deck to store the Cards.
b)      An integer currentCard representing the next card to deal.
c)      A default constructor that initializes the Cards in the deck.
d)      A shuffle function that shuffles the Cards in the deck. The shuffle algorithm should iterate through the array of Cards. For each Card, randomly select another Card in the deck and swap the two Cards.
e)      A dealCard function that returns the next Card object from the deck.
f)       A moreCards function that returns a bool value indicating whether there are more Cards to deal.

The driver program should create a DeckOfCards object, shuffle the cards, and then deal the 52 cards.

In: Computer Science

please unique answer, no handwriting, for safeAssign Pilgirism submission.API style You have been hired to design...

please unique answer, no handwriting, for safeAssign Pilgirism submission.API style

You have been hired to design a database for prescriptions for RX pharmacies and your first job now is to design an ER model for this database using the following description of that world.

i. patients are identified by their SSN and have other attributes as names, addresses, and ages.

ii. Doctors are identified by their SSN and have other attributes as names, specialty, and years of experience.

iii. Each pharmaceutical company is identified by name and has a phone number.

iv. For each drug, the trade name and formula must be recorded. Each drug is sold by a given pharmaceutical, and the trade name identifies a drug uniquely from among the products of that company. If a pharmaceutical company is deleted, you need not keep track of its products any longer.

v. Each pharmacy sells several drugs and has a price for each. A drug could be sold at several pharmacies, and the price could vary from one pharmacy to another.

vi. Doctors prescribe drugs for patients. A doctor could prescribe one or more drugs for several patients, and a patient could obtain prescriptions from several doctors. Each prescription has a date and a quantity associated with it. You can assume that if a doctor prescribes the same drug for the same patient more than once, only the last such prescriptions needs to be stored.

vii. Pharmaceutical companies have contracts with pharmacies. A pharmaceutical company can have contracts with several pharmacies and a pharmacy can have contracts with several pharmaceutical companies. For each contract, you need to store a start date, an end date and the contract text.

viii. Pharmacies appoint a supervisor for each contract. There must always be a supervisor for each contract.

Hint: Present the conceptual design first, showing (1) all the entities and their attributes, (2) all the relationships and their attributes, (3) all the constraints before drawing your ER.

Specific Requirement /Constraint Type

Requirements and Constraints from the ER diagram

Entities and attributes in ER

(1 Mark)

Relationships and attributes in ER

(0.75 Mark)

Interpretation of each of the constraints represented on the edge labels in ER

(0.75 Mark)

In: Computer Science

Problem: Design and write a C language program that can be used as a unit converter...

Problem:

Design and write a C language program that can be used as a unit converter application. Your unit converter should contain at least four unit categories, for example: length, mass, temperature, and time. The program should display the main menu that contains unit categories that are available, and the user will be prompted to select a unit category first. After the unit category has been selected the program should then display another menu (i.e., a submenu) that contains at least three units or more for the chosen unit category. For example, if the mass unit category is selected, the units shown in its submenu could be: kilogram, pound, and ounce. The user will be prompted next to enter a value (i.e., a floating point number) to be converted, as well as the two units from the submenu. The first unit is the unit to be converted, while the second unit is the unit to which the first unit will be converted. After these two units are selected, the program will compute and display the result of the conversion. The program will then prompt the user to return to the main menu and repeat the same process, or terminate the program. Program requirements: It is required to use the following C language constructs: · User-Defined Functions . switch/case · Loops · Decisions

In: Computer Science

Using Java Summary Create a Loan class, instantiate and write several Loan objects to a file,...

Using Java

Summary

Create a Loan class, instantiate and write several Loan objects to a file, read them back in, and format a report.

Project Description

You’ll read and write files containing objects of the Loan class. Here are the details of that class:

Instance Variables: customer name (String)
annual interest percentage (double)
number of years (int)
loan amount (double)
loan date (String)
monthly payment (double)
total payments (double)

Methods:

  • getters for all instance variables
  • setters for all instance variables except monthly payment and total payment
  • calculateMonthlyPayment and calculateTotalPayments

The setters for the annual interest percentage, number of years, and loan amount invoke both “calculate…” methods before they exit

The “calculate…” methods compute the named value, then store that amount in the associated instance variable. They are private (helper) methods.

Constructors:

  • a “no-arg” constructor sets the customer name to a default value, the loan date to “no date”, and all numeric variables to zero. This method invokes the “full” constructor
  • a “full” constructor takes the customer name, annual interest percentage, number of years, loan amount, and loan date. It invokes the appropriate setters, but doesn’t need to invoke the “calculate” methods (why?)

Calculations:

monthly interest rate = annual interest percentage / 1200

monthly payment = (loan amount * monthly interest rate) /
(1 – Math.pow( (1 + monthly interest rate), – (number of years * 12) ) )

total loan payments = monthly payment * number of years * 12

* Note: Round all dollar amounts to 2 decimal places

Here is what you should do in main

Use this data to create five Loan objects

                Annual Interest           Loan
  Customer Name   Percentage    Years    Amount   Loan Date
  Bob Smith             6.5%       30   318,000   Sep 1, 2015
  Alicia Herman         4.2%       15   248,000   Oct 15, 2013
  Julie Franciosa       8.5%       10    30,000   Apr 14, 2010
  Julio Quiros         15.0%        3    50,000   June 23, 2017  
  Frank Larsen          8.9%        5    23,000   Mar 8, 2016

Use this algorithm:

  1. Make the Loan class Serializable (don't forget to import this interface from java.io).
  2. Instantiate Loan objects representing the first three loans above using the “full” constructor
  3. Create an output stream and store the three objects into a binary file using the writeObject method
  4. Instantiate Loan objects representing the last two loans above using the “no-arg” constructor, then use setters to update information about those loans
  5. Append those objects to the output stream created above in step 2
  6. Close the output stream
  7. Create an input stream and read the objects from the binary file above and display in a nicely formatted columnar report
  • Write your code to handle any number of loan objects (i.e., do not assume that there are 5 Loan objects in the file -- use a loop).
  • Include in your report the monthly loan payment and total loan payment amounts
  • Display totals for the amount of the loan amounts, monthly payments, and total loan payments.
  1. Close the input stream

Note: After writing the first three Loan objects to a file (in step 2), close the output stream, then re-open the output stream before step 4 appending the last two Loan objects to the existing file

An example of the output from your program

                    Annual                    Monthly       Total 
    Customer Name   Prcnt  Yrs  Loan-Amount   Payment   Loan Payments   Loan-Date
  ----------------  -----  ---  -----------  ---------  ------------  -------------  
  Bob Smith           6.5   30   318,000.00   2,009.98    723,592.80  Sep 1, 2015
  Alicia Herman       4.2   15   248,000.00   1,859.38    334,688.40  Oct 15, 2013
  Julie Franciosa     8.5   10    30,000.00     446.35     53,562.00  Apr 14, 2010
  Julio Quiros       15.0    3    50,000.00   1,660.72     59,785.92  June 23, 2017
  Frank Larsen        8.9    5    23,000.00     476.33     28.579.80  Mar 8, 2016
                                ===========  =========  ============
                                 669,000.00   6,452.76  1,200,208.92  

In: Computer Science

Determine the representation for the following decimal numbers in single-precision IEEE 754 format. Give them in...

Determine the representation for the following decimal numbers in single-precision IEEE 754 format. Give them in 32-bit binary and show the calculation.

-10^(−8)

In: Computer Science

Draw a flowchart that will calculate the roots of a quadratic equation. (java) Can someone draw...

Draw a flowchart that will calculate the roots of a quadratic equation. (java)

Can someone draw it for me? and at same time explain,

In: Computer Science

Asks the user "How many parrots do you own?"         2: Reads in that many single...

Asks the user "How many parrots do you own?"

        2: Reads in that many single word names (one for each parrots) from the user and stores the names in an array.

        3: After the user has finished entering names, the program should display the list of all the parrots the user entered.

        4: then display the parrots  in alphabetical order for part 3. Note: string objects can be compared with the “<” operator, which will determine if a given string is alphabetically less than another string.

You may assume the user will own at most 100 parrots.

c++

"output"

Welcome! How many dogs do you own?

- 4

Ok, enter the names!

> james

> flyingmo

> homer

> kitty

these are the names you entered: flyingmo, homer, james, kitty

In: Computer Science

Write a C program called test that takes one command line argument, an integer N. When...

Write a C program called test that takes one command line argument, an integer N. When we run test:

./test N

the program will do this:

the parent process forks N child processes
each child process prints its process ID, exits
the parent process waits for all child processes to exit, then exits

In: Computer Science