Write a program that read the input from user and convert it to binary and hex in C language.
In: Computer Science
Use the enum keyword or a C++ class to create a new type Boolean with the two values F and T defined. Use the C++ class/struct keyword and an array to create a list of pairs that cover all possible combinations of the 2 Boolean constants you defined.
In: Computer Science
Cloud computing can be implemented in several different ways, please list and describe at least three different ways.
In: Computer Science
What is project creep? Which system development methods are more prone to project creep? What could be a strategy to avoid it? (400 words approx.)
In: Computer Science
Please type answer for i can copy it. Thank you very much.
-Question 1
What is a polymorphism ?
-Question 2
Can you start an algorithm in pseudo code?
In: Computer Science
1.Write complete programs. These programs should be able to compile and run. No psuedocode is allowed. No comments are needed. These programs will be graded for syntax, semantics, and programming style.
Write a complete program to display the following output:
Plan to be
spontaneous tomorrow.
2.
Write complete programs. These programs should be able to compile and run. No psuedocode is allowed. No comments are needed. These programs will be graded for syntax, semantics, and programming style.
Write a complete program to display the results for the area of a triangle. Formula (1/2) x base x height.
In: Computer Science
I am having trouble with printing the linked list from user input. Can someone tell me what I am doing wrong.
#include <iostream>
using namespace std;
struct node
{
int info;
node*link;
node*current;
node*prev;
node * head;
node * last;
}
;
void Insert(node*&head,node*&last,int n);
int SplitList(node*&head);
void print(node*&head);
int main()
{
int num;
node*h;
node*l;
cout << "Enter numbers ending with -999"
<< endl;
cin >> num;
Insert(h, l, num);
print(h);
}
void Insert(node *&head,node*&last,int n)
{
int count = 0;
if (head == NULL)
{
head = new node;
head->info = n;
head->link = NULL;
last = head;
count++;
}
else {
last->link = new node;
last->link->info = n;
last->link->link =
NULL;
last = last->link;
count++;
}
}
void print(node*&head)
{
node *current; //pointer to traverse the list
current = head; //set current so that it points
to
//the first node
while (current->link!= NULL) //while more data to
print
{
cout << current->info
<< " ";
current = current->link;
}
}//end print
In: Computer Science
In java, write a program that asks the user to enter a character. Then pass the character to the following methods.
Example output is given below:
Enter a character
a
a is a vowel
a is not a consonant
a is equivalent to A
test case: e, E, d, D
Note: Java represents character using Unicode encoding and ‘A’ to ‘Z’ is represented by numbers 65 to 90 and ‘a’ to ‘z’ is represented by numbers 97 to 122. So to convert ‘A’ to ‘a’ you need to add (97-65) to A and then cast it to Character type since the addition will change its type to integer.
You can use the following code to read a character from console. When you call charAt(i) method for any String it returns the character at index i. The index of first character is 0, the index of second character is 1 and so on.
Scanner input = new Scanner(System.in);
char ch =input.next().charAt(0);
In: Computer Science
Imagine you are responsible for the performance improvement of an old computer system. Your boss told you that since a large budget for the new fiscal year has been approved and covers expenses with hardware upgrade you can just create a cluster computer with a large number of parallel processing units managed by some cluster operating system line MS-Windows Server 2019. You will not be able to make any changes to the software. Please, provide your recommendations for your boss regarding performance improvement by increasing parallel processing.
In: Computer Science
Your objective is to write a well-documented simple program using classes, a loop, and nested ifs to simulate an ATM using JAVA.
1. Create an ATM class with class variables name, pin, and balance, a constructor with parameters to assign values to the three instance variables, methods to get the name, pin, and balance, and methods to handle validated deposits and withdrawals ( deposit and withdrawal amounts cannot be negative, and withdrawal amount must not be greater than the existing balance).
2. In the ATMTest class, read the names, 4 digit pin numbers, and account balances of two customers into two instances of the ATM class. Display the two customers names, pins, and balances formatted.
3. Now that you have all your customers’ information start your ATM to accomplish the following within an infinite loop,
a). Display a welcome screen with your bank’s information and prompt for and read the customer entered pin.
b). Use a nested if to match the entered pin with one of the two customers’ pins. If the entered pin number matches that of one of the customers, then:
i. Welcome the customer by name and display the balance.
ii. Display option to 1. DEPOSIT, 2. WITHDRAW or 3. EXIT.
iii. If option 1 is selected, then use the instance deposit method to prompt for deposit amount, read, and add a valid deposit amount to the customer’s balance
iv. If option 2 is selected, then use the instance withdrawal method to subtract a valid withdrawal amount from the customers balance
v. If option 3 is selected, go to step a.
4. Should the entered pin number not match either of the two customers, notify the customer that the entered pin is not valid and go to step a.
5. Selection of the EXIT option must display welcome/login screen (step a).
6. Should an incorrect option be entered, notify the user and display the original welcome/login screen (step a).
In: Computer Science
Show the step by step multiplication using Booth’s Algorithm
1. -8 * 2
In: Computer Science
I need the program to continue asking the user for a positive value and NOT skip to the value for store 2 if a negative value is entered. This is the code so far: Thanks
public static void main(String[] args) {
Scanner input = new
Scanner(System.in);//scanner
int Store [] = new int[5];//array
for five int
for(int i=0;i<5;i++) { // loops
until five inputs are entered
System.out.println("Enter today's sale for store "+ (i+1) +" (negative value not allowed)");
Store [i] = input.nextInt();//allows user
input
}// end of for
System.out.println("SALES BAR CHART");
for(int i =0; i<5 ;i++) { // for loop to print out store number
System.out.println("Store "+ (i+1) +": ");
for(int j=0; j < Store [i];j =j+100) { // for loop to print number of asterisks
System.out.print("*");
}// end of
for loop for asterisks
System.out.println();
}// end of for loop
}//end of
main
}//end of class
In: Computer Science
Proofs
For this assignment, know that:
An integer is any countable number. Examples are: -3, 0, 5, 1337, etc.
A rational number is any number that can be written in the form a/b, a and b are integers in lowest terms, and b cannot equal 0. Examples are 27, 22/7, -3921/2, etc.
A real number is any number that is not imaginary or infinity. Examples are 0, 4/3, square root of 2, pi, etc.
In: Computer Science
JAVA
Write a program that will accept user input for an initial deposit and a total amount the user wants to have, and will output the number of years it will take to reach his/her goal.
For the basic program, the user will deposit the initial amount in a new account, and then the account will receive interest, compounded MONTHLY, at a rate of 0.5%.
In: Computer Science
Anna is a young ambitious programmer working for a small company developing software for web based services in the health area, with a focus on support to remote aboriginal communities. To further her career Anna undertakes additional tertiary study, with support from her manager, Brian. This study includes topics covering computer ethics, and issues relating to the impact of ICT on different communities. On her current project, Anna develops a new user interface, which has a strong focus on accessibility for remote communities, especially considering the type of technology likely to be used. She also pays special attention to the use of cultural images in the interface, to avoid those which may be distressing or offensive to aboriginal users. The new system is a great success and Anna’s contribution is recognised by her company, through an Employee of the Month Award. The company also receives a national business award for its contribution to the positive use of ICT in aboriginal communities. Brian takes all of the credit for this, and Anna receives no acknowledgement for her efforts. Source:
ACS Case Studies 2014 Essay
Questions 1. Assess the major ethical issues in this business case.
2. How may the ACS Code of Professional Conduct assist in resolving such ethical implications? Relate to the key values and clauses of the Code of Professional Conduct.
In: Computer Science