C++ Code While Loops.
Ask user for file and open file.
Do priming read and make a while loop that: 1. Reads in numbers. 2. Counts how many there is. 3. Also for every 10 numbers in the file, print out the average of those 10 numbers. Ex: (If 20 numbers in the file. "With 10 numbers the average is .... and With 20 numbers the average is" and EX for a file with 5 numbers "There are 5 numbers in this file with an average of ..."
After the loop calculate and print the average of all nums in the file.
In: Computer Science
In this case study, your task is to study different search algorithms to solve the N-Queens Problem which has been presented in class. We will focus on the incremental formulation in which we add a queen to any square in the leftmost empty column that is not attacked by any other queen.
Question: Using Hill Climbing (HC) algorithms, how many steps are needed to find the solution for the 12-Queens Problem? What is it? Draw on an 12x12 table. Show your steps.
In: Computer Science
Create a class Superheros
member: Map heroMap //key = name, value = weapon (or get creative)
member: Set< String> powerSet //superpowers
*** initialize your map & set – preferably in constructor ***
/* One liner to ‘put’ the key, value pair you’re passing in.. */
Method: void putEntryInMap (String key, String value) {}
/* Another 1 liner – well maybe 2. (1) ‘get’ the value from the map with the key (2) capture that value and return it (to your testHarness) */
Method: String getEntryFromMap (String key) {}
/* Another 1/2 liner (1) ‘remove’ the value from the map with the key (2) check if you have actually removed your value from your map by printing the results of heroMap.hasKey(key) */
Method: void removeEntryFromMap (String key){}
/* For all the marbles… you need to: Get the keyset from your map. This will give you a set of all the keys in the map. With your keyset, iterate over each element in your set & in the loop ‘get’ the value for that key from your map & print it. (Note you will need to create a local Set variable in this method). */
Method void displayAllMapEntries(){}
/* add an element to your set */
Method void addToSet(String name){}
/* remove an element from your set */
Method void removeFromSet(String name){}
/* iterate over the elements in your set and print each */
Method void printSet(){}
In your testHarness:
- create a Superhero instance ( make sure your map & set are initialized in your Superhero ctor ) - invoke one of your Superhero methods to ‘put’ a few entries ( 4 or more ) in your map.
- invoke one of your Superhero methods to ‘display’ your cat entries - invoke one of your Superhero methods ‘get’ an entry
- capture the value returned in your harness & print it out. - invoke one of your Superhero methods ‘remove’ an entry - invoke one of your Superhero methods to ‘display’ each entry (do not just print the map)
- invoke one of your Superhero methods to ‘add’ a few entries into your set
Make sure you add a couple duplicate names!
- invoke one of your Superhero methods to ‘display’ your set (do not just print the set) - invoke one of your Superhero methods to ‘remove’ an entry from your set - invoke one of your Superhero methods to ‘display’ your updated set (do not just print the set)
In: Computer Science
JAVA question here, and thank you. I need ot update the following classes an fixme's on this.canvas = null etc.
Thanks!
import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Paint.Style; import edu.luc.etl.cs313.android.shapes.model.*; /** * A Visitor for drawing a shape to an Android canvas. */ public class Draw implements Visitor<Void> { // TODO entirely your job (except onCircle) private final Canvas canvas; private final Paint paint; public Draw(final Canvas canvas, final Paint paint) { this.canvas = null; // FIXME this.paint = null; // FIXME paint.setStyle(Style.STROKE); } @Override public Void onCircle(final Circle c) { canvas.drawCircle(0, 0, c.getRadius(), paint); return null; } @Override public Void onStrokeColor(final StrokeColor c) { return null; } @Override public Void onFill(final Fill f) { return null; } @Override public Void onGroup(final Group g) { return null; } @Override public Void onLocation(final Location l) { return null; } @Override public Void onRectangle(final Rectangle r) { return null; } @Override public Void onOutline(Outline o) { return null; } @Override public Void onPolygon(final Polygon s) { final float[] pts = null; canvas.drawLines(pts, paint); return null; } }
In: Computer Science
As a Sys admin you were asked to plan a network including three subnets each one for a different usage. You may plan the net for the organization you are familiar with, or an imaginary net you dreamed to implement. Be specific with your plan including all IP Addresses hosts. Include a graphic layout of your plan.
In: Computer Science
In this case study, your task is to study different search algorithms to solve the N-Queens Problem which has been presented in class. We will focus on the incremental formulation in which we add a queen to any square in the leftmost empty column that is not attacked by any other queen.
Question: Does Simulated Annealing (SA) algorithms (with 10 iterations) solve the 14-Queens Problem? What about Simulated Annealing (SA) algorithms (with 50 iterations). Show your answer.
In: Computer Science
Create a java program with class Customer: Name, Surname, ID (incremental ID by 1 for each new customer), Email, Phone, Address. The program must create New customer, and Print information for customer with a certain ID.
In: Computer Science
**I need rewrite the answer with unique word ... thank you
Q1:
What strategic competitive benefits do you see in a company’s use of extranets?
Answer :
An extranet can increase the value of your organization by helping you convey and work together more viably with customers, clients, and accomplices. Especially in the business-to-business market, an extranet can give your organization an edge over the opposition and set aside you cash by smoothing out conventional business capacities and reducing overhead expenses.
Extranets accomplish a similar work as an intranet, however it additionally takes into account correspondence on the planet. An extranet permits client, sellers and providers to get to the data through the PC framework. The organizations use extranets to get strategic like:
1. Expanded efficiency: As you mechanize measures that were generally done physically, bottlenecks will vanish and your organization's profitability will increment. Basic data won't lose all sense of direction via the post office or covered in an email inbox, and occupied representatives won't miss or overlook key functions. An extranet can, for instance, screen business exercises and trigger explicit activities, for example, naturally submitting a request with a provider when your stock dips under a specific level.
2. More limited chance to advertise: In the event that your business isn't moving at "Web speed," you hazard being abandoned. An extranet can assist you with getting your items to showcase all the more rapidly by making proposition and determinations accessible to providers, and surrendering customers and accomplices to-date data on current undertakings.
3. Construct client loyalty : Extranets make business simpler for your clients. The more you make convenient, precise data accessible to your clients, the more probable it is you'll keep their business
4.Reduced stock : One of the signs of a business-to-business extranet is its effect on flexibly chain the board. By connecting your stock framework straightforwardly to a provider, you can handle arranges when the framework realizes you need them, in this manner lessening the stock you keep available and making the acquirement cycle more proficient.
Q2:
Data Modelling is the primary step in the process of database design. Compare and contrast Conceptual data model versus Physical data model. Illustrates with help of example to list down data (entities), relationship among data and constraints on data.
Data modelling is the first step in database design. It is the process of creating a data model for the data to be stored in a database. It is considered as the high level. It is also referred as the conceptual design. Data modeling helps in the visual representation of data and enforces business rules, regulatory compliances, and government policies on the data. Data Models ensure consistency in naming conventions, default values, semantics, security while ensuring quality of the data..It describes the data contained in the database, relationship between data items and the constraints on the data.
Conceptual data model
This Data Model defines WHAT the system contains. The purpose is to organize, scope and define business concepts and rules. It is an organized view of database concepts and their relationships.. It does not have the complete data of the database. It is used to create entities, their attributes, and relationships.
·Includes the important entities and the relationships among them.
·No attribute is specified.
·No primary key is specified.
Physical Data model
This Data Model describes HOW the system will be implemented using a specific DBMS system. The purpose is actual implementation of the database.It offers database abstraction and helps generate the schema. The physical data model also helps in visualizing database structure by replicating database column keys, constraints, indexes, triggers and other schemas.
In: Computer Science
“The software design/development team and test engineers need to develop a strategy for planning, design, execution, data collection, and test evaluation”. Discuss this statement.
please no handwrite
please no picture
In: Computer Science
PYTHON WHILE Write a program that prompts for and reads the number ? of spheres to be processed. If ?≤0 your program must display an error message and terminate; otherwise it does the following for ? times:
In: Computer Science
Java question: I need to fix a point class (code below) Thank you!
/** * A point, implemented as a location without a shape. */ public class Point extends Location { // TODO your job // HINT: use a circle with radius 0 as the shape! public Point(final int x, final int y) { super(-1, -1, null); assert x >= 0; assert y >= 0; } }
In: Computer Science
A = [-1000:1:1000] write a script file that gives the positive numbers greater than 480 and divisible by 3. Hint: Use this command if A(i)>480&&(rem(A(i),3)==0) and indeed, if is always accompanied by an end
In: Computer Science
In: Computer Science
In: Computer Science
What role should measurement play in a good testing strategy?
In: Computer Science