Sunday, May 31, 2020

Java Inventory Program 1-3 - Free Essay Example

Instructions: This document contains the tutorials for Inventory programs 1-3. These programs will be separated by pages between each program in addition to being color coded. NOTE: This information will need to be copy and pasted into a notepad document. For your own benefit, please do not plagiarize this work. // Inventory program part 1 Inventory1. java // // A product class that stores and makes the name of the product, the item number, the number of units in stock, and the price of each unit retrievable. // Java app. that displays the product name, the item number, price of each unit, and the value of inventory. mport java. util. Scanner; import java. text. NumberFormat; import java. text. DecimalFormat; class Product { private String name; // product name private int number; // product part number private double price; // product unit price private int quantity; // products in stock public Product(String N, int Num, double P, int Q) // Constructor { name = N; number = Num; pric e = P; quantity = Q; } // Getters and setters public void setName(String N) // method to set product name { name = N; } public String getName() // method to get product name { return name; } ublic void setNumber(int Num) // method to set part number { number = Num; } public int getNumber() // method to get part number { return number; } public void setPrice(double P) // method to set unit price { price = P; } public double getPrice() // method to get unit price { return price; } public void setQuantity(int Q) // method to set product quantity { quantity = Q; } public int getQuantity() // method to get product quantity { return quantity; } public double getTotalPrice() // return the total value of the inventory { double TotalPrice = quantity * price; eturn TotalPrice; } } // End class product public class Inventory1 { // starts execution of Inventory program public static void main(String args[]) { // create Scanner to obtain input from command window Scanner input = new Scanner(Syst em. in); // create NumberFormat to obtain input from command window NumberFormat currency = new DecimalFormat(u00A4 #. 00); System. out. println(); // outputs a blank line System. out. print(Enter the name of the product: ); // prompt for name of product String N = input. nextLine(); // read product name from user System. out. println(); // outputs a blank line System. out. println(); // outputs a blank line System. out. print(Enter the product number for the product: ); // prompt for product number int Num = input. nextInt(); // read product number from user System. out. println(); // outputs a blank line System. out. println(); // outputs a blank line System. out. print(Enter the unit price for the product: $ ); // prompt for unit price double P = input. nextDouble(); //read product unit price from user System. out. println(); // outputs a blank line System. out. rintln(); // outputs a blank line System. out. print(Enter number of units of product in stock: ); // prompt for num ber of units in stock int Q = input. nextInt(); // read number of units in stock System. out. println(); // outputs a blank line double TotalPrice = Q * P; System. out. println(); // outputs a blank line System. out. println(Product name: + N); System. out. println(); // outputs blank line System. out. println(Product number: + Num); System. out. println(); // outputs blank line System. out. println(Products unit price: + currency. format(P)); System. out. println(); // outputs blank line System. out. println(The value of the inventory is + currency. format(TotalPrice)); } // End method main } // End class Inventory1 // Inventory program part 2 Inventory2. java // // Uses a method to calculate the value of the entire inventory // Uses another method to sort the array items by the name of the product // Output displays all product information as well as value of entire inventory import java. util. *; import java. text. NumberFormat; import java. text. DecimalFormat; class Produ ct implements Comparable { rivate String name; // class variable that stores the item name private int number; // class variable that stores the item number private int quantity; // class variable that stores the quantity in stock private double price; // class variable that stores the item price public Product(String N, int Num, int Q, double P) // Constructor for the Supplies class { name = N; number = Num; quantity = Q; price = P; } // Getters and setters public void setName(String N) // method to set product name { name = N; } public String getName() // method to get product name { return name; } ublic void setNumber(int Num) // method to set part number { number = Num; } public int getNumber() // method to get part number { return number; } public void setPrice(double P) // method to set unit price { price = P; } public double getPrice() // method to get unit price { return price; } public void setQuantity(int Q) // method to set product quantity { quantity = Q; } public int ge tQuantity() // method to get product quantity { return quantity; } public double calculateInventoryValue() // method to calculate the value of the inventory { return price * quantity; } // sorts Products by their product name. ublic int compareTo (Object o) { Product s = (Product)o; return name. compareTo(s. getName()); } public String toString() // returns a string representation of the product information { System. out. println(); return Name: +name+ Number: +number+ Price: $ + price + Quantity: +quantity+ Value: $ +calculateInventoryValue(); } } // End class product public class Inventory2 { // main methods begins execution of java application public static void main( String args[]) { Product[] supplies = new Product[6]; // create array of office supllies // inventory of office supplies Product p1 = new Product(Pens, 1, 76, . 5); Product p2 = new Product(Markers, 2, 43, 1. 00); Product p3 = new Product(White-out, 3, 17, 2. 00); Product p4 = new Product(Pencils, 4, 91, . 15) ; Product p5 = new Product(Crayons, 5, 62, . 99); Product p6 = new Product(Paint Set, 6, 12, 19. 99); supplies[0] = p1; supplies[1] = p2; supplies[2] = p3; supplies[3] = p4; supplies[4] = p5; supplies[5] = p6; double total = 0. 0; for(int i= 0; i 6;i++) { total = total + supplies[i]. calculateInventoryValue(); } // Display the total value of the inventory on the screen System. out. printf(Total value of the entire inventory is: $ %. f, total); System. out. println(); Arrays. sort(supplies); for(Product s: supplies) { System. out. println(s); System. out. println(); } } // end main method }//end class Inventory2 //Inventory Program Part 3 Inventory3. java // //Uses a subclass that adds an additional feature //Uses a method in the subclass to calculate the value of the inventory and adds a 5% restocking fee //to the value of each product //Displays output, sorted by name, including additional feature and 5% restocking fee class Inventory { String number; //stores product number Strin g name; //stores product name nt quantity; //stores quanity in stock double price; //stores product price double restockFee; //stores product restocking fee public Inventory(String Num, String N, int Q, double P, double F) { name = N; number = Num; quantity = Q; price = P; restockFee = F; } public void setName(String N) //Method to set and get the product name { name = N; } public String getName() { return name; } public void setNumber(String Num) //Method to set and get the product number { number = Num; } public String getNumber() { return number; } public void setQuantity(int Q) //Method to set and get the quantity in stock { quantity = Q; public int getQuantity() { return quantity; } public void setPrice(double P) //Method to set and get the price of product { price = P; } public double getPrice() { return price; } public void setRestockFee(double F) //Method to set and get the product restocking fee { restockFee = F; } public double getRestockFee() { return restockFee; } public double getInventoryValue() //Method to calculate the value of the in stock inventory { return price * quantity; } public static double getTotalValueOfAllInventory(Inventory [] inv) { double tot = 0. 00; for(int i = 0; i inv. length; i++) { tot += inv[i]. etInventoryValue(); } return tot; } public String toString() { return Product Name: +name + Product Number: +number+ Product Price: $+price+ Quantity in Stock: +quantity + Inventory Value: $+getInventoryValue(); } } // end Inventory Class class Product extends Inventory { String brand;// Subclass to add the products name brand double restockFee;// Restock fee to add to the inventory value // initialize constructor public Product(String brand, double restockFee, String Num, String N, int Q, double P, double F) { super(Num, N, Q, P, F); this. brand = brand; this. restockFee = restockFee; } ublic double getInventoryValue() // Figures total inventory value including restocking fee { return super. getInventoryValue() + (super. ge tInventoryValue() * restockFee); } public String toString() { StringBuffer sb = new StringBuffer( Brand: ). append(brand). append( ); sb. append(super. toString()); return sb. toString(); } } // End Product Class public class Inventory3 { public static void main(String args[]) { double restockFee = 0. 05; Product[] inventory = new Product[6]; //create array of Office Supplies inventory[0] = new Product(Gel Glide , restockFee, 1,Rollerball Pens , 26, 1. 00, . 5 ); inventory[1] = new Product(Sharpie , restockFee, 2,Markers , 23, 2. 00, 0. 10 ); inventory[2] = new Product(Bic, restockFee, 3,White-out, 7, 3. 00, . 15); inventory[3] = new Product(Generic, restockFee,4,Lead Pencils , 12, 4. 00, . 20); inventory[4] = new Product(Crayola, restockFee, 5, Crayons, 12, 5. 00, . 25); inventory[5] = new Product(Rose Art, restockFee, 6, Paint Set, 12, 6. 00, . 30); Product temp[] = new Product[1]; System. out. print( Thank you for using Office Supply Inventory Program ); // display title Syst em. out. println(); System. ut. println(); // Sorting the Inventory Information for(int j = 0; j inventory. length 1; j++) { for(int k = 0; k inventory. length 1; k++) { if(inventory[k]. getName(). compareToIgnoreCase(inventory[k+1]. getName()) 0) { temp[0] = inventory[k]; inventory[k] = inventory[k+1]; inventory[k+1] = temp[0]; } } } // Print the Inventory Information for(int j = 0; j inventory. length; j++) { System. out. println(inventory[j]. toString()); } System. out. printf( Total inventory value: $%. 2f , Inventory. getTotalValueOfAllInventory(inventory)); return; } } // End Inventory3 Class

