Search Results

Search found 4026 results on 162 pages for 'programmer calculator'.

Page 4/162 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Scientific calculator app/site that saves calculations for Win 7?

    - by verve
    Are there any scientific calculator apps that aren't browser specific that's easy to use which displays whatever is inputted clearly and one that can be used by a keyboard only but can be used by only a mouse too? Also, I want one that saves the history of calculations and lets us paste it into a document at another time. Also, please don't recommend ones from sketchy-looking sites. Freeware or paidware. I prefer paidware if it's the only way to guarantee accurate calculations. Win 7 Pro.

    Read the article

  • What are your experiences as a programmer?

    - by jenf
    I haven't finished school yet and plan on studying Informatics and searching a job as a programmer. However I don't know any real programmers and so I don't have a real source for information on how their job actually is. I apologize if this question is subjective but I think that it is an important one to ask. What do you actually program (with)? Do you generally work with one programming language or more? Do you like working with it/them? Do you like your job? Is it kind of a hobby and a job at once?

    Read the article

  • Basic questions while making a toy calculator

    - by Jwan622
    I am making a calculator to better understand how to program and I had a question about the following lines of code: I wanted to make my equals sign with this C# code: private void btnEquals_Click(object sender, EventArgs e) { if (plusButtonClicked == true) { total2 = total1 + Convert.ToDouble(txtDisplay.Text); //double.Parse(txtDisplay.Text); } else if (minusButtonClicked == { total2 = total1 - double.Parse(txtDisplay.Text) } } txtDisplay.Text = total2.ToString(); total1 = 0; However, my friend said this way of writing code was superior, with changes in the minus sign. private void btnEquals_Click(object sender, EventArgs e) { if (plusButtonClicked == true) { total2 = total1 + Convert.ToDouble(txtDisplay.Text); //double.Parse(txtDisplay.Text); } else if (minusButtonClicked == true) { double d1; if(double.TryParse(txtDisplay.Text, out d1)) { total2 = total1 - d1; } } txtDisplay.Text = total2.ToString(); total1 = 0; My questions: 1) What does the "out d1" section of this minus sign code mean? 2) My assumption here is that the "TryParse" code results in fewer systems crashes? If I just use "Double.Parse" and I don't put anything in the textbox, the program will crash sometimes right?

    Read the article

  • How does a programmer without a degree gain experience? [on hold]

    - by user96872
    Having a few years of experience is a must for many programming jobs nowadays. If one does not have a college degree but would like to get some experience with programming (with some prior knowledge, say, in JavaScript, PHP and Python), what are some ways to gain the experience that employers seek? I know about personal projects, but how about team experience and everything that goes along with it? Would I need to volunteer somewhere?

    Read the article

  • Beta Soon Closing: Java SE 7 Programmer I (OCA) Exam

    - by Harold Green
    Just a reminder that you still have the next several weeks to take the beta exam for the new "Oracle Certified Associate, Java SE 7 Programmer" certification. From now through December 16th, you can take the "Java SE 7 Programmer I" exam (1Z1-803) for only $50 USD. Not only that, but because this only a single-exam certification - passing it puts you among the very first certified on the new Java SE 7 platform! You'll be happy to note that we worked hard to raise the bar for OCA as we built the Java SE 7 certification. The content that we considered to be more ‘conceptual knowledge-based' has been eliminated in the OCA level and has been replaced with far more practical content - what we often call "practitioner-level" concepts and questions. In fact, some of the topics that we previously covered at the Oracle Certified Professional (OCP) level is now covered at the OCA level. Doing this not only increases the value of the Java SE 7 OCA certification, but also has provided the opportunity for us to broaden the topics, concepts, questions covered at the OCP certification level. All of this adds up to more value and credibility to those who get certified on Java SE 7. The OCA exam doesn’t have prerequisites. But it is very important that you carefully review the test objectives on the exam page and assess your current skills and knowledge against that list to be sure that you're ready. From the exam page you can register to take the exam at a Pearson VUE testing center near you.Below are some helpful details on the certification track and exam. Again, register now - just a few weeks left at the special low beta price! QUICK LINKS: Certification Track: Oracle Certified Associate (OCA), Java SE 7 Programmer Certification Exam: Java SE 7 Programmer I (1Z1-803) Video: Coming Soon - Java SE 7 Certification Info: About Beta Exams Exam Registration: Instructions | Register Here

    Read the article

  • Java language book for an experienced programmer?

    - by Andrew
    I am looking for book to get up to speed with (start with) a Java language. I am experienced (more than 15 years) C# and C++ programmer with a bit of Python, so I don't need a book which starts with a programming concepts for a beginner. In fact I think I need a "Java language specification" sort of book. I checked the answers to questions similar to mine and found that there two books which is being recommended most: "Effective Java" and "Sun Certified Java Programmer". After a quick look at the "Effective Java" I realised it should not be a book to start with, it is a good book (I read all books in Effective C++, STL series and liked them but they are more "good practices" books, rather than a book for a beginners) "Sun Certified Java Programmer" looks closer to what I am after - but goes too slow for me. So I did some more search and found these two books: The Java(TM) Language Specification by Gosling himself Java™ Programming Language, The (4th Edition) by Ken Arnold I gather the first one a little bit dated and the second one is the best Java Language Reference books up to date, but I am not sure - as I am not a Java person to make such judgements. After reading the language reference book I will start learning the basic libraries / packages / namespaces (collections, algorithms, IO, etc) and then something about UI architecture. But that will come later. Question: - which Java Language reference book for an experienced programmer you can recomend ? and why? Cheers.

    Read the article

  • Is paper indispensable in a programmer's everyday work?

    - by rwong
    As a programmer who work in a company whose vision is to make paperless office possible, is there any way I can work effectively while using less paper? I can list at least several kinds of papers I use quite often: Paper notebook, on which I do most of the pre-coding design work and ideas Books Temporary printouts of source code, though not so often (in color, with a 6 point font at 600 DPI) Sticky note, to remind myself of things that should be taken care of within a few days On the other hand, I also use a wiki and an office text editor. Once a while I would use a diagramming software to make a few flowcharts. Deeper questions: Is there a relationship between paper use and productivity? How can programmers help save the trees? Is paperless software development fundamentally different from paperless office? Related questions: Do you ever write code with pen and paper, and should we do it more often? What physical tools do you find useful to work as a programmer? What things are essential on a programmer's desk? Stuff every programmer needs while working Additional info, if it helps: Everyone has dual monitors. We have decent project management and issue tracking software (both web-based). Please be constructive. In particular, please give your answer to your peer programmers who wish to be flexible and are willing to change working style in order to become more productive as well as meeting certain their own personal values. Edited: I removed the company's view because it appears to be too flamebait. If you need to see my original words, go to the edit history. Deleted: Doxygen and whiteboard. Reason: disregarding my personal experience with these great tools, we never had to print out anything as a consequence of using/not using them. To see my original words, go to the edit history.

    Read the article

  • What is a "Technical Programmer"? [closed]

    - by Mike E
    I've noticed in job posting boards a few postings, all from European companies in the games industry, for a "Technical Programmer". The job description in both was similar, having to do with tools development, 3d graphics programming, etc. It seems to be somewhere between a Technical Artist who's more technical than artist or who can code, and a Technical Director but perhaps without the seniority/experience. Information elsewhere on the position is sparse. The title seems redundant and I haven't seen any American companies post jobs by that name exactly. One example is this job posting on gamedev.net which isn't exactly thorough. In case the link dies: Subject: Technical Programmer Frictional Games, the creators of Amnesia: The Dark Descent and the Penumbra series, are looking for a talented programmer to join the company! You will be working for a small team with a big focus on finding new and innovating solutions. We want you who are not afraid to explore uncharted territory and constantly learn new things. Self-discipline and independence are also important traits as all work will be done from home. Some the things you will work with include: 3D math, rendering, shaders and everything else related. Console development (most likely Xbox 360). Hardware implementations (support for motion controls, etc). All coding is in C++, so great skills in that is imperative. As I mentioned, the job title has appeared from European companies so maybe it goes by another title in America. What other titles might this specialization of programmer go by?

    Read the article

  • Subnet calculator for MS Excel

    - by Martin
    I quite often use the handy subnet calculator here: http://www.subnet-calculator.com/ Which I find very useful. However, does anyone have details/a link for a version of this that offers similar functionality but is in an excel spreadsheet. I could then include it in a worksheet and I wouldn't have to keep visiting the website. Also handy if I don't have internet access - which can often be the case when I need it. Many thanks

    Read the article

  • Trulia Adds Commute Time Calculator to Their Neighborhood Heat Maps

    - by Jason Fitzpatrick
    Trulia–a popular real estate site well known for their neighborhood heat maps covering crime, school locations, and property values–now shows commute times in heat map form; see instantly how far away your potential new place is from where you want to work. Accessing the commute heatmap is just like any of Trulia’s other top-down views. Search for your city, hit up the map, and select which heatmap overlay you want to view. Trulia [via Flowing Data] How to Make Your Laptop Choose a Wired Connection Instead of Wireless HTG Explains: What Is Two-Factor Authentication and Should I Be Using It? HTG Explains: What Is Windows RT and What Does It Mean To Me?

    Read the article

  • Where to store front-end data for "object calculator"

    - by Justin Grahn
    I recently have completed a language library that acts as a giant filter for food items, and flows a bit like this :Products -> Recipes -> MenuItems -> Meals and finally, upon submission, creates an Order. I have also completed a database structure that stores all the pertinent information to each class, and seems to fit my needs. The issue I'm having is linking the two. I imagined all of the information being local to each instance of the product, where there exists one backend user who edits and manipulates data, and multiple front end users who select their Meal(s) to create an Order. Ideally, all of the front end users would have all of this information stored locally within the library, and would update the library on startup from a database. How should I go about storing the data so that I can load it into the library every time the user opens the application? Do I package a database onboard and just load and populate every time? The only method I can currently conceive of doing this, even if I only have 500 possible Product objects, would require me to foreach the list for every Product that I need to match to a Recipe and so on and so forth every time I relaunch the program, which seems like a lot of wasteful loading. Here is a general flow of my architecture: Products: public class Product : IPortionable { public Product(string n, uint pNumber = 0) { name = n; productNumber = pNumber; } public string name { get; set; } public uint productNumber { get; set; } } Recipes: public Recipe(string n, decimal yieldAmt, Volume.Unit unit) { name = n; yield = new Volume(yieldAmt, unit); yield.ConvertUnit(); } /// <summary> /// Creates a new ingredient object /// </summary> /// <param name="n">Name</param> /// <param name="yieldAmt">Recipe Yield</param> /// <param name="unit">Unit of Yield</param> public Recipe(string n, decimal yieldAmt, Weight.Unit unit) { name = n; yield = new Weight(yieldAmt, unit); } public Recipe(Recipe r) { name = r.name; yield = r.yield; ingredients = r.ingredients; } public string name { get; set; } public IMeasure yield; public Dictionary<IPortionable, IMeasure> ingredients = new Dictionary<IPortionable,IMeasure>(); MenuItems: public abstract class MenuItem : IScalable { public static string title = null; public string name { get; set; } public decimal maxPortionSize { get; set; } public decimal minPortionSize { get; set; } public Dictionary<IPortionable, IMeasure> ingredients = new Dictionary<IPortionable, IMeasure>(); and Meal: public class Meal { public Meal(int guests) { guestCount = guests; } public int guestCount { get; private set; } //TODO: Make a new MainCourse class that holds pasta and Entree public Dictionary<string, int> counts = new Dictionary<string, int>(){ {MainCourse.title, 0}, {Side.title , 0}, {Appetizer.title, 0} }; public List<MenuItem> items = new List<MenuItem>(); The Database just stores and links each of these basic names and amounts together usings ID's (RecipeID, ProductID and MenuItemID)

    Read the article

  • How to be a zero-bug programmer?

    - by Elaine
    My boss ever told me that as a good programmer, who should be able to ensure the code he/she changed must be reliable, correct, thoroughly self-verified, who should completely understand what all the results and impacts that he/she did or revised will cause. I did try my best to be as this kind of programmer, test again and again. But.. bugs are still there. How could I be a zero-bug programmer? know every char of my code will cause and effect?

    Read the article

  • How to identify potential for becoming a programmer

    - by Jacob Spire
    There's heaps of information out there on hiring someone who's already a programmer. (Or claims to be one.) But what about identifying someone who has the potential to become a programmer, with little or no knowledge? Aside from the obvious things to look for (smart, gets things done), are there any interview questions and/or tests to determine whether one has the potential to become a programmer? Note: I'm not asking how to tell whether I can learn programming, but how to tell someone else is right for it.

    Read the article

  • Crafting an effective php/web programmer job post template [closed]

    - by Tchalvak
    I am looking to create a job post to get a satisfactory assistant programmer / templater. Specifically, a php & web programmer. I am, however, afraid of forgetting important things. So, are there resources you can suggest for templates for things to ask and things to tell in a job post for a programmer? Surprisingly, I wasn't able to find similar questions on this site, so there may be duplicate questions out there that I could use but just didn't find. Right now I know that my -requirements- are so generic that they're going to get me in trouble with a spam of applications. e.g. the candidate must know php, must be able to seperate php from html. So I'm looking for criteria that are must-haves, must-mentions, or a general template to try to avoid a "lemon". I also started a gist to work on a job post, comments/edits would be excellent: https://gist.github.com/2906808

    Read the article

  • 'SImple' 2 class Java calculator doesn't accept inputs or do calculations

    - by Tony O'Keeffe
    Hi, I'm trying to get a two class java calculator working (new to java) to work but so far i'm having no success. the two classes are outlined below, calcFrame is for the interface and calEngine should do the actual calculations but i can't get them to talk to one another. i'd really appreciate any assistance on same. Thanks. CalcFrame Code - import java.awt.; import javax.swing.; import javax.swing.border.; import java.awt.event.; /** *A Class that operates as the framework for a calculator. *No calculations are performed in this section */ public class CalcFrame implements ActionListener { private CalcEngine calc; private JFrame frame; private JTextField display; private JLabel status; /** * Constructor for objects of class GridLayoutExample */ public CalcFrame() { makeFrame(); //calc = engine; } /** * This allows you to quit the calculator. */ // Alows the class to quit. private void quit() { System.exit(0); } // Calls the dialog frame with the information about the project. private void showAbout() { JOptionPane.showMessageDialog(frame, "Group Project", "About Calculator Group Project", JOptionPane.INFORMATION_MESSAGE); } private void makeFrame() { frame = new JFrame("Group Project Calculator"); makeMenuBar(frame); JPanel contentPane = (JPanel)frame.getContentPane(); contentPane.setLayout(new BorderLayout(8, 8)); contentPane.setBorder(new EmptyBorder( 10, 10, 10, 10)); /** * Insert a text field */ display = new JTextField(); contentPane.add(display, BorderLayout.NORTH); //Container contentPane = frame.getContentPane(); contentPane.setLayout(new GridLayout(4, 4)); JPanel buttonPanel = new JPanel(new GridLayout(4, 4)); contentPane.add(new JButton("1")); contentPane.add(new JButton("2")); contentPane.add(new JButton("3")); contentPane.add(new JButton("4")); contentPane.add(new JButton("5")); contentPane.add(new JButton("6")); contentPane.add(new JButton("7")); contentPane.add(new JButton("8")); contentPane.add(new JButton("9")); contentPane.add(new JButton("0")); contentPane.add(new JButton("+")); contentPane.add(new JButton("-")); contentPane.add(new JButton("/")); contentPane.add(new JButton("*")); contentPane.add(new JButton("=")); contentPane.add(new JButton("C")); contentPane.add(buttonPanel, BorderLayout.CENTER); //status = new JLabel(calc.getAuthor()); //contentPane.add(status, BorderLayout.SOUTH); frame.pack(); frame.setVisible(true); } /** * Create the main frame's menu bar. * The frame that the menu bar should be added to. */ private void makeMenuBar(JFrame frame) { final int SHORTCUT_MASK = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); JMenuBar menubar = new JMenuBar(); frame.setJMenuBar(menubar); JMenu menu; JMenuItem item; // create the File menu menu = new JMenu("File"); menubar.add(menu); // create the Quit menu with a shortcut "Q" key. item = new JMenuItem("Quit"); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, SHORTCUT_MASK)); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { quit(); } }); menu.add(item); // Adds an about menu. menu = new JMenu("About"); menubar.add(menu); // Displays item = new JMenuItem("Calculator Project"); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showAbout(); } }); menu.add(item); } /** * An interface action has been performed. * Find out what it was and handle it. * @param event The event that has occured. */ public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); if(command.equals("0") || command.equals("1") || command.equals("2") || command.equals("3") || command.equals("4") || command.equals("5") || command.equals("6") || command.equals("7") || command.equals("8") || command.equals("9")) { int number = Integer.parseInt(command); calc.numberPressed(number); } else if(command.equals("+")) { calc.plus(); } else if(command.equals("-")) { calc.minus(); } else if(command.equals("=")) { calc.equals(); } else if(command.equals("C")) { calc.clear(); } else if(command.equals("?")) { } // else unknown command. redisplay(); } /** * Update the interface display to show the current value of the * calculator. */ private void redisplay() { display.setText("" + calc.getDisplayValue()); } /** * Toggle the info display in the calculator's status area between the * author and version information. */ } CalcEngine - public class CalcEngine { // The calculator's state is maintained in three fields: // buildingDisplayValue, haveLeftOperand, and lastOperator. // The current value (to be) shown in the display. private int displayValue; // The value of an existing left operand. private int leftOperand; /** * Create a CalcEngine. */ public CalcEngine() { clear(); } public int getDisplayValue() { return displayValue; } /** * A number button was pressed. * Either start a new operand, or incorporate this number as * the least significant digit of an existing one. * @param number The number pressed on the calculator. */ public void numberPressed(int number) { if(buildingDisplayValue) { // Incorporate this digit. displayValue = displayValue*10 + number; } else { // Start building a new number. displayValue = number; buildingDisplayValue = true; } } /** * The 'plus' button was pressed. */ public void plus() { applyOperator('+'); } /** * The 'minus' button was pressed. */ public void minus() { applyOperator('-'); } /** * The '=' button was pressed. */ public void equals() { // This should completes the building of a second operand, // so ensure that we really have a left operand, an operator // and a right operand. if(haveLeftOperand && lastOperator != '?' && buildingDisplayValue) { calculateResult(); lastOperator = '?'; buildingDisplayValue = false; } else { keySequenceError(); } } /** * The 'C' (clear) button was pressed. * Reset everything to a starting state. */ public void clear() { lastOperator = '?'; haveLeftOperand = false; buildingDisplayValue = false; displayValue = 0; } /** * @return The title of this calculation engine. */ public String getTitle() { return "Java Calculator"; } /** * @return The author of this engine. */ public String getAuthor() { return "David J. Barnes and Michael Kolling"; } /** * @return The version number of this engine. */ public String getVersion() { return "Version 1.0"; } /** * Combine leftOperand, lastOperator, and the * current display value. * The result becomes both the leftOperand and * the new display value. */ private void calculateResult() { switch(lastOperator) { case '+': displayValue = leftOperand + displayValue; haveLeftOperand = true; leftOperand = displayValue; break; case '-': displayValue = leftOperand - displayValue; haveLeftOperand = true; leftOperand = displayValue; break; default: keySequenceError(); break; } } /** * Apply an operator. * @param operator The operator to apply. */ private void applyOperator(char operator) { // If we are not in the process of building a new operand // then it is an error, unless we have just calculated a // result using '='. if(!buildingDisplayValue && !(haveLeftOperand && lastOperator == '?')) { keySequenceError(); return; } if(lastOperator != '?') { // First apply the previous operator. calculateResult(); } else { // The displayValue now becomes the left operand of this // new operator. haveLeftOperand = true; leftOperand = displayValue; } lastOperator = operator; buildingDisplayValue = false; } /** * Report an error in the sequence of keys that was pressed. */ private void keySequenceError() { System.out.println("A key sequence error has occurred."); // Reset everything. clear(); } }

    Read the article

  • Stuff every programmer needs while working

    - by Desai Shukla
    I've been tasked with creating a fun and relaxing environment, one thing I know that I want is ergonomic mice and keyboards, others have suggested exercise balls and bands. What is it that every programmer needs while working? What might not be necessary but would be nice to have anyway? Note: this question was asked previously, but has been recommended to be posted here. See this link for the previous responses: http://stackoverflow.com/questions/3911911/stuff-every-programmer-needs-while-working-closed

    Read the article

  • How to practice typing of programmer keys such as tilde, pipe and programmer quote?

    - by user7893
    It is nice that there are services such as TypeRacer where you can practice casual writing but I want to practice programmer keys, covers more numbers and keys not used by regular typist. There was some tutor with which I practiced some programmer keys and noticed that my speed dropped dramatically from 70-80 wpm to even about 15-30 wpm, it also trains different muscles. So how can I practice just programming keys with programming texts or just random code pieces?

    Read the article

  • Good starting platform for a teenage games programmer

    - by gkrogers
    My son (15) has decided that he wants to pursue a career as a games programmer. I've said that he should get started now with a simple game. He has no programming experience yet, but I am a programmer (business apps, not games) so I can teach him programming, but what would be a good platform for him to start on? Initially I'm looking for something that can provide quick results, to keep his enthusiasm up. What would you suggest?

    Read the article

  • The type of programmer I want to be [closed]

    - by Aventinus_
    I'm an undergraduate Software Engineer student, although I've decided that pure programming is what I want to do for the rest of my life. The thing is that programming is a vast field and although most of its aspects are extremely interesting, soon or later I'll have to choose one (?) to focus on. I have several ideas on small projects I'd like to develop this summer, having in mind that this will gain me some experience and, in the best scenario, some cash. But the most important reason I'd like to develop something close to “professional” is to give myself direction on what I want to do as a programmer. One path is that of the Web Programmer. I enjoy PHP and MySQL, as well as HTML and CSS, although I don't really like ASP.NET. I can see myself writing web apps, using the above technologies, as well as XML and Javascript. I also have a neat idea on a Facebook app. The other path is that of the Desktop Programmer. This is a little more complicated cause I really-really enjoy high level languages such as Java and Python but not the low level ones, such as C. I use both Linux and Windows for the last 6 years and I like their latest DEs (meaning Gnome Shell and Metro). I can see myself writing desktop applications for both OSs as long as it means high level programming. Ideally I'd like being able to help the development of GNOME. The last path that interests me is the path of the Smartphone Programmer. I have created some sample applications on Android and due to Java I found it a quite interesting experience. I can also see myself as an independent smartphone developer. These 3 paths seem equally interesting at the moment due to the shallowness of my experience, I guess. I know that I should spend time with all of them and then choose the right one for me but I'd like to know what are the pros and cons in terms of learning curve, fun, job finding and of course financial rewards with each of these paths. I have fair or basic understanding of the languages/technologies I described earlier and this question will help me choose where to focus, at least for now.

    Read the article

  • A feeling that I'm not that good developer

    - by Karim
    Hi, Im having a strange feeling, but let me first introduce myself as a software developer. I started to program when I was still a kid, I had about 10 or 11 years. I really enjoy my work and never get bored from it. It's amazing how somebody could be paid for what he really likes to do and would be doing it anyway even for free. WHen I first started to program, I was feeling proud of what I was doing, each application I built was for me a success and after 2-3 year I had a feeling that I'm a coding guru. It was a nice feeling ;-) But the more I was in the field, the more types of software I started to develop I was starting to have a feeling that I'm completely wrong in that I'm guru. I felt that I'm not even a mediocre developer. Each new field I start to work on is giving me this feeling. Like when I once developed a device driver for a client, I saw how much I need to learn about device drivers. When I developed a video filter for an application, I saw how much do I still need to learn about DirectShow, Color Spaces, and all the theory behind that. The worst thing was when I started to learn algorithms. It was several years ago. I knew then the basic structures and algorithms like the sorting, some types of trees, some hashtables, strings etc.. and when I really wanted to learn a group of structures I learned about 5-6 new types and saw that in fact even this small group has several hundred subtypes of structures. It's depressing how little time people have in their lives to learn all this stuff. I'm now a software developer with about 10 years of experience and I still feel that I'm not a proficient developer when I think about things that others do in the industry. Is this normal what I'm experiencing or is it a sign of a destructive excessive ambition? Thanks in advance for any comments.

    Read the article

  • Problem creating calculations 'engine' in two class java calculator

    - by tokee
    i have hit a brick wall whilst attempting to create a two class java calculator but have been unsuccessful so far in getting it working. i have the code for an interface which works and displays ok but creating a seperate class 'CalcEngine' to do the actual calculations has proven to be beyond me. I'd appreciate it if someone could kick start things for me and create a class calcEngine which works with the interface class and allows input when from single button i.e. if one is pressed on the calc then 1 displays onscreen. please note i'm not asking someone to do the whole thing for me as i want to learn and i'm confident i can do the rest including addition subtraction etc. once i get over the obstacle of getting the two classes to communicate. any and all assistance would be very much appreciated. Please see the calcInterface class code below - import java.awt.*; import javax.swing.*; import javax.swing.border.*; import java.awt.event.*; /** *A Class that operates as the framework for a calculator. *No calculations are performed in this section */ public class CalcFrame implements ActionListener { private CalcEngine calc; private JFrame frame; private JTextField display; private JLabel status; /** * Constructor for objects of class GridLayoutExample */ public CalcFrame() { makeFrame(); //calc = engine; } /** * This allows you to quit the calculator. */ // Alows the class to quit. private void quit() { System.exit(0); } // Calls the dialog frame with the information about the project. private void showAbout() { JOptionPane.showMessageDialog(frame, "Group Project", "About Calculator Group Project", JOptionPane.INFORMATION_MESSAGE); } private void makeFrame() { frame = new JFrame("Group Project Calculator"); makeMenuBar(frame); JPanel contentPane = (JPanel)frame.getContentPane(); contentPane.setLayout(new BorderLayout(8, 8)); contentPane.setBorder(new EmptyBorder( 10, 10, 10, 10)); /** * Insert a text field */ display = new JTextField(); contentPane.add(display, BorderLayout.NORTH); //Container contentPane = frame.getContentPane(); contentPane.setLayout(new GridLayout(4, 4)); JPanel buttonPanel = new JPanel(new GridLayout(4, 4)); contentPane.add(new JButton("1")); contentPane.add(new JButton("2")); contentPane.add(new JButton("3")); contentPane.add(new JButton("4")); contentPane.add(new JButton("5")); contentPane.add(new JButton("6")); contentPane.add(new JButton("7")); contentPane.add(new JButton("8")); contentPane.add(new JButton("9")); contentPane.add(new JButton("0")); contentPane.add(new JButton("+")); contentPane.add(new JButton("-")); contentPane.add(new JButton("/")); contentPane.add(new JButton("*")); contentPane.add(new JButton("=")); contentPane.add(new JButton("C")); contentPane.add(buttonPanel, BorderLayout.CENTER); //status = new JLabel(calc.getAuthor()); //contentPane.add(status, BorderLayout.SOUTH); frame.pack(); frame.setVisible(true); } /** * Create the main frame's menu bar. * The frame that the menu bar should be added to. */ private void makeMenuBar(JFrame frame) { final int SHORTCUT_MASK = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); JMenuBar menubar = new JMenuBar(); frame.setJMenuBar(menubar); JMenu menu; JMenuItem item; // create the File menu menu = new JMenu("File"); menubar.add(menu); // create the Quit menu with a shortcut "Q" key. item = new JMenuItem("Quit"); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, SHORTCUT_MASK)); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { quit(); } }); menu.add(item); // Adds an about menu. menu = new JMenu("About"); menubar.add(menu); // Displays item = new JMenuItem("Calculator Project"); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showAbout(); } }); menu.add(item); } /** * An interface action has been performed. * Find out what it was and handle it. * @param event The event that has occured. */ public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); if(command.equals("0") || command.equals("1") || command.equals("2") || command.equals("3") || command.equals("4") || command.equals("5") || command.equals("6") || command.equals("7") || command.equals("8") || command.equals("9")) { int number = Integer.parseInt(command); calc.numberPressed(number); } else if(command.equals("+")) { calc.plus(); } else if(command.equals("-")) { calc.minus(); } else if(command.equals("=")) { calc.equals(); } else if(command.equals("C")) { calc.clear(); } else if(command.equals("?")) { } // else unknown command. redisplay(); } /** * Update the interface display to show the current value of the * calculator. */ private void redisplay() { display.setText("" + calc.getDisplayValue()); } /** * Toggle the info display in the calculator's status area between the * author and version information. */ }

    Read the article

  • Hallmarks of a Professional PHP Programmer

    - by Scotty C.
    I'm a 19 year old student who really REALLY enjoys programming, and I'm hoping to glean from your years of experience here. At present, I'm studying PHP every chance I get, and have been for about 3 years, although I've never taken any formal classes. I'd love to some day be a programmer full time, and make a good career of it. My question to you is this: What do you consider to be the hallmarks or traits of a professional programmer? Mainly in the field of PHP, but other, more generalized qualifications are also more than welcome, as I think PHP is more of a hobbyist language and may not be the language of choice in the eyes of potential employers. Please correct me if I'm wrong. Above all, I don't want to wast time on something that isn't worth while. I'm currently feeling pretty confident in my knowledge of PHP as a language, and I know that I could build just about anything I need and have it "work", but I feel sorely lacking in design concepts and code structure. I can even write object oriented code, but in my personal opinion, that isn't worth a hill of beans if it isn't organized well. For this reason, I bought Matt Zandstra's book "PHP Objects, Patterns, and Practice" and have been reading that a little every day. Anyway, I'm starting to digress a little here, so back to the original question. What advice would you give to an aspiring programmer who wants to make an impact in this field? Also, on a side note, I've been working on a project with a friend of mine that would give a fairly good idea of where I'm at coding wise. I'm gonna give a link, I don't want anyone to feel as though I'm pushing or spamming here, so don't click it if you don't want to. But if you are interested on giving some feedback there as well, you can see the code on github. I'm known as The Craw there. https://github.com/PureChat/PureChat--Beta-/tree/

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >