Premium Essay

Arraylist, Hashmap, Queue Student Assignment

In: Computers and Technology

Submitted By doyers
Words 366
Pages 2
import java.text.DecimalFormat; import java.util.ArrayList;

public class Student {

// Declare the variables

private String name; private ArrayList homeworks;

// Constructor with one argument

public Student(String name) { this.name = name; this.homeworks = new ArrayList(); }

// setter or mutator methods change the field values public void setName(String name) { this.name = name; }

//Accessor or getter methods provide the field values public String getName() { return name; }

public void addHomeworkGrade(int newGrade){ this.homeworks.add(newGrade); }

//average homework score public double getComputeAverage(){ int total = 0; //loop through homeworks, add to total for(Integer grade : this.homeworks){ total += grade; }

//calculate average double average = total / (double)this.homeworks.size(); return average; }

//Override the toString method to return the string representation public String toString() { DecimalFormat pattern = new DecimalFormat("0.00"); return (getName() + "'s average grade is " + pattern.format(getComputeAverage()));

}
}
------------------------

import java.io.FileReader; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Queue; import java.util.Set; import java.util.StringTokenizer;

public class Test {

public static void main(String[] args) { String inputFileName = "data.txt"; FileReader fileReader = null; // Create the FileReader object try { fileReader = new FileReader(inputFileName); } catch (FileNotFoundException e) { e.printStackTrace(); }

Queue studentQueue = new LinkedList(); HashMap studentMap = new HashMap();…...

Similar Documents

Premium Essay

Student

...staying power in the market by making necessary adjustments to keep up “with the times”. All play a paramount role in realizing success in the market. Further, Six Sigma, a process improvement discipline, helps organizations remove redundancy in processes as well as waste. This helps ensure sustainability for an organization. Operational Efficiency: is defined as a business’ ability to offer customers the best products and/or services at the lowest possible cost. Several organizations utilize “industry best practices” in order to streamline (lean) core business processes allowing them to react swiftly to changes in the market. Businesses also for corporate alliances in order to ensure/promote efficiency, this falls back to previous week’s assignments as we learned that just because you can perform all tasks, it isn’t necessarily beneficial. It is fundamentally prudent for one to focus on one task that you have perfected and let others do tasks they are proficient at. This increases operational and economic efficiency. Ensuring a reduction in redundancy in processes as well as improving employee retention is also factors that help ensure high operational efficiency. Operational Effectiveness: involves core questions such as what, how, and how much resources are necessary to produce an end product or service within an established time frame allows businesses to ascertain their operational effectiveness. The methodology for measurement is as such: 1. Cost benefit analysis:......

Words: 919 - Pages: 4

Free Essay

Students

...Types of College Students You have just graduated from high school and passed the Standard Academic Test. Your application to college has been accepted and it’s your first day at class. It is most likely you will encounter three types of college students on your campus. The three types of college students are usually called the jocks, the nerds, and the normal people. The reason for this essay is to clear up some concepts regarding the three types of college students. One group, The Jocks, is the show-off type of people who puts off their homework assignments until the last minute. Once the assignment is completed at the last minute, the assignment is usually scored a low grade. The reason for this is because the jocks are always partying, going out on dates, or having fun with their sorority. The jocks wear anything to include torn jeans/shirts, work down sneakers or boots and cheap, expensive-looking jacket. The second group, known campus-wide, is the nerds because they are obsessed with books, constantly studying and learning about their interests. The nerds are usually annoying with their obnoxious laughter regarding a really stupid joke. The nerds wear a nice shirt with a bow tie, or a tie and a nicely ironed dress pants and always has a pocket protector to prevent ink stains from their pens. The nerd spends their school night with a tight schedule for recreation, school homework, and learning new things that captures their interests. Computer programming,......

Words: 463 - Pages: 2

Premium Essay

Queues Management

...The waiting line or queue management is a critical part of service industry. It deals with issue of treatment of customers in sense reduce wait time and improvement of service. Queue management deals with cases where the customer arrival is random; therefore, service rendered to them is also random. A service organization can reduce cost and thus improve profitability by efficient queue management. A cost is associated with customer waiting in line and there is cost associated with adding new counters to reduce service time. Queue management looks to address this trade off and offer solutions to management. Queuing System To solve problems related to queue management it is important to understand characteristics of the queue. Some common queue situations are waiting in line for service in super-market or banks, waiting for results from computer and waiting in line for bus or commuter rail. General premise of queue theory is that there are limited resources for a given population of customers and addition of a new service line will increase the cost aspect to the business. A typical queue system has the following: Arrival Process: As the name suggests an arrival process look at different components of customer arrival. Customer arrival could in single, batch or bulk, arrival as distribution of time, arrival in finite population or infinite population. Service Mechanism: this looks at available resources for customer service, queue structure to avail the service......

Words: 658 - Pages: 3

Premium Essay

Student

...MOUNT KENYA UNIVERSITY VIRTUAL CAMPUS DEPARTMENT OF MANAGEMENT MASTER OF ARTS, GOVERNANCE AND ETHICS CONTINUOUS ASSESSMENT TEST I MDS 521 GOVERNANCE AND LEADERSHIP SKILLS DEVELOPMENT Instruction to students * Deadline October 30th 2013 or earlier * Assignment should be typed in prose not on bullet points * Font: new times roman * 12 points * Normal margins * minimum of 30 pages 1.5 spaced * Should indicate at least a minimum of 5 reference books. * No late submission * Plagiary will lead to no grade Question Critique leadership in the public sector and suggest reforms that are needed to ensure that vision 2030 is realized. Be careful to hinge your discussion on the pillars of Kenya’s vision 2030.20marks MOUNT KENYA UNIVERSITY VIRTUAL CAMPUS DEPARTMENT OF MANAGEMENT MASTER OF ARTS, GOVERNANCE AND ETHICS CONTINUOUS ASSESSMENT TEST II MDS 521 GOVERNANCE AND LEADERSHIP SKILLS DEVELOPMENT Instruction to students * Deadline November 15th 2013 or earlier * Assignment should be typed in prose not on bullet points * Font: new times roman * 12 points * Normal margins * minimum of 30 pages 1.5 spaced * Should indicate at least a minimum of 5 reference books. * No late submission * Plagiary will lead to no grade Question Using the public/private synergy model, come up with a case study and discuss the synergy or lethargy brought about by of...

Words: 1313 - Pages: 6

Premium Essay

Student

...BDS 4614, Management Decision Science Trimester 2, 2013/2014 Due date: 10/01/2014 (Week 12) before 12pm General information: Organisation | Individual | Assessment | This assignment contributes to 15% to the total coursework marks. | Student Learning Time | This assignment shall take 6 hours to complete. | Submission requirements | Submission to | Mr.Oh | | Cover page | Please use the attached cover page | | Typeface/Font | Times new Roman | | Font size | 12 | | Line spacing | 1.5 | | Margins | Top: 2.54 cm; Bottom: 2.54cm; Left: 2.54cm; Right: 2.54cm | | Reference format | APA Style | | Binding | Stapled/Comb binding | Mapping of assignment learning outcomes to subject learning outcomes: Assignment’s Learning OutcomesUpon completion of this assignment, students should be able to: | Subject Learning OutcomesUpon completion of this subject, students should be able to: | 1 | Structure LP problems using the transportation model | LO2 | Diagnose the business decision making problems and formulate as a mathematical problems | 2. | Use Excel Spread sheets to solve Linear Programming Problem | LO3 | Apply appropriate tools for problem solving | 3. | Perform Monte Carlo Simulation Using QM for Window software or Excel Spread Sheets. | | | Assessment rubrics Score | Description | 80% - 100% | * Demonstrate complete understanding of the problem * Original contribution * All requirements are included. * Report is well......

Words: 674 - Pages: 3

Premium Essay

Student

...BA 3300 Business Cornerstone Summer I 2015 CRN 30146, 30144 BA 3300 Business Cornerstone Summer I 2015 CRN 30146, 30144 Please note: By taking this Summer course, it implies you fully understand you have to take the initiative to study, keep up with material/assignments, and check Gatormail/Blackboard EACH day. You do not have a day “off” and this includes weekends. There is also a SERVICE LEARNING (volunteering) component to this course that you are required to volunteer in person. (details explained in syllabus 8.1.5). In addition, a policy adopted by the Faculty of the College of Business on November 22, 2013 states, "Every fully online COB course will require live proctoring through UHD Testing Services or other location approved by UHD Testing Services for the required course final exam during the assigned university exam period."   What this policy means is you will have to take the final exam IN PERSON (Proctor U also an option) and will need to plan accordingly. (note: please contact instructor immediately in the first week of class if taking the exam in person will be an issue). 1. COURSE NUMBER AND TITLE BA 3300 Business Cornerstone This course is in support of a degree program at the UHD College of Business that has earned professional accreditation by AACSB International. AACSB International is an association of more than 11,100 business educational institutions, and other organizations in 70 countries that are dedicated to the......

Words: 7068 - Pages: 29

Premium Essay

Student

...BUSN225 ASSIGNMENT 3, SUMMER 2015 PROFESSOR SONALI RAY STUDENT NAME:__________________________________ SECTION NUMBER:_______________ THE ANSWERS TO ALL QUESTIONS MUST BE RECORDED ON THIS QUESTION PAPER. NO EXTRA PAPTER IS ALLOWED. * Show all formulas, formula substitutions and calculations. * All calculations must be kept to three decimal places unrounded. * Assignments must be neat - make corrections using white-out. * Pages must be stapled together. 1. The manager of Little Cakes Inc. states that an average of 1500 muffins is sold each week in the retail store. One of the bakers feeds that the average is less than $1500, and then decides to test this claim. State the null hypothesis and alternative hypothesis. 2. A machine on a productive line is set to automatically fill each bottle with 500 ml of water. The quality control manager regularly takes random samples of the bottles from the production line to ensure that the machine is filling the bottles correctly. If not, the machine will need adjusting. State the null hypothesis and alternative hypothesis. For questions 3 -4 answer the following questions: a) Is this a one or two-tailed test? b) What is the CV? c) Draw the diagram 3. H0: µ = 50 H1= µ ≠ 50 Sample mean = 49, n = 36, σ = 5, α=0.02 4. H0: µ = 10 H1: µ > 10 Sample mean = 12, n = 10.σ = 3, α=0.05 For questions 5 -7 answer the following questions: a) State the null......

Words: 494 - Pages: 2

Premium Essay

Mba Incoming Student Assignment

...To: Incoming MBA Students, 2015 Full-Time Program (0101 and 0201) From: Professor Rebecca Hann Faculty Coordinator for BUSI 610: Introduction to Financial Accounting Re: Pre-term Course from Harvard Business School Publishing Date: June 3, 2015 BUSI 610, Introduction to Financial Accounting, is one of the Core courses that you will take in Fall 2015. This course is designed to help you become an informed user of financial statements. Given the duration of the term, we will be moving at a fairly rapid pace. The course will begin with a brief overview of the fundamentals of accounting (key accounting concepts, the accounting process, and the principal financial statements) and then move on to study in greater depth the various elements of financial statements. At the end of the course, I expect you will have a good understanding of a company’s financial statements—be familiar with the process of preparing the statements as well as the ability to interpret and analyze financial data for economic decision making. To do well in the course, you need to have a solid understanding of the fundamental elements of accounting; the remainder of the course will otherwise prove to be difficult. To help you better prepare for the course, you are required to take an on-line web-based course from Harvard Business School Publishing titled Financial Accounting: An Introductory Online Course (FA). This requirement is intended to ensure that all students have a common......

Words: 1218 - Pages: 5

Free Essay

Student