Saturday, May 16, 2020

How to Take Good News Interview Notes

Even in an age of digital voice recorders, a reporter’s notebook and pen are still necessary tools for print and online journalists. Voice recorders are great for capturing every quote accurately, but transcribing interviews from them can often take too long, especially when you’re on a tight deadline. (Read more about voice recorders vs. notebooks here.) Still, many beginning reporters complain that with a notepad and pen they can never take down everything a source says in an interview, and they worry about writing fast enough in order to get quotes exactly right. So here are five tips for taking good notes. 1. Be Thorough – But Not Stenographic You always want to take the most thorough notes possible. But remember, you’re not a stenographer. You don’t have to take down absolutely everything a source says. Keep in mind that you’re probably not going to use everything they say in your story. So don’t worry if you miss a few things here and there. 2. Jot Down the ‘Good’ Quotes Watch an experienced reporter doing an interview, and you’ll probably notice that she isn’t constantly scribbling notes. That’s because seasoned reporters learn to listen for the â€Å"good quotes† – the ones they’re likely to use - and not worry about the rest. The more interviews you do, the better you’ll get at writing down the best quotes, and at filtering out the rest. 3. Be Accurate - But Don’t Sweat Every Word You always want to be as accurate as possible when taking notes. But don’t worry if you miss a â€Å"the,† â€Å"and,† â€Å"but† or â€Å"also† here and there. No one expects you to get every quote exactly right, word-for-word, especially when you’re on a tight deadline, doing interviews at the scene of a breaking news event. It IS important to be accurate get the meaning of what someone says. So if they say, â€Å"I hate the new law,† you certainly don’t want to quote them as saying they love it. Also, when writing your story, don’t be afraid to paraphrase (put in your own words) something a source says if you’re not sure you got the quote exactly right. 4. Repeat That, Please If an interview subject talks fast or if you think you misheard something they said, don’t be afraid to ask them to repeat it. This can also be a good rule of thumb if a source says something especially provocative or controversial. â€Å"Let me get this straight – are you saying that†¦Ã¢â‚¬  is something reporters are often heard to say during interviews. Asking a source to repeat something is also a good idea if youre not sure you understand what theyve said, or if theyve said something in a really jargony, overly complicated way. For instance, if a police officer tells you a suspect made egress from the domicile and was apprehended following a foot chase, ask him to put that into plain English, which will probably be something to the effect of, the suspect ran out of the house. We ran after him and caught him. Thats a better quote for your story and one thats easier to take down in your notes. 5. Highlight the Good Stuff Once the interview is done, go back over your notes and use a checkmark to highlight the main points and quotes that you’re most likely to use. Do this right after the interview when your notes are still fresh.

