Questions
IT Project Management: Ch4 1) How are potential projects identified? 2) What are the methods for...

IT Project Management: Ch4

1) How are potential projects identified?

2) What are the methods for categorizing Information Technology projects?

In: Computer Science

Given a monotonically increasing function f(n) (where ‘n’ is an integer), use a binary search algorithm...

Given a monotonically increasing function f(n) (where ‘n’ is an integer), use a binary search algorithm to find the largest value of ‘n’ for which f(n) is less than a target. Show all the work (including the values for the left index, right index, middle index and the function value at the middle index) for each iteration as well as write down the initial values of the left index and right index and the corresponding function values.

f(n) = 3n^3 + 5n + 1, Target = 100

In: Computer Science

Question 1 Refer to the operations below: Add (10 + 5) Add (4+8) Add (7*2) Add...

Question 1
Refer to the operations below:
Add (10 + 5)
Add (4+8)
Add (7*2)
Add (90 – 3)
Print list
Print peek
Remove an item from the list
Print list
1.1 Implement the operations above into a Queue structure called q1.
1.2 Implement the operations above into a Stack structure called s1.

Name your program Question1_1 for the queue structure and Question1_2 for the stack structure

JAVA Language to be used.

Please give step by step explanation on how to save and run the programs

In: Computer Science

On Android Studio, create a 4 function calculator. The only buttons you need are 0-9, *,...

On Android Studio, create a 4 function calculator. The only buttons you need are 0-9, *, /, +, -, a clear, and enter button. Having this java code below, I need the XML code that organizes the layout of the calculator (using either linearLayout or relativeLayout). As shown in the JAVA Code - Button button0, button1, button2, button3, button4, button5, button6, button7, button8, button9, buttonadd, buttonsubtract, buttonmultiply, buttondivide, buttonequals, buttonclear and TextView display - is what is needed in the XML layout for this calculator.

JAVA CODE -

package com.example.10012698.calculatorproject;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.StringTokenizer;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {

Button button0, button1, button2, button3, button4, button5, button6,
button7, button8, button9, buttonadd, buttonsubtract, buttonmultiply,
buttondivide, buttonequals, buttonclear;
TextView display;
String displaytext="";
double result;
double x, y;
ArrayList<String> list;


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

button0 = (Button) findViewById(R.id.button0);
button1 = (Button) findViewById(R.id.button1);
button2 = (Button) findViewById(R.id.button2);
button3 = (Button) findViewById(R.id.button3);
button4 = (Button) findViewById(R.id.button4);
button5 = (Button) findViewById(R.id.button5);
button6 = (Button) findViewById(R.id.button6);
button7 = (Button) findViewById(R.id.button7);
button8 = (Button) findViewById(R.id.button8);
button9 = (Button) findViewById(R.id.button9);
buttonadd = (Button) findViewById(R.id.buttonadd);
buttonsubtract = (Button) findViewById(R.id.buttonsubtract);
buttonmultiply = (Button) findViewById(R.id.buttonmultiply);
buttondivide = (Button) findViewById(R.id.buttondivide);
buttonclear = (Button) findViewById(R.id.buttonclear);
buttonequals = (Button) findViewById(R.id.buttonequals);
display = (TextView) findViewById(R.id.display);
display.setOnClickListener(this);
list = new ArrayList<>();
}

public void onClick(View view)
{
if(!(view.equals(buttonclear)&&!(view.equals(buttonequals))))
{
display.setText(display.getText()+""+((Button)view).getText());

if(displaytext.equals("0"))
{
display.setText(" ");
}

if(view.equals(buttonclear))
{
display.setText(" ");
}

if(view.equals(buttonequals))
{
displaytext= displaytext.substring(0,displaytext.length()-1);
StringTokenizer operators= new StringTokenizer(displaytext, "+-*/",true);

while(operators.hasMoreTokens())
{
list.add(operators.nextToken());
}

for(int j=0; j<list.size()-1; j++)
{
if (list.get(j).equals("*") || list.get(j).equals("/"))
{
x = Double.parseDouble(list.get(j - 1));
y = Double.parseDouble(list.get(j + 1));

if (list.get(j).equals("*"))
{
result+=(x*y);
}

if (list.get(j).equals("/"))
{
result+=(x/y);
}
}
}
for(int k=0;k<list.size()-1;k++)
{
if (list.get(k).equals("+") || list.get(k).equals("-"))
{
x = Double.parseDouble(list.get(k - 1));
y = Double.parseDouble(list.get(k + 1));

if (list.get(k).equals("+"))
{
result+=(x+y);
}

if (list.get(k).equals("-"))
{
result+=(x-y);
}
}
}
}
display.setText(""+result);


}
}

