Tampilkan postingan dengan label programming. Tampilkan semua postingan
Tampilkan postingan dengan label programming. Tampilkan semua postingan

Kamis, 12 Oktober 2017

Hai sobat blog excation, saya akan membagikan source code program C++ yang bisa di gunakan untuk Menghitung Nilai Akhir dan Grade (A, A-, B+, B, B-, C+, C, C-, D+, D) dll. Admin udah cari keliling gugel tapi ngak dapat-dapat akhirnya admin berusaha membuat program ini dengan logika seadanya, silahkan di lihat codenya.


#include <iostream.h>
#include <conio.h>
#include <stdio.h>

int nik,niq,nit,nts,niu,na,nikm,niqm,nitm,ntsm,nium;

cout<<"Program Hitung Nilai Akhir dan di kerjakan dengan susah payah oleh admin zhasuzer www.excation.info\n";
cout<<"\n\tNilai Kehadiran = ";cin>>nik;
cout<<"\n\tNilai quis = ";cin>>niq;
cout<<"\n\tNilai tugas = ";cin>>nit;
cout<<"\n\tNilai UTS = ";cin>>nts;
cout<<"\n\tNilai UAS = :";cin>>niu;



cout<<"\n\tNilai Huruf = A";
else if(na>80&&na<=90.68)
cout<<"\n\tNilai Huruf = A-";
else if(na>70.01&&na<=80.33)
cout<<"\n\tNilai Huruf = B+";
else if(na>60.68&&na<=70.00)
cout<<"\n\tNilai Huruf = B";
else if(na>50.34&&na<=60.67)
cout<<"\n\tNilai Huruf = B-";
else if(na>40.01&&na<=50.33)
cout<<"\n\tNilai Huruf = C+";
else if(na>30.68&&na<=40.00)
cout<<"\n\tNilai Huruf = C";
else if(na>20.34&&na<=30.58)
cout<<"\n\tNilai Huruf = C-";
else if(na>10.01&&na<=30.57)
cout<<"\n\tNilai Huruf = D+";
else if(na>0.68&&na<=10.00)
cout<<"\n\tNilai Huruf = D";
else if(na>0.34&&na<=0.67)
cout<<"\n\tNilai Huruf = D-";
else if(na>0.00&&na<=0.33)
cout<<"\n\tNilai Huruf = E";

cout<<"\n\tTotal Nilai akhir = "<<na;



Oklah, demikian artikel kali ini tentang Program C++ Menghitung Nilai Akhir dan Grade (A, A-, B+, B, B-, C+, C, C-, D+, D) Terbaru, Jika ingin penjelasannya admin akan update artikel ini dan jika masih binggung silahkan tinggalkan komentar.

Senin, 02 Januari 2017

Many programmers, including Java and C++, knows about overloading e.g. method overloading or function overloading, but if you ask them why you should overload a method? Many of them become clueless. This is a common problem of half learning i.e. you know the concept but you don't know the application. If you neither know what problem it solves nor what benefit it provides, then just knowing the concept is not good enough. You won't be able to reap all benefit if you just know the concept and never use it in practice. The most important benefit overloading provides is a cleaner and intuitive API.
Read more �

Sabtu, 31 Desember 2016

Hello all, today is 31st December, the last day of 2016 and this is probably the last post on Javarevisited for this year and I want to make it special. That's why I am going to share you some tips on creating maintainable Java applications which will help you not just in the new year, but also in all the coming years in your software development career. One aspect of development, which is often overlooked by developers is to create applications which are both easy to maintain and support. Since a software spends 90% of its lifetime in maintenance mode, it's very important that your application is easy to configure, support, and maintain. Also, Java application is no different than any other software, you must pay attention to these key properties of writing production quality code, hence this tips also applies to any programming language which is used to create real-world software which is used by real users.
Read more �

Minggu, 25 Desember 2016