Wednesday, May 6, 2020

Bobs Meltdown Case Analysis - 1471 Words

Q.1 – Briefly describe the dilemma presented in this case study. Who are the key players and what are some of the antecedents that have led to the present problem? Ans. When the best manager, takes certain actions which go against the core values of the company, it becomes really difficult for the management to make a fair judgement. They are stuck in a dilemma of what would be a better judgement. As a leader, it is very important to be fair and impartial to your team members. And so is the dilemma presented in the case, Bob’s Meltdown, Nicholas G. Carr. The key players in this case are1. Annette Innella 2. Robert Dunn 3. Jay Nguyen Annette Innella is the Vice President, Knowledge Management at Concord Machines. She was recently hired by†¦show more content†¦He is in a huge dilemma and feels he might be held accountable for the current problem. The antecedents that might have lead to the whole scenario are1- Bob has been under a lot of work pressure, as a quart er million had been taken out of his budget, and he had to travel very often for work purpose. 2- Jay did not give Annette a proper orientation to the company, and its culture. He should have also introduced her to all the VPs and other important personnel of the company. 3- Bob was facing certain problems in his personal life, which triggered his anger. 4- Bob was being be threatened by Annette’s new ideas. 5- Annette did not use a proper communication channel. 6- Jay lacked communication skills. 7- Jay is not a good leader. He was very ambivalent. He did not have his fundamental objectives well stated, and did not communicate his concerns to the employees senior managers. Therefore, all these incidents summed up, and lead to the present problem. Q2. Describe the corporate culture of Concord machines. Is the corporate culture of the company in any way linked to the ethical dilemma presented in the case? Explain. Ans. The corporate culture of Concord machines can be best described using the Douglasian Cultural Framework (1970), given by Mary Douglas. According to DCF, culture can be classified using two social dimensions: group and grid. The horizontal group axis representsShow MoreRelatedManagement Department At Concord Machines1650 Words   |  7 PagesAnnette became speechless as Bob starts ranting about how she does not know anything about Concord Machines and she’s ruining the company. Before he rushes out of the cafeteria he throws his plate into the wall making an awful mess. On account of Bob’s ridiculous stunt, Annette lost her appetite. Alex knew it was best to kindly escort her back to her office. While in her office, she speaks with Nathan Singer, the head of HR and eventually received a call from the CEO after word got back to him.Read MoreCase Commentary10898 Words   |  44 PagesUniversity College Cork Review www.ucc.ie Case commentary provided on: Do Something-He’s About to Snap by Eileen Roche Big Shoes to Fill by Michael Beer Bob’s Meltdown by Nicholas G. Carr We Googled You by Diane Coutu When Steve Becomes Stephanie by Loren Gary and Brian Elliot Moonlighter by Bronwyn Fryer Micromanager by Bronwyn Fryer All the Wrong Moves by David A. Garvin Riding the Celtic Tiger by Eileen Roche The Best of Intentions by John Humphreys Steve Carmody HumanRead MoreAccounting12472 Words   |  50 PagesErnst Young â€Å"Business Leaders of Tomorrow† Case Contest Bigg Glowbell (BG) Case Study Table of Contents Table of Contents ................................................................................................................................................ 1 Assignment Background .................................................................................................................................. 2 Bigg-Glowbell Overview ..................................................Read MoreProject Mgmt296381 Words   |  1186 PagesLeadership Chapter 2 Organization Strategy and Project Selection 1.4 Projects and programs (.2) 1.4.1 Managing the portfolio 1.4.3 Strategy and projects 2.3 Stakeholders and review boards 12.1 RFP’s and vendor selection (.3.4.5) 11.2.2.6 SWAT analysis 6.5.2.7 Schedule compression 9.4.2.5 Leadership skills G.1 Project leadership 10.1 Stakeholder management Chapter 11 Teams Chapter 3 Organization: Structure and Culture 2.4.1 Organization cultures [G.7] 2.4.2 Organization structure