...types, and Chapter 7 explains expressions and assignment statements. Chapter 8 describes control viii Preface statements, and Chapters 9 and 10 discuss subprograms and their implementation. Chapter 11 examines data abstraction facilities. Chapter 12 provides an indepth discussion of language features that support object-oriented programming (inheritance and dynamic method binding), Chapter 13 discusses concurrent program units, and Chapter 14 is about exception handling, along with a brief discussion of event handling. The last two chapters (15 and 16) describe two of the most important alternative programming paradigms: functional programming and logic programming. However, some of the data structures and control constructs of functional programming languages are discussed in Chapters 6 and 8. Chapter 15 presents an introduction to Scheme, including descriptions of some of its primitive functions, special forms, and functional forms, as well as some examples of simple functions written in Scheme. Brief introductions to ML, Haskell, and F# are given to illustrate some different directions in functional language design. Chapter 16 introduces logic programming and the logic programming language, Prolog. To the Instructor In the junior-level programming language course at the University of Colorado at Colorado Springs, the book is used as follows: We typically cover Chapters 1 and 3 in detail, and though students find it interesting and beneficial......

Words: 142312 - Pages: 570

Free Essay

Lab 3 Stacks and Queues

...Front is the slot in the array spot for 0. The index 0 is where front is placed. The Rear variable is waiting for a value to be inserted to take a spot. This variable will always be the value that was last inserted to the array. Q4: What is the difference between Rem and Peek operations? The operations remove deletes the value at the top of the array. In other words on the rear variable. The peek operation returns the value that the variable rear is pointing to. Q5: What technique in array it used to allow 50 inserted into the queue? Once the array was filled all the way to the top, the pointer came back to the bottom of the array where we had deleted two values. It came down to index 0 and stored the value 50. Q6: What is the difference between priority queue and the regular queue at insertion operations? There is a difference between priority and regular queue. Regular queue stores the value at the next slot open at the top of the array. Priority queue stores the value from largest to smallest. Therefore, it has to make space if the value has to go in the middle of the array. [pic] [pic] [pic] [pic] [pic] [pic] [pic] [pic] [pic]...

