What is the fundamental characteristic of software that is designed using a repository architecture? Give examples with explanation please.
In: Computer Science
Determine whether or not you believe certifications in systems forensics are necessary and explain why you believe this to be the case. Compare and contrast certifications and on-the-job training and identify which you believe is more useful for a system forensics professional. Provide a rationale with your response.
In: Computer Science
What is the most important advantage and at least two disadvantages of a client-server architecture?
In: Computer Science
Draw a (single) tree T, such that
• Each internal node of T stores a single character;
• A preorder traversal of T yields: E K D M J G I A C F H B L;
• A postorder traversal of T yields: D J I G A M K F L B H C E.
Part2
Let T be an ordered tree with more than one node. Is it possible that the preorder traversal of T visits the nodes in the same order as the post order traversal of T ? If so, give an example. If not, then explain why this cannot occur.
In: Computer Science
Why do we need a TCP/IP-OSI hybrid (5) model, when we already have the TCP/IP model?
In: Computer Science
write an algorithm and python program using the following information. also can y
How much should I study outside of class?
Issue:
Your fellow students need help. This is their first year in college and they need to determine how many hours they need to study to get good grades.
Study Hours Per Week Per Class Grade
15 A
12 B
9 C
6 D
0 F
Project Specifications:
Name: FirstName LastName
Credits: 12
Study Hours: 60
Grade: A
Total Students: 3
Average Credits: 9
Average Study Hours: 20
ou please run the program?
In: Computer Science
Background:
You can create a simple form of encryption using
the xor Boolean operator. For example, if you want
to encrypt the letter 'A':
Your
task:
Write a C++ program that meets the following requirements:
Submit:
Documentation should include:
In: Computer Science
JAVA CODE
Define a method called changeGroupPrice that could be added to the definition of the class Purchase. This method has one parameter that is of type double, and is named salePercent. This number represents the percent reduction in the groupPrice amount. The method uses this number to change the groupPrice. The code of the method should check to make sure the range of salePercent is between 0 and 50%. If it is, the groupPrice should be adjusted accordingly. If the salePercent is out of range of the accepted values an error message should be printed and the program terminated.
public class PurchaseDemo
{ public static void main(String[] args)
{
Purchase oneSale = new Purchase();
oneSale.readInput();
oneSale.writeOutput();
System.out.println("Cost each $" + oneSale.getUnitCost());
System.out.println("Total cost $" + oneSale.getTotalCost());
}
}
import java.util.Scanner;
/**
Class for the purchase of one kind of item, such as 3
oranges.
Prices are set supermarket style, such as 5 for $1.25.
*/
public class Purchase
{
private String name;
private int groupCount; //Part of a price, like the 2 in //2 for
$1.99.
private double groupPrice; //Part of a price, like the $1.99
// in 2 for $1.99.
private int numberBought; //Number of items bought.
public void setName(String newName)
{
name = newName;
}
/**
Sets price to count pieces for $costForCount.
For example, 2 for $1.99.
*/
public void setPrice(int count, double costForCount)
{
if ((count <= 0) || (costForCount <= 0))
{
System.out.println("Error: Bad parameter in " +
"setPrice.");
System.exit(0);
}
else
{
groupCount = count;
groupPrice = costForCount;
}
}
public void setNumberBought(int number)
{
if (number <= 0)
{
System.out.println("Error: Bad parameter in " +
"setNumberBought.");
System.exit(0);
}
else
numberBought = number;
}
/**
Reads from keyboard the price and number of a purchase.
*/
public void readInput()
{
Scanner keyboard = new Scanner(System.in);
System.out.println("Enter name of item you are purchasing:");
name = keyboard.nextLine();
System.out.println("Enter price of item as two numbers.");
System.out.println("For example, 3 for $2.99 is entered as");
System.out.println("3 2.99");
System.out.println("Enter price of item as two numbers, " +
"now:");
groupCount = keyboard.nextInt();
groupPrice = keyboard.nextDouble();
while ((groupCount <= 0) || (groupPrice <= 0))
{ //Try again:
System.out.println("Both numbers must " +
"be positive. Try again.");
System.out.println("Enter price of " +
"item as two numbers.");
System.out.println("For example, 3 for " +
"$2.99 is entered as");
System.out.println("3 2.99");
System.out.println(
"Enter price of item as two numbers, now:");
groupCount = keyboard.nextInt();
groupPrice = keyboard.nextDouble();
}
System.out.println("Enter number of items purchased:");
numberBought = keyboard.nextInt();
while (numberBought <= 0)
{ //Try again:
System.out.println("Number must be positive. " +
"Try again.");
System.out.println("Enter number of items purchased:");
numberBought = keyboard.nextInt();
}
}
/**
Displays price and number being purchased.
*/
public void writeOutput()
{
System.out.println(numberBought + " " + name);
System.out.println("at " + groupCount +
" for $" + groupPrice);
}
public String getName()
{
return name;
}
public double getTotalCost()
{
return (groupPrice / groupCount) * numberBought;
}
public double getUnitCost()
{
return groupPrice / groupCount;
}
public int getNumberBought()
{
return numberBought;
}
}
In: Computer Science
For this assignment I need to use information from a previous assignment which I will paste here:
#ifndef TODO
#define TODO
#include <string>
using std::string;
const int MAXLIST = 10;
struct myToDo
{
string description;
string dueDate;
int priority;
};
bool addToList(const MyToDo &td);
bool addToList(string description, string date, int
priority);
bool getNextItem(MyToDo &td);
bool getNextItem(string &description, string &date, int
&priority);
bool getByPriority(MyToDo list[], int priority int
&count);
void printToDo();
#endif
#include <iostream>
#include "ToDo.h"
using namespace std;
myToDo ToDoList[MAXLIST];
int head = 0, tail = -1;
bool addToList(const myToDo &td)
{
if(head < MAXLIST)
{
if(tail ==
-1)
tail++;
ToDoList[head] =
td;
head++;
return true;
}
return false;
}
bool addTolist(string description, string date, int priority)
{
MyToDo td;
td.description = description;
td.dueDate = date;
td.priority = priority;
return addToList(td);
}
bool getNextItem(MyToDo &td)
{
if(tail >= 0)
{
if(tail >=
MAXLIST)
tail
= 0;
td =
ToDoList[tail];
tail++;
return true;
}
return false;
}
bool getNextItem(string &description, string &date,
int&priority)
{
myToDo tmp;
bool status = getNextItem(tmp);
if(status == true)
{
description =
tmp.description;
date =
tmp.dueDate;
priority =
tmp.priority;
}
return status;
}
bool getByPriority(MyToDo list[], int priority, int
&count)
{
if(tail < 0)
return
fals;
count = 0;
for(int i = 0; i
< head; i++)
{
if(ToDoList[i].priority
== priority)
{
list[count]
= ToDoList[i];
count++;
}
}
if(count > 0)
return
true;
return false;
}
void printToDo())
{
for(int i = 0; i < head; i++)
{
cout <<
"Description" << ToDoList[i].description << endl;
cout << "Due
Date" << ToDoList[i].dueDate << endl;
cout <<
"Priority" << ToDoList[i].priority << endl;
}
With this info I am asked:
Creating A Classes
This assignment is geared to check your understanding of Object Oriented Programming and class creationg. The class type is called a complex type because it is a type that you create from the primitive types of the language. Even though you create it it is still a full fledged type.
This activity is designed to support the following Learning Objective:
Instructions
In Assignment 19 you created a simple ToDo list that would hold structs that contained information about each item that would be in the list.. For this assignment I want you to take lab 19 an create a class out of it.
Your class should be called ToDoList. The definition for the ToDoList should be in the header file. The variables that make up the data section should be put in the private area of the class. The prototypes for the interface functions should be in the public area of the class.
Data Section
You can easily identify the variables that make up the data section from the fact that all of the functions use these variables. You should remember from the lecture material on classes that the data section should be the private section of the class. You should also note that if a variable should not have direct access to it then it should be in the private section. What I mean here is that if a person can directly access a variable from a function outside of the class and if modifying this variable can cause unknown problems to the operation of your class then it should be in the private section of the class.
Prototype Functions
All of the function prototypes should also go in the class. If a function is an interface into the class then it should go in the public section. For this assignment all functions are interfaces so all prototypes should go in the public section of the class.
In the previous step you prototyped all of the functions and put them in the public section of the class definition. The bodies for these functions should go in ToDoList.cpp. Don't forget to use the scope resolution operator to relate the function bodies to the prototypes in the class definition.
Constructors
You should have a default and overloaded constructors. The overloaded constructor should take 2-strings and an int which represent the descrition, dueDate, and priority.
In: Computer Science
Information Systems Business
Risks"
Identify the risks related to information systems and
suggest ways to minimize them.
Describe Quality Assurance and Quality Control.
Discuss their roles in information systems.
In: Computer Science
WRITE IN PERL
Creating a Perl Product Directory - A product "id" will be used to identify a product (the key) and the description will be stored as the value
Here is a template:
#!/usr/bin/perl
use warnings;
%products = (); # empty hash to store products in
sub getChoice(){
print("Welcome to the Product Directory\n");
print("1. Add a Product to Directory\n");
print("2. Remove a Product from Director\n");
print("3. Lookup a Product in Directory\n");
print("4. List all products\n");
print("5. Quit\n");
print("Enter your option: ")
chomp($choice = <STDIN>);
return $choice
}
$c = getChoice();
while($c ne "5"){
if($c eq "1"){
# Ask the user to enter input for a product's ID
# Ask the user to enter input for a product's description
# Add the item to the hash with the supplied ID as the key and
description as the value
}
# Options 2 - 4
}
In: Computer Science
PYTHON
Generates a list of datetimes given a list of dates and a list of times. All possible combinations of date and time are contained within the result. The result is sorted in chronological order.
For example,
Input:
>>> timetable([date(2019,9,27), date(2019,9,30)],
[time(14,10), time(10,30)])
Output:
[datetime(2019,9,27,10,30), datetime(2019,9,27,14,10),
datetime(2019,9,30,10,30), datetime(2019,9,30,14,10)]
Current code:
from datetime import date, time, datetime
def timetable(dates, times):
lis = []
for c in times:
for y in dates:
x = f"(datetime{y},{c})"
lis.append(x)
#doesn't work at all
In: Computer Science
Write a program that inputs the values of three Boolean variables, a, b, and c, from a “cin” operator (user gives the values be sure to prompt user for what they have to give!). Then the program determines the value of the conditions that follow as true or false. 1. !(a&&b&&c) && ! (a||b||c) 2. !(a||b)&&c Output should include the values of a,b,c ie 0 or 1 in the patterns that follow reflecting the Boolean logic being tested. Where “True” or “False” are in string variables. Study this example! for input of a=1 and b =0 and c=1 results in output looking like !( 1&&0&&1) && !(1|| 0||1) is False !(1||0)&&1 is False Run for the eight cases of a,b,c in Table 3.2 (both editions of text) Warning follow this output example format else you will have to redo it! Hint: your output statements will be large! Hint:. you have to use strings and variables for parts like<< “!(<
In: Computer Science
Write a program that concatenates the characters in a
two-dimensional into a set of Strings in a
one-dimensional array as described below.
main
#Request and Read in the number of rows of a two dimensional
array.
#Create the reference to the two-dimensional array.
For each row
#Request and Reads in a line of text
#Based on the length of the line create a row with the correct
number of columns (look
#back to lesson 3)
#Place each character for the String into the row, one character at
a time.
#Call concatenateColumnsPerRow with a reference to the character
two-dimensional array as a
#reference. The return will be a reference to a one-dimensional
String array.
#Call displayArray with a reference to the one-dimensional
StringArray.
concatenateColumnsPerRow
#Accepts a character two-dimensional array reference as
input.
#Concatenates the elements in each row into a String.
#Returns a one-dimensional String array, with the Strings from each
row placed into the
#corresponding row in the String array.
displayArray
#Accepts the one-dimensional String array and prints out the
Strings on separate lines
In: Computer Science
Hi i need a c++ program that can convert charactor into numbers
pseodocode
user input their name
for example john
every single charactor should have a value so it return correct result
eg:
j=2, o=1, h=7,n=2
and display these numbers
if you may need any question to ask me, i will be very happy to answer them.
Thanks!
example project close but not accurate
#include<iostream>
#include<string>
#include<exception>
#include <cstdlib>
#include<stdio.h>
#include<map>
#include <cctype>
#include<Windows.h>
#define INPUT_SIZE 8
using namespace std;
// Function to reverse a string
void reverseStr(string& str)
{
int n = str.length();
// Swap character starting from two
// corners
for (int i = 0; i < n / 2; i++)
swap(str[i], str[n - i - 1]);
}
int main() {
const std::string alpha =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
std::string text;
std::cin >> text;
// convert all lower case characters to upper
case
for (char& c : text) c = std::toupper(c);
// sum up the values of alpha characters ('A' == 1,
'B' == 2 etc.)
int sum = 0;
for (char& c : text) // for each character c in
text
{
// locate the character in
alpha
//
http://www.cplusplus.com/reference/string/string/find/
const auto pos = alpha.find(c);
if (pos != std::string::npos) //
if found (if the character is an alpha character)
// note:
non-alpha characters are ignored
{
const int value
= pos + 1; // +1 because position of 'A' is 0, value of 'A' is
1
sum +=
value;
cout <<
sum;
}
}
In: Computer Science