Tuesday, May 5, 2020

Graph Visualization Review Paper for Graphics-myassignmenthelp

Question: Discuss aboit theGraph Visualization Review Paper for Graphics. Answer: Introduction: The review is done on the article Graph Visualization and Navigation in Information Visualization: A Survey. The review is done mainly to study briefly about Graph Visualization in Information Visualization. The main issue that is related with Graph Visualization is reviewed from the article and different layouts of Graph Visualization (Herman, Melanon, and Marshall 2000). The technical approach of Graph Visualization is done and their pros and cons in terms of computational cost, aesthetics rules and process of human recognition are reviewed from the article and the navigation techniques Graph Visualization is also reviewed. Graph Visualization definition and related issues: Information Visualization gets great advantage from Graph Visualization. Transforming some information into a graphical representation makes the data more highlighting and accurate. The process by which structural information can be transformed into diagram is known as Graph Visualization. In computer system, Graph Visualization is considered as file hierarchy. There are issues to represent structured into graphs or diagrams. The main issue that arises from Graph Visualization is the difficult to view the diagram. Large diagrams are difficult to manage and study. To view such a large diagram is time taking and gives rise to many issues. In large graphical diagrams, identifying and displaying the layouts is done correctly but problem arises with the usability which makes it difficult to make a difference between nodes and edges. On the other hand, there is a different view for graphs that are small sized. Small size graphs are easy to comprehend and handle. Large graph shows all the detail structure of data but are difficult to comprehend. So the main issue lies in the comprehension process of Graph Visualization that has larger images. To detail the data in small images are easier but most of the graph comes as large images which creates an issue for comprehension. Tree layouts of Graph Visualization and their categories: Mainly four layouts of Graph Visualization are described in the article. The four categories of Graph Visualization are spanning tree layout, horizontal tree layout, classical tree layout and spanning tree layout. The four layout of Graph Visualization can be categorized under three sections. The sections are classical or traditional section, tree spanning section and horizontal 3-D section. The elements that are present in the traditional section of layout have elements like H-Tree, balloon layout and radial layout. The first three layouts that is used for information visualization are categorized mainly into traditional form. The three layout of Graph Visualization are applicable as less or non hierarchical due to which they can also be defined as classical ones. Comparing traditional layout with the spanning tree layout, spanning tree is considered as most important layout of tree. There is a main reason for which 3-D layout and the hyperbolic layout of the tree structure is combi ned together. The reason behind this is that with the help of 3-D graphing, the layout of hyperbolic tree represents the data in a proper way. Main Technical features of each approach: The main feature that is related with technical aspect of traditional tree layout is that it has ability to depict the structural data in top-down approach. There is also an ability to show the data in left to right tree layout. The data that is structural in Graph Visualization are presented as a grid like structure. This helps to draw the image as a hierarchical manner that has less impact. The technical feature that lies behind the spanning tree layout is that all the nodes of the graph are used by spanning trees to get a view of the data properly. To visit the nodes of the graph by the process of BFS (Breadth First Search) and collecting all the edges of the graph for forming a tree is used for making a spanning tree. There also lies a technical feature in hyperbolic tree approach. The hyperbolic tree approach uses 3-D technology for showing the data as a tree layout. Not only 3-D technology is viewed by hyperbolic tree, also 2-D technology can be viewed by hyperbolic tree. Inter action in the mind is used in hyperbolic tree for representing the data. Pros and Cons of the approaches: The main benefit of traditional tree layout is the data which is visualized in intrinsic hierarchy is reflected by its help. To visualize the data in different layout, small size of graphs are made in traditional layout. The classical tree presentation layout also makes exploration of graphs easier with less hierarchical way. The main existing drawback of traditional tree layout approach is that the structure of the given data is difficult to recognize. Testing is required in traditional approach. Testing process includes examining several planetary o nodes which creates an issue in the traditional approach. In terms of aesthetic rules and also human cognition, the approach of traditional tree layout builds a problem. In terms of computation cost and space utilization it gives an advantage in its efficiency. The benefit of using spanning tree layout approach is that it uses less size structural data for Graph Visualization. All the nodes of the graph that are made from the real graph are used in the spanning tree. To bring different layout with different weight of same graph, different weight functions are used b y spanning trees. 3-D visualization is used in spanning tree approach. The disadvantage of spanning tree is that it creates a problem in graph visualizing. The problem is that the edges and nodes of a graph collude with one other in 3-D visualization setting. The conclusion that arises is that spanning tree approach of Graph Visualization gives an advantage to aesthetic rules, space utilization and computing cost, but it creates a disadvantage for human cognition. The advantage of layout of hyperbolic tree is that it helps to create the distorted view of image. Moreover, the images that are distorted help to view applications in real life mainly for large trees. The disadvantage of hyperbolic tree layout approach in Graph Visualization is that it is difficult to know the layout because it has very complex background and is mysterious. Space utilization is an advantage with hyperbolic tree approach, but it pays a disadvantage in other aspects such as human cognition, computing cost and aesthetic rules. Navigation techniques: Three types of navigation techniques are studied in this article. The techniques are zoom and pan technique, focus and context technique and the incremental exploration technique. The three techniques that are identified can be categorized by navigation techniques. From the review of the navigation techniques, the categorization can be done mainly in the context and focus technique. The reasons for making the categorization intact are that it helps to categorize all the techniques clearly. This article shows all the categorization better. The technique of zoom and pan help to navigate a given graph in semantic and geometric way. The technique of context and focus navigates the graph in clear context. In incremental navigation, images are displayed which makes this navigation as one of the most important navigation technique in Graph Visualization. Main technical features of navigation techniques: The technical feature that arises in zoom and pan navigation techniques is that by the process of semantic zooming and geometric zooming, large images can be explored. The screen contents in Zoom and pan technique is re-adjusted and the screen can also be adjusted. The technical problem with context and focus technique is that the technique of zoom and pan is more complimented in this technique which makes it more useful. The contents of web based are adjusted in the incremental technique which provides as the main technical feature. Pros and Cons of Navigation approaches: The benefit of zoom and pan technique is that by the process of semantic zooming and geometric zooming, large images can be explored in this technique. The geometric technique blows up content of the graph but the screen resolution is adjusted with semantic technique and gives a clear picture. The disadvantage of zoom and pan technique is that problem arises mainly in contextual loss of data and as well as usability. The images are changed totally and credible situations are created via real time response. The real time response, human cognition process and computational cost favor zoom and pan technique. In context and focus techniques, the advantage is that the focus+context techniques enhances the zoom+pan technique. Focus on objects which need more detailing in zoom+pan techniques are concerned in context and focus technique. The disadvantage of this technique is that it uses general curve to focus on objects which are not focused by standard graphic system. Real time response is an advantage and computational cost and human cognition is a disadvantage in this technique. The advantage of incremental navigation technique is that it allows the user to focus only on a single part of large graph and other parts can also be focused and zoomed when there is a need. The problem that arises in incremental navigation technique is that if the algorithm that is used for single frame is not same, problem such as saturation of image content arises. Conclusion: The review that is done from the article gives a clear view of Graph Visualization and their related issues. The navigation techniques of data visualization are described. To display structural data in image form, no other technique other than graph visualization is better. The four tree layouts of Graph Visualization are described and the tree layouts are further categorized. The advantage and the disadvantages of the tree layout and the navigations techniques are also reviewed from the article. References: Herman, I., Melanon, G. and Marshall, M.S., 2000. Graph visualization and navigation in information visualization: A survey.IEEE Transactions on visualization and computer graphics,6(1), pp.24-43.