Words: 341 - Pages: 2

Free Essay

Queue

...the most are when I was going to open an account in Barclay Bank. There always have invisible queues in the bank whereby the bank officers are standing in the middle of the crowd. The queue then is start after the officers. When first I was in the bank, I totally cannot get used to it and feel unsecure. Once I entered to the bank there was man, I think he is a security guard, asked me to queue at somewhere where I cannot see the queue. This is because I am the first one in the queue and I totally have no idea about what I can do except I create a queue. At the moment, I keep asking myself, “Am I in a queue?” Then finally, there was a man come and approached me and later there was more and more people queuing up after me. More than that, there always is a distance between people to people when queuing up. In Coventry, people here did not stand closely to the person in front when queuing up especially when at ATM. The physical distance between people when queuing up is a good habits and it could show some respect to the people by giving some private or personal space. I would like to share this because normally this thing (invisible queue) would not or never happen in Malaysia. However, it does not mean that Malaysians have the habits or culture to cut queue. Normally in Malaysia, we have to take a number to wait for our turns and people always stand close when queuing up and sometime queue in group....

Words: 306 - Pages: 2

Premium Essay

Queues

...las líneas de espera para que sea agradable el tiempo que el cliente pasa en línea de acuerdo al tipo de clientes que maneja la tienda. Referencia Bennett R. Queues, customer characteristics and policies for managing waiting-lines in supermarkets. International Journal of Retail & Distribution Management 1998;26(2):78. Anexo 1: Queues, customer characteristics and policies for managing waiting-lines in supermarkets Introduction Express "one basket" or cash only waiting lines are familiar to supermarket customers throughout the world. Other possible policies for reducing average queue lengths at checkouts include the practice of automatically opening a new till whenever there are more than (say) five people in an existing queue, and the use of preset formulae to determine the ratio of tills to customer volume. Should a national chain of supermarkets apply exactly the same checkout policies in all its outlets, or ought it to vary these arrangements from store to store according to the characteristics of local customers? This is an intriguing question not previously discussed within the academic marketing literature on waiting-lines, which instead has focused mainly on particular techniques for speeding-up checkout service systems and/or for distracting customers' attentions while they are standing in queues (in order to prevent them from feeling they have been kept waiting for too long). The latter objective might be achieved by confronting customers with......

Words: 5711 - Pages: 23

Premium Essay

Student

