{"id":9616,"date":"2020-11-19T13:42:10","date_gmt":"2020-11-19T13:42:10","guid":{"rendered":"http:\/\/onlineclassesguru.com\/?p=9616"},"modified":"2020-11-19T13:42:10","modified_gmt":"2020-11-19T13:42:10","slug":"java-project","status":"publish","type":"post","link":"https:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/","title":{"rendered":"Java project"},"content":{"rendered":"<style type=\"text\/css\"><\/style><p>Project #1<\/p>\n<p>This project will involve creating a BankAccount class with the following properties below:<br \/>\nThe BankAccount class will be used to set up multiple client accounts (different name &amp; ID), it will also be<br \/>\nused to keeps track of a user\u2019s available balance, along with the number of transactions (deposits and\/or withdrawals) which are made.<\/p>\n<p>public class BankAccount {<br \/>\nPrivate String name<br \/>\nprivate String id;<br \/>\nprivate double balance;<br \/>\nprivate int numTransactions;<\/p>\n<p>\/\/ Accessors and Mutator functions\u2026.<\/p>\n<p>\/\/ Additional methods<br \/>\n\/\/ Deposit \u2013 Adds amount to balance. Also counts as 1 transaction.<br \/>\npublic void deposit(double amount)<\/p>\n<p>\/\/ Subtracts amount from balance if user has enough money. Counts as 1 transaction.<br \/>\npublic void withdraw(double amount) \/\/ Remember to verify client has sufficient funds prior to withdrawal, and if not output a message.<\/p>\n<p>}<\/p>\n<p>1) Please write the Accessor (Getters) and Mutators (Setters) methods for the 4 instance variables above.<br \/>\n2) Also create the method definitions for the methods deposit() and withdraw().<\/p>\n<p>\/\/Example of using this class when using the default contructor:<br \/>\nBankAccount savings = new BankAccount();<br \/>\nsavings.setName (\u201cJimmy\u201d);\u00a0 \/\/ can also use this method when the default constructor is used.<br \/>\nsavings.setId(12345);\u00a0 \u00a0 \u00a0 \/\/ can also use this method when the default constructor is used.<br \/>\nsavings.setBalance(50.00);<\/p>\n<p>savings.deposit(10.00);<br \/>\nsavings.deposit(50.00);<br \/>\nsavings.deposit(10.00);<br \/>\nsavings.deposit(70.00);<br \/>\nsavings.withdraw(100.00);<br \/>\nSystem.out.println(\u201cBalance = \u201c+savings.getBalance());\u00a0 \/\/ Balance = $90, with 5 transactions<br \/>\nSystem.out.println(\u201cNumber of Transactions = \u201c+savings.getNumTransactions());<\/p>\n<p>\/\/ Example using 2 parameter constructor<br \/>\nBankAccount savings2 = new BankAccount(\u201cJohn\u201d, 6789, 100.00);<\/p>\n<p>savings2.deposit(20.00);<br \/>\nsavings2.withdraw(10.00);<br \/>\nSystem.out.println(\u201cBalance = \u201c+savings2.getBalance());\u00a0 \/\/ Balance = $110, with 2 transactions<br \/>\nSystem.out.println(\u201cNumber of Transactions = \u201c+savings2.getNumTransactions());<\/p>\n<p>3) Create two constructors for your class: the default and 3 parameter constructors.<br \/>\nThe three parameter constructor will allow a user to set the name, id and initial balance when instantiating the object.<\/p>\n<p>4) Please create the the BankAccount class in one java file (BankAccount.java) and the test\/demo with main<br \/>\nin a second java file (BankAccountDemo.java).<br \/>\n5) Please test all methods for the class and insert your testing screenshots in ONE MS Word file.<br \/>\nTherefore each student should upload ONLY 3 files: 2 JAVA files and 1 MS Word document (testing code).<br \/>\nAny files other than these, will not be looked at and will not be graded.<\/p>\n<p>6) Some code requirements:<br \/>\na) Withdrawal amount should be tested to ensure there are sufficient funds present.<br \/>\nb) setBalance should check whether the deposited amount is in the valid range 0-10,000 (inclusive)<br \/>\nc) setNumTransactions should not allow setting to a negative value.<br \/>\nd) Don\u2019t worry about testing for valid name, id.<\/p>\n<p>Rubric grading criterior, ensure code:<br \/>\nhas appropriate comments,<br \/>\nuses good coding styles (proper indenting), proper naming conventions, no literals (use Constants) as has been shown in class.<br \/>\nhas been tested properly.<\/p>\n<p>Note that this assignment is to be worked on individually and not in groups.<\/p>\n<p><center><a href=\"http:\/\/onlineclassesguru.com\/orders\/ordernow\"><img decoding=\"async\" src=\"https:\/\/encrypted-tbn0.gstatic.com\/images?q=tbn:ANd9GcTyj99p60XCLyLk1htB7-1neRt8-2QdnenNlQ&usqp=CAU\"target=\"_http:\/\/onlineclassesguru.com\/orders\/ordernow\"\/><\/center><p>","protected":false},"excerpt":{"rendered":"<p>Project #1 This project will involve creating a BankAccount class with the following properties below: The BankAccount class will be used to set up multiple client accounts (different name &amp; ID), it will also be used to keeps track of a user\u2019s available balance, along with the number of transactions (deposits and\/or withdrawals) which are&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9616","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java project - onlineclassesguru<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java project - onlineclassesguru\" \/>\n<meta property=\"og:description\" content=\"Project #1 This project will involve creating a BankAccount class with the following properties below: The BankAccount class will be used to set up multiple client accounts (different name &amp; ID), it will also be used to keeps track of a user\u2019s available balance, along with the number of transactions (deposits and\/or withdrawals) which are...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/\" \/>\n<meta property=\"og:site_name\" content=\"onlineclassesguru\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-19T13:42:10+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin_admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/onlineclassesguru.com\/#website\",\"url\":\"https:\/\/onlineclassesguru.com\/\",\"name\":\"onlineclassesguru\",\"description\":\"Cheap Professional coursework and reaction papers help\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/onlineclassesguru.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/#webpage\",\"url\":\"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/\",\"name\":\"Java project - onlineclassesguru\",\"isPartOf\":{\"@id\":\"https:\/\/onlineclassesguru.com\/#website\"},\"datePublished\":\"2020-11-19T13:42:10+00:00\",\"dateModified\":\"2020-11-19T13:42:10+00:00\",\"author\":{\"@id\":\"https:\/\/onlineclassesguru.com\/#\/schema\/person\/1831fa4d28e47b468621cf27932f5742\"},\"breadcrumb\":{\"@id\":\"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/onlineclassesguru.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java project\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/onlineclassesguru.com\/#\/schema\/person\/1831fa4d28e47b468621cf27932f5742\",\"name\":\"admin_admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/onlineclassesguru.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429c8d043f7a770af242b0031e8b9f2b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429c8d043f7a770af242b0031e8b9f2b?s=96&d=mm&r=g\",\"caption\":\"admin_admin\"},\"url\":\"https:\/\/onlineclassesguru.com\/index.php\/author\/admin_admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java project - onlineclassesguru","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/","og_locale":"en_US","og_type":"article","og_title":"Java project - onlineclassesguru","og_description":"Project #1 This project will involve creating a BankAccount class with the following properties below: The BankAccount class will be used to set up multiple client accounts (different name &amp; ID), it will also be used to keeps track of a user\u2019s available balance, along with the number of transactions (deposits and\/or withdrawals) which are...","og_url":"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/","og_site_name":"onlineclassesguru","article_published_time":"2020-11-19T13:42:10+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin_admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/onlineclassesguru.com\/#website","url":"https:\/\/onlineclassesguru.com\/","name":"onlineclassesguru","description":"Cheap Professional coursework and reaction papers help","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/onlineclassesguru.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/#webpage","url":"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/","name":"Java project - onlineclassesguru","isPartOf":{"@id":"https:\/\/onlineclassesguru.com\/#website"},"datePublished":"2020-11-19T13:42:10+00:00","dateModified":"2020-11-19T13:42:10+00:00","author":{"@id":"https:\/\/onlineclassesguru.com\/#\/schema\/person\/1831fa4d28e47b468621cf27932f5742"},"breadcrumb":{"@id":"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/onlineclassesguru.com\/index.php\/2020\/11\/19\/java-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/onlineclassesguru.com\/"},{"@type":"ListItem","position":2,"name":"Java project"}]},{"@type":"Person","@id":"https:\/\/onlineclassesguru.com\/#\/schema\/person\/1831fa4d28e47b468621cf27932f5742","name":"admin_admin","image":{"@type":"ImageObject","@id":"https:\/\/onlineclassesguru.com\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/429c8d043f7a770af242b0031e8b9f2b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429c8d043f7a770af242b0031e8b9f2b?s=96&d=mm&r=g","caption":"admin_admin"},"url":"https:\/\/onlineclassesguru.com\/index.php\/author\/admin_admin\/"}]}},"_links":{"self":[{"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/posts\/9616"}],"collection":[{"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/comments?post=9616"}],"version-history":[{"count":1,"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/posts\/9616\/revisions"}],"predecessor-version":[{"id":9617,"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/posts\/9616\/revisions\/9617"}],"wp:attachment":[{"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/media?parent=9616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/categories?post=9616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onlineclassesguru.com\/index.php\/wp-json\/wp\/v2\/tags?post=9616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}