Assess the six stages of BI application development and evaluate the primary activity of each.
In: Computer Science
Must be written in JAVA Code
Modify the program you created in previous project to accomplish the following:
Support the storing of additional user information: street address (string), city( string), state (string), and 10-digit phone number (long integer, contains area code and does not include special characters such as '(', ')', or '-'
Store the data in an ArrayList object
Program to Modify
import java.util.ArrayList;
import java.util.Scanner;
public class Address
{
String firstname;
String lastname;
int zipcode;
Address(String firstname,String lastname,int zipcode)
{
this.firstname = firstname;
this.lastname = lastname;
this.zipcode = zipcode;
}
public String toString()
{
return this.firstname + " " + this.lastname + " " +
this.zipcode;
}
public static void main(String[] args)
{
Scanner aa = new Scanner(System.in);
int n;
System.out.print("Enter a number up to 25: ");
n = aa.nextInt();
String firstname,lastname;
int zipcode;
ArrayList<Address> addr = new
ArrayList<Address>();
aa.nextLine();
for(int i=1;i<=n;i++)
{
System.out.print("Enter First Name:");
firstname = aa.nextLine();
System.out.print("Enter Last Name:");
lastname = aa.nextLine();
System.out.print("Enter Zip Code:");
zipcode = aa.nextInt();
aa.nextLine();
Address ad = new Address(firstname,lastname,zipcode);
addr.add(ad);
}
System.out.println("\nFirstName/LastName/Zipcode");
System.out.println();
for(Address a:addr)
{
System.out.println(a);
}
}
}
In: Computer Science
C programming
#include <stdio.h>
#include <math.h>
int main()
{
printf("============== Problem #1 =================\n");
printf("This should print down from 2 to 0 by 0.1 increments\n");
float f = 2.0;
while (f != 0)
{
printf("%0.1f\n",f);
f = f - 0.1;
}
printf("============== Problem #2 =================\n");
printf("This should find that the average is 5.5\n");
int total_score = 55;
int total_grades = 10;
double avg = total_score/total_grades;
printf("Average: %0.2f\n",avg);
printf("============== Problem #3 =================\n");
printf("If the population increases by 2.5 people per second, how long before the population hits 8 billion?\n");
float current_population = 7600000000;
float increase_per_second = 2.5;
printf("Counting...\n");
int second_count = 0;
while (current_population != 8000000000)
{
current_population += increase_per_second;
second_count++;
}
printf("It will be %d seconds from now.\n",second_count);
return(0);
}
Activity 1: Fix the first problem
The first part of this program should print from 2.0 to 0.0 in decrements of
0.1. It starts off good but then the program doesn't end. Figure out why and
fix the program so it terminates (in that loop at least).
Activity 2: Fix the second problem
The second part should calculate the average when given a total of 55 over 10
sample points. The average should be 5.5 but instead, 5.0 is printed out. Find
and fix that problem.
Activity 3: Fix the third problem
The third part is supposed predict the exact second that the world population
will hit 8000000000. It starts with the current population 7600000000 and adds
2.5 people per second. This is the net population increase per
second. Unfortunately, it seems that it never gets to 8000000000.
In: Computer Science
//// HighArray.java
//// HighArrayApp.java
Study carefully the design and implementation HighArray class and note the attributes and its methods.
/**
* find an element from array and returns all number of occurrences
of the specified element, returns 0 if the element does not
exit.
*
* @param foundElement Element to be found
*/
int findAll(int foundElement)
long max() |
Returns the maximum value in a |
int maxIndex() |
Returns the index of the maximum value |
long min() |
Returns the minimum value in a |
int minIndex() |
Returns the index of the minimum value |
long range() |
Calculates the range (max-min) |
long sum() |
Calculates the sum of elements of a |
double avg() |
Calculates the average of a |
double std() |
Calculates the standard deviation of a |
long rank(int i) |
Return the ith largest element of a |
boolean checkOrdered() |
Returns true if a is ordered otherwise returns false |
boolean checkUnique() |
Returns true if a has unique elements |
void removeDuplicates() |
Removes duplicates from a |
void fillArrayRandom() |
Fills a with Random numbers |
In: Computer Science
Chapter 1, you created two programs to display the motto for the Greenville Idol competition that is held each summer during the Greenville County Fair. Now write a program named GreenvilleRevenuethat prompts a user for the number of contestants entered in last year’s competition and in this year’s competition. Display all the input data. Compute and display the revenue expected for this year’s competition if each contestant pays a $25 entrance fee. Also display a statement that indicates whether this year’s competition has more contestants than last year’s.
In: Computer Science
The Jonesburgh County Basketball Conference (JCBC) is an amateur basketball association. Each city in the county has one team as its representative. Each team has a maximum of 12 players and a minimum of 9 players. Each team also has up to 3 coaches (offensive, defensive, and physical training coaches). During the season, each team plays 2 games (home and visitor) against each of the other teams. Given those conditions, do the following:
• Identify the connectivity of each relationship. • Identify the type of dependency that exists between CITY and TEAM.
• Identify the cardinality between teams and players and between teams and city.
• Identify the dependency between COACH and TEAM and between TEAM and PLAYER.
Please, I need help completing this exercise using ER assistant program its for my management database course, thanks!
In: Computer Science
In C language using stacks:
Activity: Using Stack, check whether the following is
balanced or not : “{ ( ) } ) ”
-Assume a stack of Max_Size = 6
-Draw the stack for each step and show the value of “top”
-If any decision is made (valid/invalid), then write the
reason 11
In: Computer Science
You have been tasked to design a database to support your new business. This business could be one of many possibilities such as a car dealership, Internet Sales, Graphic Design, Fitness counselor or anything you can imagine.
Describe the entities and their attributes that might be required for this application, the type of database processing required, and the application software needed.
Pick something unique for you. Note: this doesn't have to be complex. A few entities and attributes will suffice. Just be sure, the entities make sense for your application.
Describe your business.
In: Computer Science
Convert −98765.4321 to IEEE 745 (show your work)
In: Computer Science
Write a class to keep track of a balance in a bank account with a varying annual interest rate. The constructor will set both the balance and the interest rate to some initial values (with defaults of zero).The class should have member functions to change or retrieve the current balance or interest rate. There should also be functions to make a deposit (add to the balance) or withdrawal (subtract from the balance). You should not allow more money to be withdrawn than what is available in the account, nor should you allow for negative deposits.Finally, there should be a function that adds interest to the balance (interest accrual) at the current interest rate. This function should have a parameter indicating how many months’ worth of interest are to be added (for example, 6 indicate the account should have 6 months’ added). Interest is accrued from an annual rate. The month is representative of 1/12 that amount. Each month should be calculated and added to the total separately.
1 month accrued at 5% APR is Balance = ((Balance * 0.05)/12) + Balance;
For 3 months the calculations you repeat the statement above 3 times.
//account.cpp
#include "Account.h"
//constructor
Account::Account()
{
balance = 0;
rate = .05;
}
Account::Account(double startingBalance)
{
balance = startingBalance;
rate = .05;
}
double Account::getBalance()
{
return balance;
}
-------------------------------------------
//Account.h
#pragma once
class Account
{
private:
double balance;
double rate;
public:
Account();
Account(double);//enter balance
double getBalance();
double getRate();
};
--------------------------------------------
//source.cpp
#include "Account.h"
#include <iostream>
using namespace std;
int menu();
void clearScreen();
void pauseScreen();
int main()
{
int input = 0;
Account acct(100.00); //create instance of account
do
{
input = menu();
switch (input)
{
case 1: cout << acct.getBalance();
pauseScreen();
break;
case 2: //ToDo
break;
case 3: //ToDo
break;
case 4: //ToDo
break;
case 5: //ToDo
break;
case 6: //ToDo
cout << "Goodbye";
pauseScreen();
}
clearScreen();
} while (input != 6);
}
int menu()
{
int input;
cout << "Enter the number for th eoperation you wish to perform from the
menu." << endl
<< "1. Check Balance" << endl
<< "2. Check Current Rate" << endl
<< "3. Deposit to Account" << endl
<< "4. Withdraw from Account" << endl
<< "5. Accrue Interest" << endl
<< "6. Exit program" << endl << endl;
cout << "Enter Choice: ";
cin >> input;
while (input < 1 or input > 6)
{
cout << "Enter a valid Choice from the menu: ";
if (std::cin.fail())
{
std::cin.clear();
std::cin.ignore(1000, '\n');
}
cin >> input;
}
return input;
}
void clearScreen()
{
system("CLS");
if (std::cin.fail())
{
std::cin.clear();
std::cin.ignore(1000, '\n');
}
}
void pauseScreen()
{
std::cin.clear();
std::cin.ignore(1000, '\n');
std::cout << "\n---Enter to Continue!---\n";
std::cin.get();
}
In: Computer Science
c++ I am getting errors that say "expected a declaration". can you explain what it means by this and how I need to fix it?
#include <iostream>
using namespace std;
//functions
void setToZero(int board[8][8]);
void displayBoard(int oboard[8][8]);
void movingFunction();
int main()
{
// chess board 8x8
int board[8][8];
// all of the possible moves of the knight in 2
arrays
int colMove[8] = { 2, 1, -1, -2, -2, -1, 1, 2 };
int rowMove[8] = { -1, -2, -2, -1, 1, 2, 2, 1 };
int row = 0; // starting row
int col = 0; // starting column
int newRow = 0; // transition row
int newCol = 0; // transition column
int mover = 1; // position # / tracker increase by 1
everytime a new position is found
// function to set values to 0
setToZero(board);
board[row][col] = 1; // starting position in top left set to one
bool ableToMove = true; // set to true so that while loop always executes
// function to decide where knight will move
movingFunction();
// function to display board
displayBoard(board);
cin.get();
cin.get();
return 0;
}
//function to initialize to zero
void setToZero(int fboard[8][8])
{
for (int i = 0; i < 8; i++)
for (int j = 0; j < 8;
j++)
fboard[i][j] =
0;
}
//function to display the board
void displayBoard(int oboard[8][8])
{
int i, j;
for (i = 0; i < 8; i++)
{
for (j = 0; j < 8; j++)
{
cout << "
" << oboard[i][j] << " ";
}
cout << " " <<
endl;
}
}
// function that enables knight to move
void movingFunction();
{
while (ableToMove)
{
ableToMove = false;
for (int i = 0; i < 8;
i++)
{
for (int j = 0;
j < 8; j++)
{
newRow = row + rowMove[i];
newCol = col + colMove[j];
// ensures that knight is staying on the
board
if (newRow >= 0 && newRow < 8
&& newCol >= 0 && newCol < 8 &&
board[newRow][newCol] == 0)
{
ableToMove = true; // becomes
true if able to move
break;
}
}
if (ableToMove
== true)
{
break;
}
}
if (ableToMove) // if became true,
values are changed and "mover" (knight) increases
{
row =
newRow;
col =
newCol;
board[row][col]
= ++mover;
}
}
}
In: Computer Science
What can organizations do to protect themselves from hackers looking to steal account data? What would you do to continually monitor your information systems to ensure that data is secure? Typically, organizations may share information about their customers, a form of marketing and data-mining. Do you think this is an ethical practice? justify your answer.
In: Computer Science
1. What is the difference between a child selector and a descendant selector? In your answer, you must (1) explain what they are for, (2) provide an example child selector, and (3) provide an example descendant selector.
In: Computer Science
Research Problem
Find a catalog or visit the Website of a major distributor of microcomputer equipment,such as Computer Discount Warehouse (www.cdw.com) or Dell (www.dell.com). Select or configure a system that provides optimal performance for the following types of users:
· A home user who uses word-processing software, such as Microsoft Office; a home accounting package, such as Quicken or TurboTax; children’s games; and multimedia software for editing pictures and creating video DVDs
· An accountant who uses office software, such as Microsoft Office, and statistical software, such as SPSS or SAS, and downloads large amounts of financial data from a corporate server for statistical and financial modeling .
· An architect who uses typical office software and CAD software, such as AutoCAD
Pay particular attention to whether CPU power, memory, disk space, and I/O capabilities are adequate. Compare the cost of each computer. Which is most expensive and why?
Instructions
Please read these instructions carefully.
Answer the Research Problem above for the three types of users listed. You should have 3 different configurations total because there is not a one-size-fits-all with the different user needs presented. Use a budget of a max of $1,500 per machine, not the total for all three combined, and you do not have to use the entire budget. Do not include productivity software or peripherals such as scanners or printers in the budget total. You may use an online configuration site from major manufacturers (Dell, HP, Lenovo, etc) or build by individual components. If you are building the PC by individual components, be sure to add the cost of an operating system and necessary peripherals (keyboard/mouse/display). The computers and components must be available on the market today. Do not use components that have been out of stock for years. Do not use a configuration from a prior class, even if you originally created it.
In: Computer Science
Write the Gradient Descent definition and explain how to apply gradient descent on Linear Regression.
In: Computer Science