...Franco (course coordinator), Gus.Defranco@rotman.utoronto.ca Donna Losell, Losell@rotman.utoronto.ca Amy Kwan, amyk.kwan@utoronto.ca Eszter Palancz, Eszter.Palancz@Rotman.Utoronto.Ca Ross Lu, Ross.Lu12@Rotman.Utoronto.Ca 1 Office hours Gus De Franco Donna Losell Eszter Palancz Amy Kwan Ross Lu By appointment, RT537 By appointment, RT529 Wednesday 4:30pm-5:30pm, and by appointment, RT534 Thursday 2:30pm-3:30pm, and by appointment, Room TBA By appointment, RT519 To schedule an appointment, please send us an e-mail in advance to let us know what you would like to discuss. Head TA Course Website Prerequisite Required text Ho Jin Yun (hojin.yun@mail.utoronto.ca) http://portal.utoronto.ca Rotman Commerce Students: RSM219H1 Employment Relations or Human Resource Management: MGT201H1 Garrison, Libby, Webb, Managerial Accounting, Tenth Canadian Edition with Connect, McGraw Hill Ryerson, 2015. COURSE DESCRIPTION Management accounting focuses on the use of accounting information to facilitate the success of manufacturing, service, governmental, and not-for-profit organizations. Business processes and organizations have been changing in response to increased global and domestic competition. These changes include aggressive cost reduction, outsourcing, rightsizing and reengineering, total quality management, advanced manufacturing technologies, and increased use of information technologies. As a result, management accountants play a......

Words: 2875 - Pages: 12

Premium Essay

Student

...Student Handbook 2015/2016 www.praguecollege.cz Table of Contents Introduction Message from the Director Mission, Vision and Values Why study at Prague College Admissions A short guide to Prague College qualifications English for Higher Education Foundation Diploma in Business Foundation Diploma in Computing Foundation Diploma in Art & Design Professional Diplomas in Business Professional Diplomas in Computing Higher National Diploma BA (Hons) International Business Management BA (Hons) International Business Management (Flexible Study Programme) BA (Hons) Business Finance & Accounting BA (Hons) Graphic Design BA (Hons) Fine Art Exp. Media BSc (Hons) Computing BA (Hons) Communications & Media Studies MSc International Management MSc Computing Accreditation & Validation UK/Pearson Credit system Transfer of credits Student support Accommodation Study Advising and Support Financial support Visas for foreign students Scholarships Benefits for students Study abroad Internships Assistance in employment Counselling Centre Student Resources Computer labs Online Learning Centre (Moodle) Prague College email Physical library Digital Library ISIFA Images Textbooks and class materials Graphic Design/Interactive Media/Fine Art materials and costs Personal computers Message boards and digital signs Newsletters Open lectures, seminars and events Student ID cards Centre for Research and Interdisciplinary Studies......

Words: 27092 - Pages: 109

Premium Essay

Student

...BA 3301 Legal Environment of Business Compliance Interview and Report Assignment Associate Professor Lee Usnick, JD I. ASSIGNMENT OVERVIEW Virtually all business activities conducted in the United States are highly regulated, not only by governmental entities, but by professional entities as well. Compliance with all federal, state, and local laws and regulations is a prerequisite to the long term health and survival of a business. Equally important is a business's compliance with standards issued by the professional and accrediting bodies responsible for licensing and certification. Certain industries are more regulated than others. For example, health care, financial services, and public utilities are all highly regulated with extensive licensing and operational standards. When a business fails to comply with all applicable regulations and standards, the business and the individuals who manage it can face a variety of sanctions, from loss of license and program certification, to civil and criminal sanctions that include monetary penalties and prison. In this assignment, you will learn how someone in your selected industry meets the challenges of current compliance requirements. It is not necessary to address all aspects of compliance in this industry or selected company. Rather, you should educate yourself in broad terms about the kinds of governmental and industry standards covering your interviewee's business, then select a few key aspects to explore in depth......

Words: 3552 - Pages: 15

Hunter X Hunter 34 | Dreaming Purple Neon | Treehouse of H season 05 episode 05