In this Spring framework tutorial, you will learn how to write the hello world example in Spring framework. This should be the first tutorial to start learning Spring framework, as it gets the ball rolling. While coding and running this example, you learn a lot about Spring framework, Spring XSD files, necessary JAR files, and more importantly how Spring framework works.This HelloWorld program in Spring framework is an extension of classical Java hello world program, written using dependency Injection design pattern by using Spring Framework's IOC container. Even though now you can configure Spring dependency using annotations and Java configuration, this example uses traditional XML way to configure dependency.
Read more �

Kamis, 24 November 2016

Some of you might ask, Why software project manager should read books? Isn't they are experienced enough to become a project manager and handle software development? A genuine question but Software management is harder than any other management purely because every software is different than the previous one. Many other streams of engineering e.g. Civil or Mechanical got better in terms of estimation and management with the help of software but software development is still run on experience.
Read more �

Kamis, 08 September 2016

When I started coding in Eclipse, I was not aware that by default Eclipse uses tabs for indentation and tabs can have varied with e.g. 1 tab can be equal to 2 spaces or 4 spaces or even 8 spaces. Sometimes, It's all up to you how you configure tabs in your code editor and other times just the mercy of the tool you don't know how to configure e.g. VI in UNIX. I only realize the problem when I found too many difference in a file while check-in into SVN. Apparently, other people was using different indentation (spaces) and that's why the file was showing so many differences when I reformatted them in Eclipse. This happens to many programmers, some pay attention, some didn't and go ahead with the check-in the code, only to revert it back later. There is no clear guideline upon which one is better and whether a programmer should use tabs or spaces, even the Clean Code doesn't help here.
Read more �

Rabu, 29 Juni 2016

If you are preparing for Programming Job interviews and looking for some of the best books for programming questions then you have come to the right place. In this article, I am going to share a couple of good books to prepare coding, software design, and data structure algorithm questions, which are essential for any coding interviews. Though a programming interview also explores other areas of software development e.g. the programming language you would be mainly using in your project e.g. C++ or Java. The database and SQL based questions, the operating systems and UNIX related questions, some of the software design and object oriented design pattern questions and much more, but coding based questions forms the core of programming interviews.
Read more �

Sabtu, 21 Mei 2016

In this part of Java programming mistakes, we will take a look at another common pattern, where programmers tend to use "==" operator to compare Objects, similar to comparing primitives. Since equality of object can be very different in the physical and logical sense, and in the case of domain objects it's mostly driven by business rules, comparing objects with "==" operator, introduces subtle bugs, which are hard to find. The difference between equals() and == operator, one of the Java classics is also asked to find out if the developer is familiar with this important concept or not. Using == operator only make sense when comparing primitives like int, or final constants like Enum. Though there is more involved in comparing two Enum, which you learn by following that link.
Read more �

Sabtu, 23 April 2016

These Google interview questions are some of my favorites collected from different sources. Every Programmer knows that Google is one of the best technology company and its dream for many software developers to work for google, but at same time interview process at google is very tough and only a few genuine intelligent programmers get through their interview process. Google interview questions have always been a good topic of discussion when few young software developer gathered around, I can still remember when one of my friends got a call from google for an interview then how the whole bunch was got excited. We have searched a lot on the internet on google interview questions and answers for him and us and then make a note of some of the best questions for preparation. I am listing down some google interview questions from that list.
Read more �

Kamis, 24 Maret 2016

The difference between stack and heap memory is common programming question asked by beginners learning Java or any other programming language. Stack and heap memory are two terms programmers starts hearing once they started programming but without any clear and definite explanation. Lack of knowledge of what is a heap in Java and what is stack memory in Java results in misconceptions related to stack and heap. To add to this confusion, a stack is also a data structure which is used to store elements in LIFO(Last In First out) order and available in Java API as java.util.Stack. In general, both stack and heap are part of memory, a program is allocated and used for different purposes. Java program runs on JVM which is launched as a process by "java" command. Java also uses both stack and heap memory for different needs. In our last article 10 points on Java heap space, I have touched base on Java heap space and in this article we will see the difference between stack and heap memory in Java.
Read more �

Senin, 01 April 2013

