Description

Description

Write a complete Java program that allows users to perform basic banking operations

1.Deposit money

2.Withdraw money

3.Check balance

4.Exit

Instructions:

1.Create a Java Class: Name the class SimpleBanking.

2.Attributes:

    • Use a static variable to store the account balance (e.g., private static double balance).

    3.Method Definitions:

      • Define the following methods:
        • static void deposit(double amount): Increases the balance by the specified amount and prints a confirmation message.
        • static void withdraw(double amount): Decreases the balance by the specified amount if sufficient funds are available; otherwise, print an error message.
        • static void checkBalance(): Prints the current balance.

      4.Main Method:

        • In the main method, present a menu to the user with the following options:
          • 1 – Deposit money
          • 2 – Withdraw money
          • 3 – Check balance
          • 4 – Exit

        5.User Input:

          • Use the Scanner class to read user input.
          • Based on the user’s choice, call the appropriate method.

          6.Loop Until Exit:

            • Use a loop to allow the user to perform multiple operations until they choose to exit.Part 2: (7 Marks)In this project, you will develop a Java program to manage a simple shopping list using object-oriented programming principles. The project consists of two main classes:1) Create an Item class with the following requirements:· An item has four attributes: id, name, price, and quantity.· Implement a default constructor (no parameters).· Implement a constructor with four parameters to initialize all attributes with specific values.· Provide setter and getter methods for all attributes.· Implement a method updateQuantity(int newQuantity) to modify the quantity of an item.2) Create a ShoppingListManager class (Driver class) that:· Asks the user to enter details for five items.· Stores each item in a separate variable.· Displays the shopping list after adding the items.· Uses a loop function to remove items one by one.· Displays the updated shopping list after each removal.· Continues the process until the shopping list is empty.




            College of Computing and Informatics

            Project
            Deadline: Sunday 20/04/2025 @ 23:59
            [Total Mark is 14]
            Student Details:

            CRN:

            Name:
            Name:
            Name:

            ID:
            ID:
            ID:

            Instructions:

            • You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on
            Blackboard via the allocated folder. These files must not be in compressed format.

            • It is your responsibility to check and make sure that you have uploaded both the correct files.
            • Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between
            words, hide characters, use different character sets, convert text into image or languages other than English
            or any kind of manipulation).

            • Email submission will not be accepted.
            • You are advised to make your work clear and well-presented. This includes filling your information on the cover
            page.

            • You must use this template, failing which will result in zero mark.
            • You MUST show all your work, and text must not be converted into an image, unless specified otherwise by
            the question.

            • Late submission will result in ZERO mark.
            • The work should be your own, copying from students or other resources will result in ZERO mark.
            • Use Times New Roman font for all your answers.

            Restricted – ‫مقيد‬

            Description and Instructions

            Pg. 01

            Description and Instructions
            Important Notes:
            • The number of students in each group: 2 to 3
            • You must make your own group and send the list of the students
            to your respective instructor.
            • Project comprises of Part 1 and Part 2 [both carry 7 + 7 marks]
            • For each part of the project the student must copy and paste the
            code and add screenshots of the output.
            Part 1:

            (7 Marks)

            Write a complete Java program that allows users to perform basic banking operations

            1. Deposit money
            2. Withdraw money
            3. Check balance
            4. Exit

            Instructions:
            1. Create a Java Class: Name the class SimpleBanking.
            2. Attributes:
            o

            Use a static variable to store the account balance (e.g., private static
            double balance).

            3. Method Definitions:
            o

            Define the following methods:
            ▪ static void deposit(double amount): Increases the balance
            by the specified amount and prints a confirmation message.
            ▪ static void withdraw(double amount): Decreases the
            balance by the specified amount if sufficient funds are available;
            otherwise, print an error message.
            ▪ static void checkBalance(): Prints the current balance.

            4. Main Method:
            o

            Restricted – ‫مقيد‬

            In the main method, present a menu to the user with the following options:

            Description and Instructions

            Pg. 02



            1 – Deposit money
            2 – Withdraw money
            3 – Check balance
            4 – Exit

            5. User Input:
            o
            o

            Use the Scanner class to read user input.
            Based on the user’s choice, call the appropriate method.

            6. Loop Until Exit:
            o

            Use a loop to allow the user to perform multiple operations until they choose to
            exit.

            The output of the program should be as follows:

            Restricted – ‫مقيد‬

            Pg. 03

            Restricted – ‫مقيد‬

            Description and Instructions

            Description and Instructions

            Pg. 04
            Part 2:

            (7 Marks)

            In this project, you will develop a Java program to manage a simple shopping
            list using object-oriented programming principles. The project consists of two
            main classes:

            1) Create an Item class with the following requirements:

            An item has four attributes: id, name, price, and quantity.

            Implement a default constructor (no parameters).

            Implement a constructor with four parameters to initialize all attributes
            with specific values.

            Provide setter and getter methods for all attributes.

            Implement a method updateQuantity(int newQuantity) to modify the
            quantity of an item.

            2) Create a ShoppingListManager class (Driver class) that:

            Restricted – ‫مقيد‬

            Asks the user to enter details for five items.

            Stores each item in a separate variable.

            Displays the shopping list after adding the items.

            Uses a loop function to remove items one by one.

            Displays the updated shopping list after each removal.

            Continues the process until the shopping list is empty.

            Purchase answer to see full
            attachment

            Share This Post

            Email
            WhatsApp
            Facebook
            Twitter
            LinkedIn
            Pinterest
            Reddit

            Order a Similar Paper and get 15% Discount on your First Order

            Related Questions

            Description

            Description Chapter 1: Description of the company This section should answer the following questions: What is the full title of the company/institution? Give a brief history of the company, full mailing address and relevant weblinks What is the type of ownership of the company/institution? State the main shareholders and their

            Description

            Description Revise the word file according to the instructor’s comments, and after making the necessary changes, organize it based on the requirements outlined in the attached PDF. Due 8th May 2025 by 11:59 pm. Research Methods and Quantitative Analysis 2nd Semester, 2025 EMBA – Section JA The proposal is worth

            Description

            Description see ASSIGNMENT COVER SHEET Course name: Health and Environmental Risk Assessment Course number: PHC 351 CRN: Assignment title or task: (You can write a question) Discuss the steps and methods of risk communication and community engagement and support your answer with examples. Student name: xxxx Student ID: xxxx Submission

            Description

            Description see College of Health Sciences Department of Public Health PAPER ASSIGNMENT Course name: Introduction to Mental Health Course number: PHC-273 Go through the research articles in the link below and answer any one of the following questions in at least 350 words. • • Assignment task Q1. Discuss about

            Description

            Description HALAH JAMALULDINE Module 14 Collapse Change management is a critical process in healthcare organizations, particularly in Saudi Arabia, where the healthcare system is undergoing rapid transformation to align with Vision 2030. One notable change in a Saudi healthcare organization was the implementation of electronic health records (EHRs) in a

            Description

            Description Module 14: Rewarding through Performance Management Effective Reward Systems in Performance Management Performance management systems and reward systems are essential components of motivating and driving individual and group performance in organizations. Analyze reward systems and the appropriate application to meet organizational goals. Discuss the different types of reward systems,

            Description

            Description Reply to discussion (Module 14: Rewarding through Performance Management) Q – Please read the discussion Attached and prepare a Reply to this discussion post with comments that further and advance the discussion topic. The reply needs to be substantial and constructive in nature. it should add to the content

            Description

            Description Reply to discussion (Module 14: Rewarding through Performance Management) Q – Please read the discussion Attached and prepare a Reply to this discussion post with comments that further and advance the discussion topic. The reply needs to be substantial and constructive in nature. it should add to the content

            Description

            Description Author(s) Year Study Name Study Type Amponin & Britiller 2023 Electronic health records (EHRs): effectiveness to health care outcomes and challenges of health practitioners in Saudi Arabia empirical, descriptive, and cross-sectional study Alfaleh et al. 2022 The role of telemedicine services in changing users’ intentions for presenting to the

            Description

            Description Hello, the task is to write a discussion and Quiz for module 14 from MKT640 course

            Description

            Description I want assistance with my internship report. will give details later 👍🏼 You may use AI to save time, as long as it gives accurate description, I don’t mind it =) College of Administration and Finance Sciences Form No 4- Internship Report Cover Page Student`s name: Student`s ID #:

            Description

            Description See College of Health Sciences Department of Public Health HCM101-PAPER ASSIGNMENT Course name: Healthcare Management Course number: HCM101 CRN The textbook (Buchbinder & Shanks (2012), second edition, chapter 5) addresses an essential topic in health care, which is strategic planning. SWOT analysis is a significant tool that healthcare leaders

            Description

            Description Consumer Behavior Case Study: Nike and Maslow’s Hierarchy of Needs Introduction Nike is a global leader in athletic apparel and footwear. Its success can be partly explained by how it meets different levels of consumer needs based on Maslow’s Hierarchy of Needs, which include: 1.Physiological, 2.Safety, 3.Social, 4.Esteem, and

            Description

            Description Dis. one file. Discuss in detail the process that a researcher hypothetically would go through when they become aware of a population health problem that arises during the Hajj. What research would be needed to protect the population of the Kingdom? reply. Hi Sarah, Great discussion! I agree that

            Description

            Description The organizational behavior aspects (motivation – attuited – personality – emotion ..etc. ) helps the manger to understand their employees in the work environment In two essays answer the following questions: 1.How those aspects will be effect in the work performance and employee satisfaction? (5 grades) 2.What are some

            Description

            Description see College of Computing and Informatics Assignment 2 Deadline: Sunday 13/04/2025 @ 23:59 [Total Mark for this Assignment is 8] Student Details: Name: ### ID: ### CRN: ### Instructions: • You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard

            Description

            Description I need help completing a discussion board post for my Management course (Managing Perform. for Results). Below are the exact requirements provided by my instructor: Description: In this module, you will examine how pay and reward structures support and facilitate performance management. You will also compare traditional and contingent

            Description

            Description Module 14: Discussion ForumModule 14: Dis one One file. Discussion Forum Think about a change you know of in a healthcare organization in Saudi Arabia. How was the change received and what was the outcome? What were the resistance points? Provide and discuss suggestions to deal with resistance to