In: Computer Science

suggest two or three possible techniques that can be utilized to minimize or reduce network congestion...

suggest two or three possible techniques that can be utilized to minimize or reduce network congestion and explain why this is an appropriate technique. 250 words

In: Computer Science

(Q)Choose a DBMS that you’d like to use. Provide some evidences to show that you have...

(Q)Choose a DBMS that you’d like to use. Provide some evidences to show that you have some basic knowledge of the software. For instance, use the software to define a name and address database of your business associates, friends, classmates etc. You can use the following relation: (LAST NAME, FIRST NAME, SEX, ADDRESS, POSTCODE, CITY, PHONE). Enter at least five people in your data file. Print/screen shot a copy of the records. There should be no blank records. (20)

please mention which dbms that you used and please give detail explanation in the answer thank you.

In: Computer Science

Hi I started writing this program but is confusing the heck out of me and I...

Hi I started writing this program but is confusing the heck out of me and I don't know if I'm just over thinking it too much. Can anyone help me with this? Write a program in c language: simulates a time clock does nested for loops with one switch statement. Declares variables hours, minutes, seconds as integers. For hours are zero to < 24 however switch when hours are greater than 24 print on new line “25 error” switch when hours are thirteen break switches otherwise by default print on new line “top of the hour!” , For minutes are zero to 60, For seconds are zero to 60 in this loop print on a line hours value separated by a colon character minutes value separated by a colon character seconds value with new line character. Just before ending print on new line “Program finished!” then terminate program.

In: Computer Science

Choose one of the laws & regulations concerning email investigations in digital forensics. What is it?  What...

Choose one of the laws & regulations concerning email investigations in digital forensics. What is it?  What does it cover? How does it relate to digital forensics?  

In: Computer Science

Spoofing email is a common occurrence these days. Have you received a spoofed email? Briefly, describe...

Spoofing email is a common occurrence these days. Have you received a spoofed email? Briefly, describe the email and how did you notice it was not legit? Anything else that was odd concerning the spoofed email?

In: Computer Science

Hi, I am working on an assignment in C-Programming language dealing with LInked lists, in the...

Hi,

I am working on an assignment in C-Programming language dealing with LInked lists,

in the code there is instructions on where to write the code. I do not know how to write Linked Lists.

Has to be in the C-language, Any help is greatly appreciated  

//agelink.c
//maintains list of agents
//uses linked list


#include <stdio.h>
#include <stdlib.h>
#define TRUE 1

void listall(void);
void newname(void);
void delink(void);
void memexit(void);
void wfile(void);

/*********************************************************************
this is the structure to hold a agent information.
prt *ptrnext is a point to link to next prt structure

*********************************************************************/
struct prs
{
   char name[40];
   int agnumb;
   float height;  
   struct prs *ptrnext;
};

struct prs *ptrfirst = NULL;
int n = 0;

/***********************************************************************
main() calls other methods depending on user choice. you do not need the change code here.
**********************************************************************/
void main(void){
  
   while(TRUE) // cycle until user chooses 'q'
   {
       printf("\n'e' enter new agent\n'l' list all agents");
       printf("\n 'd' delete a agent\n'r' read file\n'q' exit: ");
       char option;
       scanf("%c", &option);
       switch(option) //gethche() gets()
       {
           case 'e': newname(); break;
           case 'l': listall(); break;
           case 'd': delink(); break;
           case 'q': memexit(); break;
           default:
               printf("\nEnter only selections listed"); //puts("this is to be print out to screen")
                      
       }//end switch
                  
   }//end while  
  
}// end main();

/**************************************************************
Complete this methods to ask user to enter agent name,
agent number, and agent height to add a new agent to the
linked list.
use scanf() to read from the user inputs
use atoi to convert char to integers.
**************************************************************/
void newname(void){
  
   struct prs *ptrthis; // this is the pointer to new agent.
  
   char numstr[81];
  
   ptrthis = malloc(sizeof(struct prs));
   if(ptrthis==NULL)
   {
       printf("\nCan't reallocate memory");
       return;
   }
   //your code start here


   if(!ptrfirst)
   ptrfirst = ptrthis;
   else
   {
       ptrfirst->ptrnext = ptrthis; // note: you need make the line right to handle additonal link.
   }
  
  
  
}
/**************************************************************
Complete this method to print out all the agent list to screen
**************************************************************/
void listall(void){
  
   struct prs *ptrthis;
  
  
   if(ptrfirst == NULL){
       printf("\nEmpty list");
       perror("error in listall method");
       return ;
   }
  
   ptrthis = ptrfirst;
   // in this do while loop, to print out the list
   do{
  
   }
   while (ptrthis != NULL);

  
  
}
/******************************************************************
//delink()
//delete entry in agent list matching the name from user input

******************************************************************/
void delink(void){
  
   struct prs *ptrthis, *ptrlast; // utility pointer
   char delname[81];
  
   if(ptrfirst == NULL){
       printf("\nEmpty list in delink.\n");
       return;
   }
  
   printf("\nEnter name ot be deleted: ");
  
   scanf("%s",&delname);
  
   ptrthis = ptrfirst;
  
   //implement logica here to search and delete the record matching the name
   // user input from terminal. do not forget to free the memory resouces
   //used by the deleted records using free(void *ptr) method.
  
   do{
      

      
   }while(ptrthis !=NULL);
  
   printf("No such name on list\n");

  
  
}