One part of unit testing a Java method is checking exception thrown by that method. A Java unit test should verify correct exception thrown in exceptional case and no exception should be thrown in normal case. In JUnit 3.XX, there was no direct support to pass or fail a test based upon exception thrown by a Java method. JUnit4 address this issue and provides an easy, and readable way to test exception thrown by a Java method. There are many situations when you need to test exception thrown by any method in Java. Classical example of this is testing API methods which should throw IllegalArgumentException if arguments passed to method are not matching to pre-conditions. In order to test exception thrown by any method in JUnit 4 you need to use @Test(expected=IllegalArgumentException.class) annotation. You can replace IllegalArgumentException.class with any other exception e.g. NullPointerException.class or ArithmeticException.class etc.
Read more �

Senin, 25 Maret 2013

Exception handling is an important part of writing robust Java application. It�s a non functional requirement for any application, to gracefully handle any erroneous condition like resource not available, invalid input, null input and so on. Java provides several exception handling features, in built in language itself in form of try, catch and finally keyword. Java programming language also allows you to create new exceptions and throw them using throw and throws keyword. In reality, Exception handling is more than knowing syntax. Writing a robust code is an art more than science, and here we will discuss few Java best practices related to Exception handling. These Java best practices are followed even in standard JDK libraries, and several open source code to better deal with Errors and Exceptions. This also comes as handy guide of writing robust code for Java programmers.
Read more �

Kamis, 21 Maret 2013

Write a Java program to check if two String are anagram of each other, is another good coding question asked at fresher level Java Interviews. This question is on similar level of finding middle element of LinkedList in one pass and swapping two numbers without using temp variable. By the way two String are called anagram, if they contains same characters but on different order e.g. army and mary, stop and pots etc. Anagrams are actually mix-up of characters in String. If you are familiar with String API, i.e. java.lang.String than you can easily solve this problem. In order to check if Strings are anagram, you need to get there character array and see if they are equal or not. Though you can also use indexOf(), substring() and StringBuffer or StringBuilder class to solve this question. In this Java program, we will see 3 ways to solve this interview questions, and check if two String are anagram or not. By the way, if you are preparing for Java interview, it's good to prepare some data structures and algorithms questions as well. More often, there is one or more questions from programming, coding and logic in these interviews.
Read more �

Rabu, 20 Maret 2013

There are multiple ways to generate the MD5 hash in Java program. Not only Java API provides a convenient method for generating MD5 hash, you can also use popular open source frameworks like Spring and Apache commons Codec to generate MD5 digest in Java. MD5 is popular Message Digest Algorithm, which is most commonly used to check data integrity e.g. comparing MD5 checksum to see, if any file is altered or not. Though MD5 has not considered a good cryptographic algorithm for security purpose due to several vulnerabilities found on it, it's still good enough or checking the integrity of the file. MD5 hashing algorithm generates a 128 bit or 16-byte long hash value. MD5 hash values, also known as MD5 digest is mostly represented as 32 character Hex String. You can generate an MD5 hash from a byte array, or String directly using Java, Spring and Apache commons codec. Spring and Apache commons codec has identical API e.g. class name DigestUtils is same and allows you to directly generate MD5 hash as Hex String, while if you use Java then you need to convert byte array to Hex String, as java.security.MessageDigest.digest() method returns MD5 hash as a byte array. Earlier we have seen, How to encode and decode String in base64 encoding, and In this Java tutorial we will see, How to generate a MD5 hash or digest using Java, Spring and Apache commons code library.
Read more �

Selasa, 19 Maret 2013

Like any other field, Software and Programming world too has some interesting and famous rules, principles and laws, which programmers, developers, managers and architects use often in conversations, meetings and chats. These laws are either rules, principles, or famous words from great personalities of computer programming world. At the same time these laws are interesting, funny, worth knowing, and few of them are just amazing to read. I have sharing things which is worth knowing and useful for not only Java programmer but also developers from other programming language e.g. we have seen 10 Object oriented design principles, which is not only useful for Java guys but also with any OOPS programmer. In this article, I am going to share my collection of 10 famous software and computer programming laws, I am sure you would have few more to add into this list. Please share a computer programming rules, or a thought of wisdom, which is worth knowing among software professional.
Read more �

Jumat, 15 Maret 2013

Data structures and algorithm questions are an important part of any programming job interview, be it a Java interview, C++ interview or any other programming language. Since data structures are core programming concept, it's mandatory for all programmers, to know basic data structures like stack, linked list, queue, array, tree, and graph. Though tree and graph are on the tough side, I still see programmers get familiar will all these. Any list of programming job interview questions is incomplete without questions from data structures and algorithms. Similarly, while going on questions from data structure you may get some programming exercise as well e.g. swapping numbers without temp variable. The linked list and array are favorite topics in any data structure interview, questions like reversing linked list, traversing linked list or deleting nodes from linked list, which involves algorithm and data structures are quite common.
Read more �

Selasa, 26 Februari 2013

It's not easy to get key from value in Hashtable or HashMap, as compared to getting value from key because HashMap or Hashtable doesn't enforce one to one mapping between key and value inside Map in Java. in fact, Map allows same value to be mapped to multiple keys inside HashMap, Hashtable or any other Map implementation. What you have in your kitty is Hashtable.containsValue(String value) or Hashtable.containsKey(String key) to check whether key or value exists in Hashtable or not, but sometimes we want to retrieve a value from Map corresponding to any key and there is no API method to do in Map. We can still do this, but it highly depends data in your Map because Hashtable and HashMap both allows duplicate values mapped to the different key. In this Java tutorial, we will see an example of how to get key from value in Hashtable in Java.
Read more �

Kamis, 21 Februari 2013

How to swap two numbers without using temp or third variable is common interview question not just on Java interviews but also on C and C++ interviews. It is also a good programming questions for freshers. This question was asked to me long back and didn't had any idea about how to approach this question without using temp or third variable, may be lack of knowledge on bitwise operators in Java or may be it didn't click at that time. Given some time and trial error, I eventually come out with a solution with just arithmetic operator but interviewer was keep asking about other approaches of swapping two variables without using temp or third variable. Personally, I liked this question and included in list of my programming interview question because of its simplicity and some logical work, it force you to do. When learned bit-wise operation in Java I eventually find another way of swapping two variables without third variable, which I am going to share with you guys.
Read more �

Minggu, 17 Februari 2013

It's hard to remember exact syntax of, how to create stored procedure in MySQL, until you are creating and working on stored procedure frequently, simply because syntax is not a one liner. You need to remember exact syntax, if you are using MySQL database from command line. What help in this case is, quick examples. In last couple of MySQL tutorial we have seen How to find second highest salary and How to join 3 tables in one query; In this MySQL tutorial we will see couple of examples of creating stored procedure and calling stored procedure using IN and OUT parameters. All these MySQL examples are simple and help you to understand syntax of creating stored procedure with parameters in MySQL. These examples are tested in MySQL 5.5 database. We will also use following employee table to create and test these stored procedures :
Read more �

Jumat, 15 Februari 2013

There are several ways to convert XMLGregorianCalendar to Date in Java. You can convert XMLGregorianCalendar to either java.util.Date or java.sql.Date based upon your need. JAXB (Java API/Architecture for XML Bindings) is a popular framework to create XML documents from Java Objects and Java objects from XML files. JAXB also helps to create Java classes from XML Schema file (.XSD file). By default JAXB maps XSD data type xs:date, xs:time and xs:dateTime to XMLGregorianCalendar in Java, but you can configure XJC to create java.util.Date objects instead of javax.xml.datatype.XMLGregorianCalendar. Since java.util.Dateis most popular way of dealing with date and time in Java, we often need to convert XMLGregorianCalendar instance to Date instance in Java. Thankfully by using Java API, we can easily do this conversion of XMLGregorianCalendar to Date and Date to XMLGregorianCalendar in Java. By the way, It's good to remember that XML Schema has three different types which can represent either date, time or both, while java.util.Date contains date and time information together. In this Java and XML tutorial, we will see example of converting XMLGregorianCalendar to Date and inverse in Java.
Read more �