//fee all memeory and exist;

void memexit(void){

   struct prs *ptrthis, *ptrfree;

   if(ptrfirst == NULL)
       exit(0);
  
   ptrthis = ptrfirst;
   do{
      
       ptrfree = ptrthis;
       ptrthis = ptrthis->ptrnext;
       free(ptrfree);
   }while (ptrthis != NULL);
  
   exit(0);

}

In: Computer Science

I need know how to make A Java supermarket awards coupons depending on how much a...

 I need know how to make A  Java supermarket awards coupons depending on how much a customer spends on

  groceries. For example, if you spend $50, you will get a coupon worth eight percent

  of that amount. The following table shows the percent used to calculate the coupon
i also need comments

  awarded for different amounts spent. Write a program that calculates and prints the

  value of the coupon a person can receive based on groceries purchased.

* - Up to 10 dollars: No coupon
* - From 10 to 60 dollars: 8% coupon
* - From 50 to 150 dollars: 10% coupon
* - From 150 to 210 dollars: 12% coupon
* - More than 210 dollars: 14% coupon

In: Computer Science

Provide an array-based implementation of stack that allows us adding (pushing) items regardless of the capacity....

Provide an array-based implementation of stack that allows us adding (pushing) items regardless of the capacity. That means, when the stack becomes full, it doubles its capacity to be able to hold more items. Specifically, in your implementation start with default capacity 4, when the stack reaches 4 items and you want to add more, make the capacity 8, and so on. Therefore, you can always add items and the stack expands.

Name the class ImprovedStack and implement the following methods in addition to two constructors, one default no-args constructor, and one constructor that sets the initial capacity.

int pop()

void push(int item)

int peek()

int size()

boolean isEmpty()

boolean isFull()

Assume your items are of type int. your file to be submitted to Gradescope should be named ImprovedStack.java.

In: Computer Science

Consider the table below then answer the following questions. Material Density Color Steel 8050 Grey Aluminum...

Consider the table below then answer the following questions.

Material Density Color
Steel 8050 Grey
Aluminum 2710 Grey
Fiberglass 12 White
Wood 485 Brown

(True/False) Material → Density

(True/False) Material → Color

(True/False) Color → Material

In: Computer Science

Consider a set of n boxes with their positions numbered from 1 to n. Initially all...

Consider a set of n boxes with their positions numbered from 1 to n. Initially all the boxes
are CLOSED. These n boxes are subject to modifications over n iterations as follows. At the ith
iterations the boxes at the positions whose ids are multiples of i are flipped, i.e. changed from
CLOSED to OPEN or vice-versa. For example, at iteration 1, boxes at all positions are
flipped, at iteration 2, boxes at positions 2,4,6,etc. are flipped, at iteration 3, boxes at positions 3,6,9, etc.
are flipped.
Propose an algorithm for find out, that after n such iterations how many boxes will be OPEN.
Note that the answer requires only how many boxes, not their positions. Describe the rationale
for the algorithm, give the pseudocode, and its complexity. Grading scheme: (your grade will be
based on whichever class your algorithm falls in)
- For algorithms with complexity O(n2) or higher.
- For algorithms with complexity O(kn), where k is the number of digits of n.
- For algorithms with complexity O(M(k)), where k is the number of digits of n, and M(k) is
the complexity of multiplying two k digit numbers.

In: Computer Science

I need know how to make A Java supermarket awards coupons depending on how much a...

 I need know how to make A  Java supermarket awards coupons depending on how much a customer spends on

  groceries. For example, if you spend $50, you will get a coupon worth eight percent

  of that amount. The following table shows the percent used to calculate the coupon

  awarded for different amounts spent. Write a program that calculates and prints the

  value of the coupon a person can receive based on groceries purchased.

* - Up to 10 dollars: No coupon
* - From 10 to 60 dollars: 8% coupon
* - From 50 to 150 dollars: 10% coupon
* - From 150 to 210 dollars: 12% coupon
* - More than 210 dollars: 14% coupon

In: Computer Science